Mastercard interview question

quesns in dsa and oops asked