Visa Inc. Interview Question

The medium question was a DP question