Zenduty — SRE Puzzle of the week — Forgotten password

Zenduty — SRE Puzzle of the week — Forgotten password

Let’s say you have a safe, and you forgot the password. You know it is a four digit-password, and you don’t want to type 10,000 4-digit numbers into the safe.

The safe has the property that if the password is “1234”, you could type “01234” “85624359571234” and it would open; it only cares about the last 4 numbers pushed.

Write a function(in the comments section below) to produce a sequence of numbers to enter into the keypad. Do share the joy of puzzle-solving with your friends.