Hacker News new | ask | show | jobs
by zodiac 1390 days ago
Depends on what you mean by "best". For e.g. comparison-based sorting will already cost O(n log n) time but the HashMap solution will run in O(n) HashMap operations.