Bloomberg Interview Question

Numbers of Islands (Get Perimeters); Candy Crush; Min Stack