Writing
Notes on building things and figuring them out.
Depth-first search in C, recursively
Follow a graph branch to its end, backtrack safely, and implement the traversal with an adjacency matrix.
Interpolation search and the data it works for
Estimate where a value sits in a sorted array, implement the search in C, and see why distribution determines performance.
Breadth-first search in C with a queue
Traverse a graph level by level, track visited vertices, and understand the cost of adjacency-matrix storage.
Linear search in C, without the ceremony
Walk an unsorted array, return the matching position, and understand exactly when a linear scan is the right choice.
Finding the one unique value in an array
Use counting, sorting, and XOR to isolate a value that appears once while every other value appears twice.
Binary search in C: halving the search space
Implement iterative binary search and see why sorted input turns a linear scan into logarithmic work.
Heap sort in C++: from heapify to a sorted array
Build a max heap, move each root into place, and account for heap sort's time and space costs.
Compressing strings with Huffman coding
Build a frequency tree, assign variable-length codes, and use them to compress and reconstruct a string.
Page 3 of 4