Data structures are a way of organizing data. Data structures can be used to efficiently:
- store and retrieve information;
- search information;
- keep data ordered;
- solve problems.
I personally like to divide them into four categories:
- Lists: Simple Linked List, Double Linked List, Circular List etc;
- Hashtables: Hashtable, Dictionary, Map etc;
- Trees: Binary Search Tree, AVL Tree, B Tree, Heap etc;
- Graphs: Linked List Graph, Matrix Graph etc;
The code is compiled using CodeBlocks with MinGW compiler because it’s freeware. You can of course use any other C compiler or IDE such as: Microsoft Visual Studio, C++ Builder etc.
C Data Structures
The below links should be read in order because simpler data structures serve as backing for more complex ones.
C Linked List
- Creating a linked list.
- Add node to beginning of list.
- Inserting a node after a certain position.
- Inserting a node before a specified position.
- Deleting a node at a certain position.
- Deallocating the memory used by the linked list.