Programming Fundamentals
Data structures, algorithms and core concepts.
Basics
How Binary Search Works: Halving Your Way to Any Value
Binary search finds a value in a sorted list by halving the search range each step, needing about log2 n comparisons. Here is how it works, with code.
BasicsHow Hash Tables Work: Average Constant-Time Lookups Explained
A hash table turns keys into array positions with a hash function, giving average constant-time lookups. Learn collisions, load factor and resizing.