Leetcode 3311. Construct 2D Grid Matching Graph Layout | Hello Interview