Lexicographically Minimal Leaf-to-Root String - Coding problem | OneNoughtOne