The basic aim of mycplus.com website was to develop a website for students of C/C++ and data structures. There are lots of tutorials and source code covering different aspects of C/C++ programming language. Today I have decided to write few articles about data structures and their implementation in C/C++.
National Institute of Standards and Technology (NIST) defines data structure as
“An organization of information, usually in memory, for better algorithm efficiency, such as queue, stack, linked list, heap, dictionary, and tree, or conceptual unity, such as the name and address of a person. It may include redundant information, such as length of the list or number of nodes in a subtree.”
A data structure is a way of storing and retrieving data efficiently. There are two main objectives to study data structures. First one is to identify and develop useful entities and operations and decide what type of problems can be solved with these entities and operations. The second one is to decide how to represent those entities and implement operations on those representations.
There are two types of data structures are available to C/C++ programmers. One type of data structures are already built into C/C++ programming languages. These can be Arrays, Structures and classes. Other one is complex data structures that can be implemented using built in data types and structures in C/C++ programming languages. Some of the examples of these data structures are Stack, Queue, Linked List, Tree and Graph.
Sometimes built in data structures do not fulfil the requirements and we have to implement our own data structures. All of these complex data structures have their own strengths and weaknesses. Also they have their own usage in real life computer applications. Efficiency of these data structures can be measured by two factors (Time, Space).
- First one is the time taken to complete the instruction and give the output.
- If an application uses large amount of the structures, thus it will take more space to store and represent these structures.
In the coming articles I will try to explain the theory of each of data structures along with C/C++ code examples. Also I will try to implement the complete data structure in either C or C++ and provide the complete source code along with the article. So keep an eye on the website or subscribe to RSS Feed to become a regular reader so that you can get updates automatically. You can also get Email Updates by following this link.