https://github.com/grantgasser/linked-list
Linked List in Python
https://github.com/grantgasser/linked-list
binary-tree linked-list oop
Last synced: 10 months ago
JSON representation
Linked List in Python
- Host: GitHub
- URL: https://github.com/grantgasser/linked-list
- Owner: grantgasser
- Created: 2019-07-18T00:42:46.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-09-11T03:02:49.000Z (almost 7 years ago)
- Last Synced: 2025-04-03T04:18:23.951Z (about 1 year ago)
- Topics: binary-tree, linked-list, oop
- Language: Python
- Size: 21.5 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Summary
This started as a practice project to implement a linked list in Python. Having learned data structures in C++, I wanted to see how to implement them in Python as I learn more about OOP in Python.
This project is also an exercise in seeing how interrelated common data structures are. For example, a linked list can be implemented as a stack. Also, a binary search tree can be built using the core functionality (nodes and pointers) of a linked list. Additionally, a tree can also be thought of as a graph where the nodes and pointers are vertices and edges.
The project will probably be renamed, since linked-list will no longer be very descriptive. This is an experimental project.
## Linked List (base of the project)
Using the Node class, the List class just contains a head. It has methods that allow it to retrieve the head, append new data, get data at a certain position, insert, delete, reverse, and more.
## Stack
Inherits from the Linked List class.
## Tree Node
Inherits from Node class used for linked lists.
## Binary Search Tree
Using the tree node class, creates a binary search tree with given data.