Visa Inc. Interview Question

Leetcode Medium, something about ladders