Medium logic-puzzles interview practice: King's Salary.
Explore this problem with a Quantercise subscription.