First implementation, recursion, unordered_map