String
1415. The k-th Lexicographical String of All Happy Strings of Length n
A "happy" string of length n uses 'a','b','c' with no two adjacent letters equal; return the k-th such string in lexicographic order (empty if fewer than k exist). Since happy strings are few for…
Loading…