Leetcode 2742. Painting the Walls | Hello Interview