IDZ Digital Interview Question

Classical jug problem, factorial recursive code