Topics /

Math & Algorithms

The most popular blog posts about math & algorithms on Hacker News. 171 posts.

2022
61

Geometry from Another Universe

You start on an enclosed lawn, surrounded by four walls with a doorway in one of them. If you go in and explore, you might begin to feel trapped. You'll find you can visit five different rooms in the house, or go back outside to the lawn, but there's no way to go anywhere else. It's not because there are walls…

77

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.

82

Death by hockey sticks

You may be familiar with the term “hockey stick curve,” used describe a trend that has been flat/stable for a very long time, but shoots up at the end of the series in dramatic fashion, resembling the shape of a hockey stick. Hockey can be a violent sport, and it’s easy to get hurt by even one well-aimed swing…

87

“I don't know the numbers”: a math puzzle

I saw a math puzzle the other day on Hacker News. It reads as follows: Two numbers are chosen randomly, both are positive integers smaller than 100. Sandy is told the sum of the numbers, while Peter is told the product of the numbers. Then, this dialog occurs between Sandy and Peter: Peter: I don’t know the numbers…