Canva Interview Question

Solve a pointless puzzle-ish algorithm in 60 minutes on HackerRank