Writing
Notes on building things and figuring them out.
Quicksort in C and the importance of the pivot
Partition an array around a pivot, recurse on both sides, and see how pivot choice shapes best and worst cases.
Merge sort in C from split to merge
Divide an array into smaller ranges, merge them in order, and account for the extra memory behind predictable performance.
Selection sort in C and its fixed cost
Repeatedly select the smallest remaining value, place it in order, and examine the trade-off between few writes and many comparisons.
Bubble sort in C and why it stays useful for teaching
Trace adjacent swaps through an array, add an early-exit optimization, and calculate the algorithm's real cost.
Insertion sort in C, one element at a time
Grow a sorted prefix in place and see why insertion sort performs well on small or nearly sorted inputs.
Jump search on a sorted array
Move through fixed-size blocks, then scan the likely block to find a value in roughly square-root time.
Prefix lookup with a trie in C
Store strings by character path, then implement insertion and lookup whose cost follows word length rather than collection size.
Building a hash table in C
Put hashing, collision handling, insertion, and lookup together in a compact implementation you can reason about.
Page 2 of 4