3394. Check if Grid can be Cut into Sections - Explanation

Problem Link