An open API service indexing awesome lists of open source software.

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

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.