https://github.com/nelsonbn/algorithms-data-structures-linked-list
Algorithms and Data Structures - Linked List
https://github.com/nelsonbn/algorithms-data-structures-linked-list
algorithms algorithms-and-data-structures data-structures linked-list
Last synced: about 1 year ago
JSON representation
Algorithms and Data Structures - Linked List
- Host: GitHub
- URL: https://github.com/nelsonbn/algorithms-data-structures-linked-list
- Owner: NelsonBN
- License: mit
- Created: 2024-03-11T20:02:16.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-02T13:29:06.000Z (about 1 year ago)
- Last Synced: 2025-03-02T14:28:40.893Z (about 1 year ago)
- Topics: algorithms, algorithms-and-data-structures, data-structures, linked-list
- Language: Python
- Homepage:
- Size: 585 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Algorithms and Data Structures - Linked List
## Singly Linked List
**Node:**
```mermaid
classDiagram
class Node {
data
next
}
```
**Linked List:**
```mermaid
graph LR
A[Head] --> B[Node]
B --> C[Node]
C --> D[Node]
D --> E[Node]
E --> F[Node]
F --> G[Node]
```
## Demos:
- [Singly Linked List](./src/singly_linked_list.py)
- [Singly Linked List Operations](./src/singly_linked_list_operations.py)
- [Singly Linked List Operations Optimized](./src/singly_linked_list_operations_optimized.py) -> Some operations are optimized to O(1) time complexity. Example. Adding a node to the end of the list, length of the list.
- [Rotate Linked List](./src/rotate_linked_list.py)
- [Fast and Slow Pointer](./src/fast_and_slow_pointer.py)
- [Identifying Cycles](./src/identifying_cycles.py)
- [Floyd Cycle](./src/floyd_cycle.py)
### Rotating a Linked List

## References
- [Other Algorithms & Data Structures](https://github.com/NelsonBN/algorithms-data-structures)