TikTok Interview Question

leetcode problem 752. Open the Lock