Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 753. Cracking the Safe
Find the shortest string over digits 0..k-1 such that every possible length-n password appears as a contiguous substring (i.e., produce a de Bruijn sequence of order n on k symbols). This is typically solved by building the de Bruijn graph of k^{n-1} nodes and finding an Eulerian cycle (Hierholzer's algorithm).
Asked at:
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Late September, 2024
Junior
Implement a password cracking system
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.