Skip to Content
C# Data Structures and Algorithms
book

C# Data Structures and Algorithms

by Marcin Jamro
April 2018
Intermediate to advanced content levelIntermediate to advanced
292 pages
6h 44m
English
Packt Publishing
Content preview from C# Data Structures and Algorithms

Dictionaries

The topic of the fourth chapter is related to dictionaries and sets. First, let's take a look at a dictionary, which allows mapping keys to values and performing fast lookups. A dictionary uses a hash function and can be understood as a collection of pairs, each consisting of a key and a value. There are two built-in versions of a dictionary, namely non-generic (Hashtable) and generic (Dictionary). The sorted variant of a dictionary (SortedDictionary) is available, as well.

The mechanism of the hash table is presented in the following diagram:

Due to the great performance of the hash table, such a data structure is frequently ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Beginning Data Structures and Algorithms in C#

Beginning Data Structures and Algorithms in C#

Marcin Jamro

Publisher Resources

ISBN: 9781788833738Supplemental Content