A frequently asked question in a Java interview is: How to implement a Java HashMap? Java job seekers must fully grok this important concept if they want to ace the interview. The HashMap tutorial ...
It might work for a List, depending on implementation. But looking up something in a list requires iterating anyway, so you don't really gain anything. It probably won't work at all for a Set, because ...