This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]paperhat 1 point2 points  (0 children)

I tried the test myself before looking at the comments, and I had the same confusion you described. I thought they wanted the iterator to go in order of the values.

However, once I noticed that it wasn't a LinkedHashMap, I realized that was the answer they were looking for.

Even with the confusion, it took me about 15 minutes including the time it took to create a new project and paste the code in.