Visa Inc. interview question

leetcode questions were 2 easy and 2 medium