Meta interview question

Backtracking leetcode hard, hashmap medium