Topics /

Math & Algorithms

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

2025
70

500 days of math

I recently crossed 500 days of practicing math daily with Math Academy. I wrote about my experience after 100 days here. TL;DR: I am still very impressed by the Math Academy system and highly…

71

Solving Fizz Buzz with Cosines

Fizz Buzz is a counting game that has become oddly popular in the world of computer programming as a simple test of basic programming skills. The rules of the game are straightforward. Players say the numbers aloud in order beginning with one. Whenever a number is divisible by 3, they say 'Fizz' instead. If it is…

74

Think in math, write in code (2019)

Programmers love to discuss programming languages. We not only debate their technical merits and aesthetic qualities, but they become integrated into our personal identities, along with the values and traits that we associate with them. Some even defend a form of Linguistic Determinism that thinking is confined to…

77

Generating Voronoi diagrams using Fortune's algorithm

This article is about using Fortune’s Algorithm to generate Voronoi Diagrams in O(nlogn) time. If I’d known how hard it would be I wouldn’t have started it. If you are intending to implement it with the intent to actually use it, rather than as an exercise, I would recommend not using Fortune’s. Unless you are doing a…

78

How Slide Rules Work

The survival of our species owes much to our brain, specifically, its ability to observe, analyse, and plan. Planting crops and storing grains for the winter were some of the earliest uses of these abilities. Measuring and calculating are foundational elements of observation, analysis, and planning. Computation, upon…

80

Visual explanations of mathematics (2020)

It is thought that Euclid wrote Elements in about 300 BC, but Oliver Byrne turned it into one of the true gems of visualization — and made it about 100 times more readable. By seamlessly combining typeset text (Caslon, if you’re interested) with minimalist geometric drawings in primary col

81

Very Wrong Math

The difference between misinformation and disinformation is the difference between ignorance and malice. Trolling is somewhat different, incorporating an element of provocation and narcissism. But what the hell is this?

85

Relaxed Radix Balanced Trees (2024)

I’m adding immutable vectors to my language, Ivan, and needed to pick a suitable data structure to implement them. Clojure uses Persistent Vectors (PVs) which support lookups, updates, and appends all in ‘effectively’ constant time. However, it doesn’t have efficient insert or merge operations. Relaxed Radix Balanced…

86

Memory access is O(N^[1/3])

In computer science, we often compare the efficiency of algorithms by describing their runtime as a function of the size of the input. Sorting is O(n * log(n)), meaning that sorting a list of N items takes an amount of time proportional to the number of items multiplied by its logarithm. Matrix multiplication is…