Minimal Flipping - Quant Interview Question