PayPal Interview Question

- Average DSA string problem and tried to understand my approach