Visa Inc. interview question

complete or shorten the given code