Reviews
String searching sits beneath search boxes, document pipelines, and command-line tools. A developer may first reach for Python’s in operator or str.find, but…
Quickselect finds the kth element in an unsorted collection by rearranging only the portions relevant to the requested rank. It returns the value that would…
Radix sort is a family of sorting algorithms that orders integers by processing their digits or fixed-width parts. Unlike comparison-based methods such as…
Dijkstra’s algorithm finds a shortest path in a weighted graph when every edge cost is non-negative. For a route, an edge might represent a road segment and…
String pattern matching asks a deceptively simple question: where does a shorter sequence first appear inside a longer one? A text editor using find, a…
Shortest-path questions arise whenever a route must be chosen between several places. A delivery driver needs the quickest path to a parcel, a game maps…
Bellman-Ford solves the single-source shortest-path problem for a weighted graph, returning the minimum total cost from one source vertex to every reachable…
The 0/1 knapsack problem asks you to select a subset of items so their total weight does not exceed a capacity while their total value is as large as possible.…
A prefix tree, usually called a trie, makes autocomplete a character-by-character traversal instead of a full scan of a word list. Given the prefix melb, it…
A binary heap is a complete binary tree arranged so every parent precedes its children in the required order. In a min-heap, each parent is no greater than its…