WRITING
Notes on building and running systems
Engineering write-ups — architecture, security, and the occasional war story.
#strings · All writing
Series
Tags
- #leetcode 50
- #array 13
- #dfs 11
- #bfs 9
- #dynamic-programming 9
- #recursion 9
- #trees 7
- #arrays 6
- #binary-search 6
- #hash-table 6
- #string 6
- #two-pointers 6
- #backtracking 4
- #dp 4
- #graphs 4
- #greedy 4
- #matrix 4
- #sliding-window 4
- #hash-map 3
- #heap-priority-queue 3
- #linked-list 3
- #stack 3
- #binary-search-tree 2
- #heap 2
- #math 2
- #memoization 2
- #priority-queue 2
- #sorting 2
- #strings 2
- #binary-tree 1
- #bit-manipulation 1
- #bucket-sort 1
- #counting 1
- #cycle-detection 1
- #divide-and-conquer 1
- #geometry 1
- #kadane 1
- #multi-source-bfs 1
- #prefix-sum 1
- #quickselect 1
- #simulation 1
- #string-matching 1
- #topological-sort 1
- #union-find 1
01
Group Anagrams: using sorted strings as bucket keys
LeetCode 49 takes the Valid Anagram check and turns it inside-out: instead of asking 'are these two strings the same?', you ask 'which bucket does each string belong to?' One hash map, one pass — O(n·m log m) without ever comparing strings to each other.Jun 13, 2026 · 10 min read · #00005
02
Valid Anagram: counting characters instead of comparing positions
LeetCode 242 moves the arrays-hashing reflex one step forward: instead of remembering whether you've seen a value, you count how many times you've seen it. The 26-element array trick is worth knowing cold.Jun 13, 2026 · 10 min read · #00004
Occasional notes on what I'm building
Get an email when I publish a new post — engineering write-ups, no spam. Unsubscribe anytime.