Summary
This chapter focused on hash tables, dictionaries, and sets. All of these collections are interesting data structures that can be used in various scenarios during the development of many applications. By presenting such collections with detailed descriptions, performance explanations, and examples, you saw that choosing a proper data structure is not a trivial task and requires analyzing performance-related topics.
First, you learned how to use two variants of a hash table, namely non-generic and generic. The huge advantage of these is a very fast lookup for a value based on the key, which is the close O(1) operation. To achieve this goal, the hash function is used. Moreover, the sorted dictionary was introduced as an interesting solution to solve the problem of unsorted items in the collection and to keep keys sorted all the time.
Afterward, the high-performance solution to set operations was presented. A set can be understood as a collection of distinct objects without...