Pregunta de entrevista de Klarna

2 Basic string manipulation questions, 1 shortest path without weights.