Domanda di colloquio di H&R Block

Simple two pointer and another LC medium question on string