Which algorithm is better: O(nlogn) time and O(1) space vs. O(n) time and O(n) space? | Hacker News Reader