I wouldn't worry about being an Impostor.
I wouldn't worry about being an Impostor.
Both started out by looping over the items in the dict and stopping at the correct one. Asking if there was a simpler way to get values out of dict didn't help.
The third candidate really didn't get far enough to get the dict wrong so I counted them as well but they may have known how to do a dict lookup.
Here is the exercise:
Given these dicts:
{"a":[1,2],"b":[3,4],"z":[5]} {"a":[66],"b":[77]}
Write a program in language of your choice that sums the common keys.
a and b are common so result is:
{"a":1+2+66,"b":3+4+77}
so output should be:
{"a":69,"b":84}
This exercise is stupid simple. Note this is in an IDE/Editor, not a whiteboard.
I've had people fail the "tell me if these two strings are anagrams" thing, with one person's response being to have 26 counters, one for each letter.
You don’t see them at startups or at companies with solid technical reputations.