Problem: A safe has a password of digits where each digit is to . Find the shortest string that contains all possible passwords as substrings.
Link: LeetCode 753
Example: , . Passwords: . Answer: "" (length ).
Connection: This is the De Bruijn sequence problem generalized to alphabet size . Build a De Bruijn graph and find an Euler circuit.