Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/duketheduck1/dsa
Implementation of dsa for my own practice
https://github.com/duketheduck1/dsa
Last synced: about 1 month ago
JSON representation
Implementation of dsa for my own practice
- Host: GitHub
- URL: https://github.com/duketheduck1/dsa
- Owner: duketheduck1
- Created: 2024-07-19T20:12:48.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-09-10T15:37:44.000Z (5 months ago)
- Last Synced: 2024-09-10T18:34:51.342Z (5 months ago)
- Language: Python
- Homepage:
- Size: 45.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Data Structure Implementations
This repository contains implementations of basic data structures in Python.
## Data Structures Implemented
### 1. Linked List
A Linked List is a linear data structure where each element is a separate object, called a node. Each node contains data and a reference (or link) to the next node in the sequence. The time complexity for searching is O(n), inserting is O(1) if the node reference is known (O(n) if searching is needed), and deleting is O(1) if the node reference is known (O(n) if searching is needed).### 2. Queue
A Queue is a linear data structure that follows the First In, First Out (FIFO) principle. Elements are added at the rear and removed from the front. The time complexity for enqueue and dequeue are O(1).### 3. Stack
A Stack is a linear data structure that follows the Last In, First Out (LIFO) principle. Elements are added and removed from the top of the stack. The time complexity for push and pop operations is O(1).### 4. Hash Table
A Hash Table is a data structure that maps keys to values using a hash function. It allows for fast data retrieval through an index-like lookup, with the average time complexity for search, insert, and delete operations being O(1).### 5. Binary Search
Binary Search is an efficient algorithm for finding a target value within a sorted array. It repeatedly divides the search interval in half, comparing the target value to the middle element. If they match, the search ends; otherwise, the search continues in left side or right side, with a time complexity of O(log n) space complexity for iterative method is O(1) while space complexity for recursive method is O(logn).