Canva interview question

Round 2 Q: Solve a leetcode easy-medium problem