US Foods Interview Question

Describe the characteristics of a Set, List, and Hashmap in Java

Interview Answer

Anonymous

Nov 11, 2017

List - O(1) insertion, O(n) lookup, repeats allowed Set - same as list but no repeats HashMap - O(1) insertion, O(1) average lookup O(n) worst case lookup repeat values but no keys