Creating ADT Data Strcutures In Python
singlyLinkedList.py :
This program creates a singly linked list and also has a menu to modify that list with seven options:
- Add Element (Tail Position)
- Add Element (Positioned)
- Add Header
- Delete Header
- Delete Element (Positioned)
- Get Data (Positioned)
- Change Data (Positioned)
With every option chosen, the list gets updated and diplays its content, along with its current length.
list_merger.py :
This program creates two dummy unordered linked lists and then merges them to create a ordered merged linked list while taking new inputs from the menu into the dummy list one or two and continuously updating both the unordered lists and the ordered merged list.
doublyLinkedList.py :
This program creates a doubly linked list with the following options:
- Add Element (Tail Position)
- Get Data
- Left Right Traverse Through List
With every option chosen, the list gets updated and diplays its content, along with its current length. If option three is choosen, we can traverse throughtout the doubly linked list, both to its left or right.
stackArrayImplementation.py :
This program creates an array implemented stack by taking the stack capacity/size as an input and displaying the current stack along with the following options to modify the stack:
- Push Data
- Pop Data
- Stack Current Size
- Stack Top Value
- Stack Base Value
- Stack Memory Information
queueLinkedListImplementation.py :
This program creates a linked list implemented queue by taking new data as input while displaying the current queue. The queue can be modified by the following function:
- EnQue
- DeQue
EnQue means adding new data to the queue, while Deque means removing data from the queue accordingly.
binarySearchTree.py :
This program creates a binary search tree by adding new elements into the tree from the use input while displaying the tree in 2 different ways:
- Tree Level Display (Default)
- Data Left Right Display