News for hackers. Stuff that matters.
Re:Ask HN: What's your favorite elegant/beautiful algorithm? by yangmaster on Wednesday October 17, 2018 @12:09PM (#18240457)
Fisher-Yates shuffle. An elegant and surprisingly intuitive O(n) algorithm that doesn't take up extra memory.
Re:Ask HN: What's your favorite elegant/beautiful algorithm? by malingo on Wednesday October 17, 2018 @05:27PM (#18243980)
Check out Sattolo's algorithm as well. Good writeup here: https://danluu.com/sattolo/