Canva Interview Question

A back-tracking algorithm problem, medium difficulty on LeetCode