/data-structures

Common data structures written in C

Primary LanguageC

Data-Structures

Common data structures written in C.

Content:

Linked list:

 Add(Node** list, int value)
 Delete(Node** list, int keyValue)
 Sort(Node* list)
 DisplayList(Node* list)

More linked list functions:

 CopyList(Node* list, Node** newList)
 DeleteRepeated(Node* list)

Queue implementation:

 Enqueue(Node** head, Node** tail, int value)
 Dequeue(Node** head, Node** tail)

Binary tree implementation:

 Add(Node** currentNode, int value)
 Search(Node* currentNode, int key)
 PrintPreOrder(Node* currentNode)
 PrintInOrder(Node* currentNode)
 PrintPostOrder(Node* currentNode)

P.S:

These examples are merely for educational purposes, and they cannot be used in real-life applications as they do not have any defensive-coding techniques.

References:

Deitel, Paul, and Harvey Deitel. C How To Program. 6th ed. Pearson, 2010. Print.