Meta Interview Question

Similiar to the Walls and Gates on leetcode