leetcode 753. Cracking the Safe 全排列获取保险箱密码+深度优先遍历DFS + 贪心策略
There is a box protected by a password. The password is n digits, where each letter can be one of the first k digits 0, 1, …, k-1.You can keep inputting the password, the password will automatically be