Tagged articles

Lexicographical Order

1 articles · Page 1 of 1
IT Services Circle
IT Services Circle
Sep 13, 2026 · Fundamentals

LeetCode 761: Special Binary String — Recursive Decomposition & Custom Sort Proof

This article analyzes LeetCode 761 Special Binary String, proving that valid strings decompose into minimal '1...0' units, then achieves maximum lexicographical order through recursive substring sorting and a custom comparator proven to satisfy total order properties (completeness, antisymmetry, transitivity), with Java, C++, and TypeScript implementations.

AlgorithmCustom SortingLeetCode 761
0 likes · 12 min read
LeetCode 761: Special Binary String — Recursive Decomposition & Custom Sort Proof