Amazon Interview Question

problem : number of islands