Luke a Pro

Luke Sun

Developer & Marketer

🇺🇦
EN||
Common Algorithms & Engineering Selection

Common Algorithms & Engineering Selection

A strategic guide to algorithms for real-world software engineering, focusing on selection and trade-offs.

Graph Theory: Overview

Published: Sun Feb 15 2026
Graphs are not just dots and lines. They are the hidden structure of our world, modeling everything from social connections to city traffic.

Dijkstra's Algorithm

Published: Sun Feb 15 2026
Born from a 20-minute brainstorm without paper or pen, Dijkstra's algorithm remains the golden standard for finding the shortest path in a weighted world.

Bellman-Ford Algorithm

Published: Sun Feb 15 2026
While Dijkstra speeds ahead, Bellman-Ford takes the slow and steady path to handle a world where some roads might actually pay you back.

A* Search Algorithm

Published: Sun Feb 15 2026
The brain behind modern game navigation and GPS. A* balances the cost of the past with the promise of the future.

Floyd-Warshall Algorithm

Published: Sun Feb 15 2026
Unlike Dijkstra's focused sprint, Floyd-Warshall sits back and computes the distance between every pair of nodes in the universe, using the power of "middlemen."

Topological Sort

Published: Sun Feb 15 2026
The algorithm that decides the order of the universe. From putting on socks before shoes to compiling massive software projects, it ensures prerequisites are met.

Union-Find (Disjoint Set)

Published: Sun Feb 15 2026
The most efficient bureaucrat in computer science. It manages millions of items and can instantly tell you: "Who is your boss?"

Search & Retrieval: Overview

Published: Sun Feb 15 2026
Searching is the art of "not looking." From inverted indexes to vector spaces, we explore how to find a needle in a haystack of billions of items.

KMP Algorithm

Published: Sun Feb 15 2026
The reader who never looks back. KMP uses the memory of past successes to skip over redundant failures in string matching.

Trie (Prefix Tree)

Published: Sun Feb 15 2026
The mind behind Google's autocomplete. A Trie doesn't just search; it predicts the future by following the shared paths of human language.

Inverted Index

Published: Sun Feb 15 2026
The engine behind Google and Elasticsearch. By flipping the relationship between documents and words, it makes searching through billions of pages instantaneous.

Boyer-Moore Algorithm

Published: Sun Feb 15 2026
The genius who starts from the end. Boyer-Moore is the secret behind the fast "Ctrl+F" in your browser, skipping over text by looking at what doesn't match.

Levenshtein Distance

Published: Sun Feb 15 2026
The measure of human error. Levenshtein distance calculates the minimum number of edits required to turn one word into another.

Rabin-Karp Algorithm

Published: Sun Feb 15 2026
The algorithm of digital fingerprints. Rabin-Karp turns strings into numbers to find patterns at the speed of math.

Damerau-Levenshtein Distance

Published: Sun Feb 15 2026
The algorithm that understands "fat fingers." Damerau-Levenshtein adds the power of transposition to capture the most common human typing mistake.

MinHash & LSH

Published: Sun Feb 15 2026
The art of the sketch. MinHash and LSH allow us to find similar items in a sea of billions without looking at the details.

Vector Search (ANN)

Published: Sun Feb 15 2026
Searching by meaning. Vector search transforms concepts into coordinates in space, allowing us to find similarities that words alone cannot describe.

Sorting & TopK: Overview

Published: Sun Feb 15 2026
Sorting is more than just putting numbers in order. It is the act of creating truth from entropy, the foundation upon which all search and analysis are built.

QuickSort

Published: Sun Feb 15 2026
The speed demon of the algorithmic world. QuickSort uses radical partitioning to bring order to chaos at breathtaking speeds.

MergeSort

Published: Sun Feb 15 2026
The great unifier of the digital world. MergeSort brings stability to chaos by patiently combining small certainties into a single, massive truth.

HeapSort

Published: Sun Feb 15 2026
The living tournament. HeapSort brings order to chaos by forcing every element to compete in a hierarchical structure where only the strongest survive.

Quickselect (TopK)

Published: Sun Feb 15 2026
The lucky detective. Quickselect finds the K-th smallest element without sorting the entire list, saving massive computation through the "Art of Laziness."

External Sort

Published: Sun Feb 15 2026
The architect of massive data. External sort allows us to bring order to datasets that are far larger than our computer's memory, using the logic of "Batch and Merge."

Hashing & Probabilistic: Overview

Published: Mon Feb 16 2026
Hashing is the art of creating unique fingerprints for an infinite world. Probabilistic structures teach us that sometimes, being "mostly sure" is the only way to survive at scale.

Hash Functions

Published: Mon Feb 16 2026
The digital DNA. Hash functions turn any input into a unique fingerprint, providing the foundation for security, storage, and identity.

Hash Map

Published: Mon Feb 16 2026
The speed of light. HashMaps provide near-instant retrieval by turning keys into array indices, creating a world where search time is independent of data size.

Bloom Filter

Published: Mon Feb 16 2026
The sarcastic bouncer. Bloom Filters check if an item exists with incredible space efficiency, using the logic that "Maybe" is okay, but "No" must be absolute.

Consistent Hashing

Published: Sun Feb 15 2026
The secret behind scalable distributed systems: minimizing data migration when servers come and go.

Bloom Filter

Published: Sun Feb 15 2026
A probabilistic data structure that tells you if an item is "definitely not" in a set or "possibly" in it.

HyperLogLog

Published: Mon Feb 16 2026
The statistical oracle. HyperLogLog estimates the number of unique elements in a massive dataset with incredible memory efficiency, using the logic of "Coin Flips."

Cuckoo Filter

Published: Sun Feb 15 2026
A modern alternative to Bloom Filters that supports item deletion and offers better lookup performance.

Consistent Hashing

Published: Mon Feb 16 2026
The ring of equilibrium. Consistent hashing allows distributed systems to scale up or down without causing a massive data reshuffle, bringing peace to the cluster.

HyperLogLog (HLL)

Published: Sun Feb 15 2026
A miracle algorithm that counts billions of unique items with 98% accuracy using only 1.5 KB of memory.

Locality Sensitive Hashing (LSH)

Published: Mon Feb 16 2026
Birds of a feather. Unlike normal hashing, LSH ensures that similar items collide more often, making it the secret engine behind image search and recommendation systems.

Count-Min Sketch

Published: Sun Feb 15 2026
Estimating frequencies in massive data streams with minimal memory. The standard for finding "Heavy Hitters."

Caching & Eviction: Overview

Published: Tue Feb 17 2026
Caching is the art of forgetting. Because fast memory is expensive and small, we must constantly decide what to keep close and what to throw away.

LRU Cache

Published: Tue Feb 17 2026
The pragmatist. LRU assumes that if you were useful recently, you will be useful again. It ruthlessly discards the old to make way for the new.

LFU Cache

Published: Tue Feb 17 2026
The historian. LFU cares about loyalty, not timing. It keeps the items that have proven their worth over the long haul, protecting them from fleeting trends.

ARC Cache (Adaptive Replacement)

Published: Tue Feb 17 2026
The grand strategist. ARC dynamically balances between Recency (LRU) and Frequency (LFU), learning from its own mistakes to create the ultimate caching policy.

Paxos Algorithm

Published: Sun Feb 15 2026
The foundational proof of distributed consensus. Complex, rigorous, and the mathematical ancestor of all modern consistency protocols.

Vector Clocks

Published: Sun Feb 15 2026
Tracking the order of events and detecting conflicts in a system where no global clock exists.

Quadtree

Published: Wed Feb 18 2026
The zoom lens. Quadtrees efficiently store 2D space by recursively dividing dense areas into four smaller quadrants, ignoring the empty space.

K-D Tree

Published: Wed Feb 18 2026
The dimensional cutter. K-D Trees organize multi-dimensional data by alternating axes, allowing us to perform "Nearest Neighbor" searches efficiently in N-dimensional space.

Interval Tree

Published: Wed Feb 18 2026
The scheduler. Interval Trees bring order to time by organizing ranges, allowing us to instantly detect overlapping events and manage conflicts.

R-Tree

Published: Wed Feb 18 2026
The box packer. R-Trees organize complex shapes by grouping them into overlapping bounding boxes, serving as the engine behind almost every modern spatial database.

Segment Tree

Published: Sun Feb 15 2026
The universal tool for range queries and range updates. Solving $O(N)$ problems in $O(\log N)$.

Sparse Table

Published: Sun Feb 15 2026
Answering static Range Minimum Queries (RMQ) in constant $O(1)$ time after preprocessing.

Primes & Sieves

Published: Thu Feb 19 2026
The atoms of number theory. Primes are the unique building blocks of all integers, serving as the biological DNA of modern encryption.

Math & Geometry: Overview

Published: Sun Feb 15 2026
Fundamental mathematical tools for engineering: From efficient powers and encryption basics to geometric boundaries and random simulations.

GCD & Euclidean

Published: Thu Feb 19 2026
The great harmonizer. The Euclidean algorithm finds the common rhythm between two numbers, providing the foundation for simplifying the complex.

Modular Arithmetic

Published: Thu Feb 19 2026
The digital clock. Modular arithmetic creates a circular world where numbers wrap around, providing the foundation for hashing and encryption.

Bit Manipulation

Published: Thu Feb 19 2026
The switchboard. Bit manipulation allows us to speak the native language of the CPU, achieving ultimate performance through the control of 0s and 1s.

Binary Search Tree (BST)

Published: Fri Feb 20 2026
The double-edged sword. BSTs promise lightning-fast search by organizing data, but they carry a fatal flaw: without balance, they can degenerate into a slow line.

Trees & Hierarchies: Overview

Published: Fri Feb 20 2026
The architecture of power. Trees organize data into strict hierarchies, allowing us to conquer chaos by dividing it into smaller and smaller kingdoms.

Red-Black Tree

Published: Fri Feb 20 2026
The law enforcer. Red-Black trees use a system of strict rules and colors to ensure the tree remains balanced, powering the engines of modern software.

B-Tree

Published: Fri Feb 20 2026
The disk giant. B-Trees are designed for storage systems where reading is slow. By being short and fat, they minimize disk seeks, powering almost every database on earth.

Segment Tree

Published: Fri Feb 20 2026
The calculator of ranges. Segment Trees allow us to perform range queries (Sum, Min, Max) on dynamic arrays in logarithmic time, solving the problem of "Mutable Range Analysis."

Merkle Tree

Published: Sun Feb 15 2026
The "Hash of Hashes" structure that allows efficient and secure verification of massive datasets.

String Algorithms: Overview

Published: Sat Feb 21 2026
From search engines to DNA sequencing, string algorithms solve the problem of finding patterns in a sea of characters. This section explores the art of matching and compressing text.

Trie (Prefix Tree)

Published: Sat Feb 21 2026
The prophet of text. Tries store strings by their prefixes, allowing us to predict and complete words instantly as they are being typed.

KMP Algorithm

Published: Sat Feb 21 2026
The one-way dancer. KMP performs pattern matching without ever moving backwards in the text, using the knowledge of its own failures to skip ahead intelligently.

Levenshtein Distance

Published: Sat Feb 21 2026
The error measure. Levenshtein distance calculates the minimum number of single-character edits required to change one word into another, forming the basis of spell checkers.

Huffman Coding

Published: Sat Feb 21 2026
The tree of brevity. Huffman coding compresses data by assigning shorter binary codes to frequent characters and longer codes to rare ones, proving that efficiency comes from inequality.

Strategic Decision Making: Overview

Published: Sun Feb 22 2026
The art of choice. In this final section, we move beyond data structures to explore the high-level strategies used to solve complex problems by balancing memory, greed, and exploration.

Dynamic Programming (DP)

Published: Sun Feb 22 2026
The wise elder. Dynamic programming solves complex optimization problems by breaking them into overlapping subproblems and remembering the answers, ensuring no work is ever wasted.

Greedy Algorithms

Published: Sun Feb 22 2026
The short-sighted hunter. Greedy algorithms make the best possible choice at every individual step, hoping that local perfection will lead to a global masterpiece.

Backtracking

Published: Sun Feb 22 2026
The brave adventurer. Backtracking explores all possible paths to solve a problem, with the courage to turn back and try another route when it hits a dead end.

Divide & Conquer

Published: Sun Feb 22 2026
The divider. Divide and conquer manages complexity by breaking a large problem into independent sub-problems, solving them, and combining the results.