Klarna Interview Question

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