Bomb Disarming


Story

Hello again, Agent Double-Null0111.

The forces of UMBRA are acting up again, and it is up to you to foil their latest scheme. Our intelligence branch informs us that those Minions are planning to set off a stink-bomb at the Governor's ball.

Since the minions are so clumsy, they often accidentally arm the stink-bombs in their labs and offices. And because they keep forgetting how to disarm their stink-bombs, they have implemented a system to generate the disarming instructions that list the order the wires must be cut from the bomb's ID number.

Your job is to write the code that will allow you to disarm the stink-bomb at the ball before it goes off.

Tasks

These are example tasks that fit the story of the secret agent disarming a stink-bomb:

  • Write a closure to flip two wires
  • Write a closure to rotate the wires
  • Implement a wire shuffle generator

Implementations

Reference