Hard logic-puzzles interview practice: Arabian Sultan.
Explore this problem with a Quantercise subscription.