Canva interview question

It was leetcode style DSA question