Klarna interview question

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