
A stack that checks nested brackets
Build a bracket checker that reports the first mismatched character, keeps opening positions on a stack, and states where a real parser needs more context.
The journal / Ideas in progress
Engineering & everyday learningSoftware, systems, and the things I’m learning along the way. From first principles to AI in production.
Find something to readA little theory. A lot of practice.

Build a bracket checker that reports the first mismatched character, keeps opening positions on a stack, and states where a real parser needs more context.

Use an exclusive prefix array to answer interval sums consistently, including empty ranges and negative values, and identify when updates make it unsuitable.

Precompute power-of-two range minima and answer each query with two overlapping blocks, then show exactly why the same shortcut double-counts sums.

Trace recursive calls through a directory-shaped tree, handle empty directories, and account for stack depth without treating a real filesystem as a simple tree.

Relate insertion-sort shifts to inversions, compare nearly sorted and reversed inputs, and explain why the definition of disorder matters more than one timing run.

Test a sorting comparator for consistent ties, reversed signs, and transitivity, then use a cyclic ordering example to show why adjacent checks can mislead.

Derive the comparison-sorting lower bound from permutation leaves, inspect the three-item case, and state why counting and radix sorting use a different model.

Build the same binary-search-tree keys in two insertion orders, compare path lengths, and identify when an unbalanced tree loses logarithmic lookup.

Trace separate chaining in a five-bucket phone book, distinguish a hash collision from a duplicate key, and explain the assumptions behind expected constant time.

Count the comparisons in a contact search, then see what changes when the list is sorted or indexed. A practical introduction to Big O with JavaScript.