pl
e
structure is set at the beginning of the program and cannot be changed. This is very limiting (and inefficient) because it means that you have to know in advance how large your data structure needs to be. However, static data structures are easy to program and you always know how much space they will take up. In contrast, dynamic data structures do not have a limited size and can expand or shrink as needed. They also tend to be more complex to implement.
ft
sa
m
It is also very common for more complex data structures to be made of simpler ones. For example, it is normal practice to implement binary trees using a linked list or create a stack by using an array. It is important to remember however that data structures can be implemented in different ways. The idea behind a data structure, or the abstract data type, is the important aspect to learn. How the data structure is implemented is up to the person coding the implementation. There are many ways of implementing the same data structure.
D
ra
You will need to perform various operations on your data, such as inserting, sorting or searching data. The efficiency of such operations varies depending on the data structure in use. Generally speaking, you want to use the most efficient data structure possible. This is particularly important when you have large data sets. Your choice of data structure can have a big impact on the run time of your program. You can find out about the efficiency ratings of the data structures (using Big O notation) you need for A-Level in the ‘Further reading’ section at the end of this chapter. "******ebook converter DEMO - www.ebook-