Domanda di colloquio di Safaricom

Write an algorithm to solve a simple string problem