Remitly Interview Question

Similar to a leetcode hard problem utilizing backtracking.