Picking a bike lock
Suppose you left your bike outside a coffee shop while you were working, and someone accidentally put a lock on it. The lock consists of 3 separate tumblers, and for simplicity, each tumbler only has 3 distinct letters in it. The lock can be represented in the following array:
the_lock = [
You're thinking about trying to crack the lock (rather than calling for help or walking home) -- given this information write a function to return all possible combinations that can be made by the lock.
Subscribe to premium account to see the solution.Get premium now