Visa Inc. Interview Question

One string manipulation and one graph