Book Image

C# Data Structures and Algorithms

By : Marcin Jamro
Book Image

C# Data Structures and Algorithms

By: Marcin Jamro

Overview of this book

Data structures allow organizing data efficiently. They are critical to various problems and their suitable implementation can provide a complete solution that acts like reusable code. In this book, you will learn how to use various data structures while developing in the C# language as well as how to implement some of the most common algorithms used with such data structures. At the beginning, you will get to know arrays, lists, dictionaries, and sets together with real-world examples of your application. Then, you will learn how to create and use stacks and queues. In the following part of the book, the more complex data structures will be introduced, namely trees and graphs, together with some algorithms for searching the shortest path in a graph. We will also discuss how to organize the code in a manageable, consistent, and extendable way. By the end of the book,you will learn how to build components that are easy to understand, debug, and use in different applications.
Table of Contents (14 chapters)

Installation and configuration of the IDE


While reading the book, you will see many examples presenting data structures and algorithms, together with detailed descriptions. The most important parts of the code will be shown directly in the book. Moreover, complete source code will be available to download. Of course, you can only read the code from the book, but it is strongly recommended to write such code on your own, and then launch and debug the program to understand how various data structures and algorithms operate.

As already mentioned, the examples shown in the book will be prepared in the C# language. To keep things simple, the console-based applications will be created, but such data structures could be used in other kinds of solutions as well.

The example projects will be created in Microsoft Visual Studio 2017 Community. This Integrated Development Environment (IDE) is a comprehensive solution for developing various kinds of projects. To download, install, and configure it, you should:

  1. Open the website https://www.visualstudio.com/downloads/ and choose the Free download option from the Visual Studio Community 2017 section just below the Visual Studio Downloads header. The download process of the installer should begin automatically.
  2. Run the downloaded file and follow the instructions to start the installation. When the screen presenting possible options is shown, choose the .NET desktop development option, as shown in the following screenshot. Then, click Install. The installation could take some time, but its progress could be observed using the Acquiring and Applying progress bars.
  1. When the message Installation succeeded! is shown, click on the Launch button to start the IDE. You will be asked to sign in with the Microsoft account. Then, you should choose suitable Development Settings (such as Visual C#) in the Start with a familiar environment section. Moreover, you should choose the color theme from Blue, Blue (Extra Contrast), Dark, and Light. At the end, click on the Start Visual Studio button.