Intel Corporation interview question

Leetcode 391. Perfect Rectangle (Hard)