Number of Islands question

https://practice.geeksforgeeks.org/problems/find-the-number-of-islands/1

Segmentation Fault
@phantom