4 ms·
Ask HN: What's Your Favorite Algorithm?
- john_the_writer 4y agoI have loved this one for years while (s++ = t++);
- Rounin 4y agoBinary search and similar forms of successive approximation. It can be used to solve such a wide array of problems given just a minimal amount of information.
- highwayman47 4y agocan you please ELI5?
- graderjs 4y agoI’m partial to LZ77 so simple and elegant and skiplist: simple but powerful
- tothrowaway 4y agoThe Hungarian algorithm. It solves the assignment problem (the optimal way to assign workers to tasks given their completion time of each task). The assignment problem looks hopelessly O(n!), but by some magic, the algorithm can solve it in polynomial time.