At the backbone of every program or piece of software are two entities : data and algorithms. Data structures are the way we can store and retrieve data, they represent the knowledge to be organized in memory. No matter what problem are we solving, in one way or another we have to deal with them : learning data structures is essential !
We need to use stored information, a memory, to be able to live. The data structures that exist in programming languages are pretty similar to real-world systems that we use outside of the digital sphere.
Let us say you are to find a specific book in an unorganized library; that task would take an enormous amount of time. Just like a library organizes their books, we need to organize our data so that operations can be performed efficiently. Choosing the wrong data structure can result in slow or unresponsive code and mess up our program !
Understand the differences between common data structures Select our data structure properly to suit our purpose Create our own data structures
In this course, we will look at the core data structures used in everyday applications. We will discuss the trade-offs involved with choosing each data structure, along with traversal, retrieval, and update algorithms.
What is next?
Arrays and linked lists are the two fundamental data structures in the programming world. After understanding them and their differences, we may start playing with algorithms such as searching and sorting, or go with more advanced data structures such as : stacks, queues, binary trees or hash tables.
This cheat sheet provides a pretty good summary of the basic containers. See the flowcharts below as a guide on which to use in different usage scenarios.
Note: It particularly fits the C++ standard containers but remains true for all languages as an abstract data structure is a concept (and not just an implementation).
Updated version with the modern C ++ STL containers (by Mikael Persson from David Moore's original).