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

Solution Code
Video GuideLeetcode Daily

Time Complexity

O(k · n). We build up to k strings, doing n work for each.

Space Complexity

O(n for the recursion stack and the string builder).