Fidelity Investments interview question

Some string related coding task