Example – definitions

As an example, you will create a simple encyclopedia, where you can add entries, as well as show its full content. The encyclopedia can contain millions of entries, so it is crucial to provide its users with the possibility of browsing entries in the correct order, alphabetically by keys, as well as finding entries quickly. For this reason, the sorted dictionary is a good choice in this example.

The idea of the encyclopedia is shown in the following diagram:

When the program is launched, it presents a simple menu with two options, namely [a] - add and [l] - list. After pressing the A key, the application asks you to enter ...

Get C# Data Structures and Algorithms now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.