1415. The k-th Lexicographical String of All Happy Strings of Length n - Explanation

Problem Link