C3 AI interview question

Num of Islands leetcode problem