Visa Inc. Interview Question

question on stacks and graphs