Bloomberg Interview Question

Program a Candy Crush algorithm in one dimension