You need to select a class that is optimized for key-based item retrieval from both small and large collections.
Which class should you choose?
A.
OrderedDictionary class
B.
HybridDictionary class
C.
ListDictionary class
D.
Hashtable class
Explanation:
A HybridDictionary is implemented as a ListDictionary for small collections and a Hashtable for large collections. Hence it provides very efficient storage for both small and large collections.
OrderedDictionary supports sorting based on the key. It has similar disadvantages for small collections to Hashtable on which it is based.
ListDictionary is ideal for small collections because it is implemented as a light-weight linked list. Performance will suffer for large collections.
HashTable is ideal for large collections, for small collections the overheads of such a sophisticated data structure do not compensate for the benefits.
I have the same idea. B