DEV Community

Discussion on: "Big Oh": Is my reasoning right?

Collapse
 
hkrogstie profile image
Håvard Krogstie

I'm glad to hear!

If you want some practice, do have a look at a challenge I uploaded

.
The O(n²) solution is trivial, but see if you can come up with one that's O(nlog n) (Hint: sorting). I have posted a python solution in the comments, with explanations. Good luck!