...

/

DIY: Open Lock

DIY: Open Lock

Problem statement

You have an old lock in front of you with four circular wheels. Each wheel has ten slots: '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'. The wheels can rotate freely and wrap around. For example, we can turn '9' to be '0' or '0' to be '9'. Each move consists of turning one wheel one slot. Initially, the lock starts at '0000', a ...

Access this course and 1200+ top-rated courses and projects.

Create a free account to view this lesson.

By signing up, you agree to Educative's Terms of Service and Privacy Policy