Software Engineer's Blog

Blog posts — page 4

271. Encode and Decode Strings

Coding Interview

271. Encode and Decode Strings

Jason Yang · 04 Aug, 2026

Encode and Decode Strings (LeetCode 271): why a delimiter alone can't work, and the length-prefix codec that round-trips any characters in Java.

269. Alien Dictionary

Coding Interview

269. Alien Dictionary

Jason Yang · 04 Aug, 2026

Alien Dictionary (LeetCode 269): turn a sorted word list into a character graph, then topologically sort it with Kahn's BFS in Java — cycles and prefixes included.

268. Missing Number

Coding Interview

268. Missing Number

Jason Yang · 04 Aug, 2026

Missing Number (LeetCode 268): why XOR-ing every index with every value leaves exactly the missing one, plus the Gauss-sum alternative, in Java.

261. Graph Valid Tree

Coding Interview

261. Graph Valid Tree

Jason Yang · 04 Aug, 2026

Graph Valid Tree (LeetCode 261): a tree is a connected, acyclic graph with exactly n-1 edges — solve it with union-find cycle detection in Java.

253. Meeting Rooms II

Coding Interview

253. Meeting Rooms II

Jason Yang · 04 Aug, 2026

Meeting Rooms II (LeetCode 253): find the minimum rooms by tracking peak overlap — the min-heap solution and the sweep-line trick, both in Java.