Google Interview Question

Leet code problem with counting the islands.