
Two pointers for merging sorted attendance lists
Merge sorted attendance records with two pointers while preserving duplicates and stable ties, then prove linear work and distinguish a merge from set union.
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.

Merge sorted attendance records with two pointers while preserving duplicates and stable ties, then prove linear work and distinguish a merge from set union.

Choose algorithm tests from an argmax contract, expose negative-value and tie bugs, and combine exact examples with exhaustive checks and useful properties.

Implement lower-bound binary search with a half-open interval, prove its boundaries, and test empty arrays, duplicates, and the insertion point after the last value.

Build a small prefix trie with explicit terminal markers, return limited suggestions in alphabetic order, and include output size in the query cost.

Compare array shifts and linked-list pointer changes for a concrete editor workload, including the cost of finding the insertion point and retaining a cursor.

Compare a fixed invoice workflow with a repository investigation to decide where dynamic agent behavior earns its execution cost and complexity.

Model a single FIFO help desk with explicit arrival ties, start times, waiting times, and idle periods, then separate service order from event scheduling.

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.

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.

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.