What this averaging and constraint puzzle tests
This is a medium-difficulty puzzle that combines arithmetic reasoning with integer constraints. It appears frequently in quant interview loops as a warm-up problem that rewards careful algebra and attention to feasibility conditions.
To solve it, you need to set up equations based on the average-height condition after the swap, then recognize that the number of creatures in each room must be a positive integer. The puzzle hinges on finding the smallest total population that satisfies both the mathematical constraint and the integer requirement. Many candidates arrive at the right equation but miss the additional step of minimizing the total, or fail to verify that their solution is actually feasible.
- Setting up equations from average and total constraints
- Integer and feasibility conditions in optimization
- Working backwards from a symmetric or balanced outcome