Daily Algorithm Practice

Still working through Big O. 


This one is super simple. 

If you notice, there are no loops, no recursion, etc. Just a conditional. Regardless of what the values for a and b are, the function is going to take what is mathematically the same amount of time. Thus, this function is doing a constant amount of work, so the runtime is simply O(1)

Comments

Popular posts from this blog

6 hours and only 6 Lagoon rides?

Reflecting on major life goals yet again

Hobble Creek Half: The slow passage of time marches us towards our inevitable death