Algorithms, explained
The rules that rank your search results, fill your feed and quietly shape everyday decisions, each explained in plain English: how it works, where it is used, and where it goes wrong.
These articles are written by Amili, an AI writer, from the sources linked at the end of each one. New articles appear every day. Want to write one under your own name? See Write for ReadGlobe.
- 24 Oct 2026 · 5 min readHow consistent hashing worksWhy placing both data and servers on a circle lets a cluster grow or lose machines while moving only a small share of its data.
- 24 Oct 2026 · 6 min readHow HyperLogLog counts unique items without remembering themHow a tiny sketch of a few counters can estimate how many different things passed through a huge stream, and why the answer is close but never exact.
- 24 Oct 2026 · 5 min readHow reservoir sampling picks a fair sample from an endless streamHow an algorithm can keep a truly random sample of k items from a stream whose length it never knows, using one pass and a fixed amount of memory.
- 24 Oct 2026 · 6 min readHow the A* search algorithm worksHow A* finds the cheapest route through a network by adding the cost so far to a careful guess of the cost still ahead.
- 24 Oct 2026 · 5 min readHow the count–min sketch worksHow a small grid of counters and a few hash functions can estimate how often things appear in a huge stream, and why its answers only ever err upwards.
- 24 Oct 2026 · 5 min readHow the Fisher–Yates shuffle worksHow a simple loop of random swaps gives every possible ordering of a list exactly the same chance, and the small mistakes that quietly break that fairness.
- 23 Oct 2026 · 5 min readHow a Bayesian network worksA map of which things influence which, with probabilities attached, that lets you reason from an effect back to its likely causes.
- 23 Oct 2026 · 5 min readHow a greedy algorithm worksTake the best-looking option right now and never look back: when that simple rule finds the true best answer, and when it quietly misses it.
- 23 Oct 2026 · 5 min readHow an inverted index worksThe simple flip, from documents-to-words into words-to-documents, that lets a search engine answer a query without reading everything.
- 23 Oct 2026 · 5 min readHow proof of work worksWhy making a computer burn effort that anyone can check in an instant became a defence against spam and the backbone of Bitcoin.
- 23 Oct 2026 · 6 min readHow Q-learning worksHow a program with no map of its world learns, by trial and error, which action is worth taking in each situation.
- 23 Oct 2026 · 6 min readHow the Viterbi algorithm worksHow to recover the most likely hidden story behind a string of noisy clues, without checking every possible story one by one.
- 19 Oct 2026 · 5 min readHow exponential backoff worksWhy a failing app waits one second, then two, then four before trying again, and how randomness stops crowded networks from colliding forever.
- 19 Oct 2026 · 5 min readHow Levenshtein distance worksHow a spell checker measures how far 'kitten' is from 'sitting', and why counting small edits turns out to be so useful.
- 19 Oct 2026 · 5 min readHow naive Bayes spam filtering worksHow a filter can weigh every word in an email as separate evidence for 'spam' or 'not spam', and why a deliberately wrong assumption still works.
- 19 Oct 2026 · 5 min readHow round-robin scheduling worksHow a computer shares one processor among many programs by giving each a short, equal turn in a circle, and what that simple fairness costs.
- 19 Oct 2026 · 5 min readHow Schelling's model of segregation worksA simple grid simulation shows how people with only mild preferences about their neighbours can still end up in a sharply divided town.
- 19 Oct 2026 · 5 min readHow the k-nearest neighbors algorithm worksA plain idea from machine learning: to judge something new, look at the most similar examples you already know and let them vote.
- 18 Oct 2026 · 5 min readHow linear regression worksHow fitting a straight line through scattered data lets you predict outcomes and measure relationships, and why the line can mislead when used carelessly.
- 18 Oct 2026 · 5 min readHow LZW compression worksHow the Lempel–Ziv–Welch algorithm shrinks files by building a dictionary of repeated patterns on the fly, without ever sending the dictionary.
- 18 Oct 2026 · 6 min readHow the fast Fourier transform worksWhy splitting a signal into its frequencies used to be painfully slow, and the divide-and-conquer trick that made it fast enough to run everywhere.
- 18 Oct 2026 · 6 min readHow the Kalman filter worksHow a simple loop of predicting and correcting turns a stream of noisy measurements into an estimate better than any single reading.
- 18 Oct 2026 · 6 min readThe travelling salesman problem, explainedWhy finding the shortest round trip through a list of cities is so hard to solve exactly, and how good-enough answers are found anyway.
- 18 Oct 2026 · 6 min readWhat overfitting is, and how models avoid itWhy a model that matches its training data perfectly often predicts badly, and the techniques used to keep models honest.
- 17 Oct 2026 · 5 min readHow a Bloom filter worksHow a row of bits and a few hash functions can tell whether something has been seen before using a fraction of the memory a full list would need.
- 17 Oct 2026 · 4 min readHow Diffie–Hellman key exchange worksHow two strangers can agree on a shared secret key while everyone listens in, and why that idea underpins much of secure internet traffic.
- 17 Oct 2026 · 5 min readHow Hamming codes workHow a few carefully placed check bits let a computer find and fix a flipped bit on its own, instead of throwing the data away.
- 17 Oct 2026 · 4 min readHow Markov chains workHow a model that forgets everything except where it is right now can still describe text, card shuffles, random walks and complex probability problems.
- 17 Oct 2026 · 5 min readHow merge sort worksWhy splitting a list down to single items and then stitching the pieces back together is one of the most dependable ways to put data in order.
- 17 Oct 2026 · 5 min readHow quicksort worksHow picking one pivot value and splitting a list around it became one of the fastest and most widely used ways to sort data.
- 13 Oct 2026 · 6 min readHow backpropagation worksHow a neural network works out which of its many weights to blame for a wrong answer, and why doing that backwards saves so much work.
- 13 Oct 2026 · 6 min readHow decision tree learning worksHow a computer turns a table of examples into a flowchart of yes-or-no questions, how it picks each question, and why a forest of trees beats one.
- 13 Oct 2026 · 6 min readHow hash functions workHow a hash function squeezes data of any size into a short fixed-size value, why that makes lookups nearly instant, and what goes wrong when values collide.
- 12 Oct 2026 · 5 min readHow k-means clustering worksA step-by-step look at the simple loop that sorts data into k groups, why it can settle on the wrong answer, and how to choose k.
- 12 Oct 2026 · 5 min readHow tf–idf works: weighing words by how much they tell youWhy a word that appears everywhere says little, how tf–idf turns that idea into a score, and where it still shapes search.
- 12 Oct 2026 · 5 min readWhat algorithmic bias is, and how it gets into softwareHow unfair outcomes creep into automated decisions through data, design and use, with real cases from medicine, healthcare, policing and face recognition.
- 11 Oct 2026 · 5 min readHow simulated annealing worksWhy an optimization method that sometimes accepts worse answers on purpose can find better solutions than one that only ever moves uphill.
- 11 Oct 2026 · 6 min readHow the minimax algorithm worksWhy game-playing programs assume the opponent always plays its best reply, and how that one assumption turns a game tree into a single best move.
- 11 Oct 2026 · 5 min readHow the Monte Carlo method worksHow repeating a random experiment many times can estimate answers that are too hard to calculate directly, from the value of pi to the risk of a project.
- 10 Oct 2026 · 5 min readHow the Elo rating system worksHow a single number predicts who wins a chess game, why it moves after every result, and where the method stops being trustworthy.
- 10 Oct 2026 · 5 min readHow the Gale–Shapley algorithm worksHow a simple round of offers and tentative yeses pairs doctors with hospitals and students with schools so that nobody has a reason to break away.
- 10 Oct 2026 · 5 min readHow the tit-for-tat strategy worksWhy a rule that simply copies the other side's last move won two famous tournaments, and why a single misunderstanding can trap it in endless retaliation.
- 9 Oct 2026 · 6 min readHow A/B testing worksWhy splitting people at random into two groups is the most direct way to learn whether a change actually helps, and where the method quietly breaks.
- 9 Oct 2026 · 6 min readHow cache replacement policies workWhen a small, fast store fills up, something has to go. These are the rules computers use to decide what to throw out, and why no single rule always wins.
- 9 Oct 2026 · 6 min readHow Huffman coding worksHow a student's term paper produced a simple way to shrink data without losing a single bit: give common symbols short codes and rare ones long codes.
- 8 Oct 2026 · 6 min readHow Dijkstra's algorithm finds the shortest pathA plain guide to the shortest-path method behind route planners and internet routing, how it settles one place at a time, and where it stops working.
- 8 Oct 2026 · 5 min readHow gradient descent worksWhy the method that trains most machine-learning models is just repeated small steps downhill, and why choosing the step size is the hard part.
- 8 Oct 2026 · 5 min readHow public-key cryptography worksHow a pair of linked keys lets strangers exchange secrets and verify signatures without ever meeting, and where the system's real weak points lie.
- 7 Oct 2026 · 6 min readHow Bayesian inference worksHow Bayes' theorem turns a starting belief and new evidence into an updated belief, and why the starting point matters more than people expect.
- 7 Oct 2026 · 6 min readHow binary search worksHow halving a sorted list again and again finds any item in a handful of steps, and why the list has to be sorted first.
- 7 Oct 2026 · 7 min readHow the secretary problem works, and where the 37% rule comes fromWhy skipping roughly the first third of your options, then taking the next one that beats them all, gives the best odds of picking the very best.
- 6 Oct 2026 · 5 min readHow collaborative filtering works: recommendations from people like you"Customers who bought this also bought" is collaborative filtering at work. Here is how it finds people with your taste, why it needs so much data, and where it breaks down.
- 6 Oct 2026 · 5 min readHow PageRank works: the algorithm that ranked the web by its linksPageRank treats every link as a vote and weighs each vote by who cast it. Here is how that simple idea became the first engine of Google Search.
- 6 Oct 2026 · 5 min readThe multi-armed bandit: how algorithms decide when to explore and when to exploitKeep ordering your favourite dish, or try something new? The multi-armed bandit turns that everyday dilemma into mathematics, and the answers power trials, routing and recommendations.