LeetCode 3394 - Check if Grid can be Cut into Sections

LeetCode 3394: Check if Grid can be Cut into Sections (Medium)

LeetCode Problem 3394

Difficulty: 🟡 Medium
Topics: Array, Sorting

Solution