Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
yes_really
4y ago
0 comments
Save
Share
But why didn't you use the O(n) solution instead of the O(n log n) solution?
0 comments
2 comments · 2 top-level
top
newest
oldest
nouveaux
4y ago
To be honest, I had forgotten the O(n) solution and vaguely remembered the nlogn solution. After that experience, I have both solutions lodged in my brain.
wombat-man
4y ago
I suppose if you had to optimize for least space used sorting in place and doing it they way they suggested would be best.
j
/
k
navigate · click thread line to collapse