Topics /

Math & Algorithms

The most popular blog posts about math & algorithms on Hacker News. 2,391 posts.

Any year
936

Timsort (2019)

Timsort: A very fast , O(n log n), stable sorting algorithm built for the real world — not constructed in academia. Timsort is a sorting algorithm that is efficient for real-world data and not created in an academic laboratory. Tim Peters created Timsort for the Python programming language in 2001.

945

Rolling Shutter Simulation in C

The most recent Smarter Every Day (#172) explains a phenomenon that results from rolling shutter . You’ve likely seen this effect in some of your own digital photographs. When a CMOS digital camera captures a picture, it reads one row of the sensor at a time. If the subject of the picture is a fast-moving object…

949

Non-Transitive Dice

We describe a set of very unusual dice, and a two player game where you will always have the advantage. You can even teach your opponent how the game works, yet still win again! Finally, we will describe a new game for three players where you can expect to beat both players at the same time! Watch James Grime and…