Orange Interview Question

Empty island problem