4 ms·
For that case, which is the worst case, yes. And the amortized average complexity is O(1) because that case is unlikely. Are you starting to see why this is a
by jeffbee 3y ago
For that case, which is the worst case, yes. And the amortized average complexity is O(1) because that case is unlikely.
Are you starting to see why this is a good icebreaker? It has all kinds of discussion potential.
- ninkendo 3y agoNo, not when the goal is to actually implement it. You implied in your comment that if I wasn’t someone who could implement this in 15 seconds, I’m not a good candidate in your mind. It would take me longer to explain why it’s not trivial.