Visa Inc. Interview Question

2 easy leetcodes, 1 medium, 1 hard