Visa Inc. interview question

2 leetcode medium code challenges