Reviews
A binary search tree is useful because it keeps smaller keys to the left and larger keys to the right. Its performance depends on the tree’s shape, though.…
Datasets often contain far more measurements than a model needs. A customer record might include hundreds of product interactions, a medical dataset may hold…
Combinatorial programming often looks simple in a mathematical definition and expensive in a real program. A task may ask for every pair of products, every…
Depth-first search (DFS) is a fundamental algorithm for visiting the vertices of a tree or graph. It follows one path as far as possible before backtracking,…
A circular doubly linked list combines two useful properties: every node stores links in both directions, and the final node points back to the first. There is…
Reinforcement learning sits at a curious crossroads between psychology, control theory, and computer science. Rather than learning from a labelled dataset, an…
The knapsack problem sits at the heart of combinatorial optimisation, where the task is to choose a subset of items that maximises total value while staying…
Finding a single order statistic — like the median of a dataset or the fifth smallest value in a survey response — sounds straightforward, until the dataset…
A Merkle tree is a binary tree of hashes that lets you prove a piece of data belongs to a larger dataset without revealing the whole set. Every leaf node holds…
Python treats functions as first-class objects, which means a function can be passed to another function, returned from one, and stored in a variable. This…