Data Structures


This project is a simplified version of a generic Linked List data structure. More specifically this code is an implementation of a double linked list that contais only the essential methods need to construct and operate on the list. In a double linked list each node in a list contains a pointer to next node in the list and a pointer to the previous node in the list. Because of this we can traverse the list in either directios - from first node to the last node, or from the last node to the first node in the list.


This project is a simplified version of a generic Binary Search Tree data structure. More specifically this code is an implementation of a binary tree that contais only the essential methods need to construct and operate on the tree. Binary Search Tree consists of nodes that have a key value pair and two pointers that point to the left subtree and to the right subtree. The property of a binary tree is that the nodes having smaller key are stored to the left side and the nodes with higher key in comparison to the parent node are stored to the right subtree. Insertion, removal and get methods are all done iteratively. This implementation also freatures preorder, inorder, postorder, and level order traversals that are also done iteratively.

Figure 1a: Adding nodes.

Figure 1b: Removing node 22.

Figure 1c: Removing root and node 7.

Figure 1d: Removing root, 19, 11.