Reference: Bradford Tuckfield,
Dive Into Algorithms
Coded with Qwen 3.8 27B