5 ms·
Which is one of the reasons why we give it has homework in college. Not because you're going to do it in the workplace, but because (a) you see how the implemen
by robotresearcher 10y ago
Which is one of the reasons why we give it has homework in college. Not because you're going to do it in the workplace, but because (a) you see how the implementation entails the big-O behaviour you learned about, and (b) it's simple but tricky, thus training you to consider every aspect carefully.
Aspect (b) is why people ask about it in interview questions. You are not expected to remember the details, you are expected to think about them as you go.