O'Reilly logo

C# Data Structures and Algorithms by Marcin Jamro

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Example – product location

The first example is the application that helps employees of a shop to find the location of where a product should be placed. Let's imagine that each employee has a phone with your application, which is used to scan the code of the product and the application tells them that the product should be located in area A1 or C9. Sounds interesting, doesn't it?

As the number of products in the shop is often very high, it is necessary to find results quickly. For this reason, the data of products together with their locations will be stored in the hash table, using the generic Dictionary class. The key will be the barcode, while the value will be the area code, as shown in the following diagram:

Let's take a look at the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required