Indeed Interview Question

Typical coding question involving strings