LeetCode
Making A Large Island
Click
here
for an explanation.