Dynamic Array in C: Building a Growable Vector with realloc
How a dynamic array grows in C: the size and capacity pair, what the growth factor costs in copies and waste, and the realloc mistakes ASan catches.
How a dynamic array grows in C: the size and capacity pair, what the growth factor costs in copies and waste, and the realloc mistakes ASan catches.
How a sentinel node removes the boundary cases, why the second pointer makes removal O(1), and what circular lists buy in rotation and reverse walks.
How adjacency matrices and adjacency lists compare in memory, how BFS and DFS walk a graph, and why recursive DFS overflows the stack on long paths.
How a binary heap backs a priority queue, why the standard libraries disagree about the top, and what the heap buys over a sorted array in practice.
How ordered operations, rank and select work on a binary search tree, why sorted input turns it into a list, and what the three delete cases cost.
What each type of data structure stores, how fast its operations run, which one to choose, and what C, C++, Java, Python and C# provide.
How chaining and open addressing behave at four load factors, why deletion needs tombstones, and what a weak hash costs on 50,000 real-looking keys.
Three queue layouts in five languages: what each costs in memory and time, and why a circular queue needs a count, a spare slot or a flag.
Learn what Matplotlib is and how to use it to plot learning curves, residuals, confusion matrices, ROC and calibration, with the numbers behind each.
K-means groups data around k centres. Build it and k-means++ from scratch in Python and C++, choose k, and see when smart seeding actually helps.
Learn what pandas is and how to use it to load, clean and split a dataset for machine learning, including the measured cost of a leakage mistake.
Learn what NumPy is and how to use it to work with arrays, broadcast operations and vectorize a distance matrix, with the measured cost of a silent bug.