Walmart Interview Question

Standard backtracking Leet Code question