/Algorithms

Self-Parking Car In 500 Lines Of Code

- Oleskii Trekhleb tl;dr: "Step-by-step we're going to break down a high-level task of creating the self-parking car to the straightforward low-level optimization problem of finding the optimal combination of 180 bits (finding the optimal car genome)."

featured in #257


Quadratic Algorithms Are Slow (And Hashmaps Are Fast)

- Julia Evans tl;dr: Julia guides us through what a quadratic time function looks like, why it's slow, how to convert a quadratic algorithm into a linear one using a hashmap.

featured in #252


Solving Martin Gardner's Chess Problem Using Simulated Annealing

- Dennis Yurichev tl;dr: The problem is the maximum-attack problem, placing 8 pieces (not the pawns) on squares to attack the largest number of squares and, the converse, the minimum-attack problem using the simulated annealing algorithm.

featured in #249


Reddit Interview Problems: The Game Of Life

- Alex Golec tl;dr: Alex runs through an interview question at Reddit: "Suppose you have an M by N board of cells, where each cell is marked as "alive" or "dead." This arrangement of the board is called the "state," and our task is to compute the cells in the next board state according to a set of rules:" He runs through the solutions in this post.

featured in #247


5000x Faster CRDTs: An Adventure in Optimization

tl;dr: The author read a paper about implementing collaborative editing tools and one of the algorithms mentioned took over 3 seconds to process, which is slow. It was his own algorithm, and in this post he makes amends and shows hot to speed the tools up.

featured in #242


What Is The Sorting Algorithm Behind ORDER BY Query In MySQL?

- Pankaj Tanwar tl;dr: mySQL's sorting algorithm depends on available indexes, expected size of result & mySQL version, and has two methods to produce sorted / ordered streams of data - a smart use of indexes and the Fiilesort algorithm. Pankaj discusses both.

featured in #239


New Algorithm Breaks Speed Limit For Solving Linear Equations

- Kevin Hartnett tl;dr: "By harnessing randomness, a new algorithm achieves a fundamentally novel — and faster — way of performing one of the most basic computations in math and computer science."

featured in #227


The Case For A Learned Sorting Algorithm

- Adrian Colyer tl;dr: On a large dataset i.e. 1 billion items, Learned Sort outperforms its competitor by a factor of 1.49x, and that includes time taken to train the model. Adrian explains how it works.

featured in #211


Computer Scientists Break Traveling Salesperson Record

- Erica Klarreich tl;dr: "An algorithm devised a decade ago beats Christofides’ 50% factor," though the researchers "were only able to subtract 0.2 billionth of a trillionth of a trillionth of a percent."

featured in #210


Inside TikTok's Killer Algorithm

- Sara Fischer tl;dr: New users are shown 8 popular videos, each representing a different trend or topic. Users and videos are clustered separately and, based on users' engagement, the user is recommended videos from the appropriate cluster. TikTok concede this creates "filter bubbles."

featured in #206