4 ms·
The pedant in me squirms at seeing a quadratic-time solution to something so linear. Use a heap or a scan, sir!
by textminer 14y ago
The pedant in me squirms at seeing a quadratic-time solution to something so linear. Use a heap or a scan, sir!
- textminer 14y agoOh, now I have to yell at myself. No doubt Python's sorted is some n*logn quicksort, and not actually in quadratic time. Crow for all!