Visa Inc. Interview Question

Pseudo code questions which was kinda basic