Upside Interview Question

The Coderpad part: string related problems