![]() The employee uses this number to search and find your jacket to give back to you. When the event is over, on your way out, you give them back the same number. The employee than takes your jacket and gives you a number. When you go to a theatre, opera or a concert, there is usually a place where you can leave your outdoor clothing. ![]() We are going to illustrate what exactly the data structure dictionary means using an everyday, real world example. The elements of the dictionary are represented by pairs (key, value), where the key is used for searching. The analogy with the real world dictionary comes from the fact, that in every dictionary, for every for word ( key), we also have a description related to this word ( value).Īs well as the data (values), that the dictionary holds, there is also a key that is used for searching and finding the required values. Both the key and the value represent a pair. ![]() Every element in the dictionary has a key and an associated value for this key. In this book we are going to use the terminology "dictionary". ![]() The dictionaries are also known as associative arrays or maps. In this chapter we will get familiar with the so called " dictionaries", which are extremely useful and widely used in the programming. In the last few chapters we got familiar with some classic and very important data structures – arrays, lists, trees and graphs.
0 Comments
Leave a Reply. |