Leetcode 2532. Time to Cross a Bridge | Hello Interview