ZopSmart interview question

Uncrossed lines leetcode question number 1035