Visa Inc. interview question

Common algorithm questions.