Ironically, it looks like the exception comes from the test runner code, not your code. That probably means you did not return the correct results. Could you show me the prompt? I am trying to determine what they wanted you to return.
Also, check out Map’s getOrDefault
and entrySet
methods.