J.P. Morgan Interview Question

string manipulation, leet code easy