827. Making A Large Island - Explanation

Problem Link