Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shnartho/python-dsa
Important data structures and algorithm in python
https://github.com/shnartho/python-dsa
Last synced: about 6 hours ago
JSON representation
Important data structures and algorithm in python
- Host: GitHub
- URL: https://github.com/shnartho/python-dsa
- Owner: shnartho
- Created: 2023-10-10T23:41:47.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-23T14:36:30.000Z (about 1 year ago)
- Last Synced: 2023-10-23T20:38:48.414Z (about 1 year ago)
- Language: Python
- Size: 32.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Important Data Structures and Algorithms in Python 🎉
### Data Structures:
- **Arrays:** Fixed-size, contiguous memory data structure.
- **Lists:** Dynamic arrays (ArrayList, LinkedList).### Hashing:
- **Hash Tables:** Map keys to values for efficient retrieval and insertion.
- **Hash Maps:** Key-value store with constant-time average lookup.
- **Hash Sets:** Set of unique elements with constant-time membership check.### Stacks and Queues:
- **Stack:** Last-In-First-Out (LIFO) data structure.
- **Queue:** First-In-First-Out (FIFO) data structure.### Linked Lists:
- **Singly Linked List:** Elements linked in one direction.
- **Doubly Linked List:** Elements linked in both directions.### Trees:
- **Binary Tree:** Each node has at most two children.
- **Binary Search Tree (BST):** Left subtree < root, right subtree > root.### Heaps:
- **Min Heap:** Parent < children.
- **Max Heap:** Parent > children.### Trie:
- Tree-like data structure for string storage and retrieval.### Graphs:
- Various forms (directed, undirected) for modeling relationships.### Disjoint Set (Union-Find):
- Tracks elements in disjoint subsets.### Priority Queues:
- Efficient access to highest (or lowest) priority elements.### Bloom Filter:
- Probabilistic data structure for set membership testing.### LRU Cache:
- Implements Least Recently Used (LRU) caching policy.### Sorting Algorithms:
- Bubble Sort
- Insertion Sort
- Selection Sort
- Quick Sort
- Heap Sort### Searching Algorithms:
- Linear Search
- Binary Search### Pattern Searching Algorithms:
- Rabin Karp
- KMP
- Z Algorithm### Divide and Conquer:
- Quick Sort
- Merge Sort
- Matrix Multiplication### Backtracking:
- N-Queens
- Rat in a Maze
- Sudoku
- M Coloring### Greedy Algorithm:
- Job Sequencing
- Prim's Algorithm
- Fractional Knapsackl### Dynamic Programming:
- Fibonacci Series
- Longest Common Subsequence
- Knapsack Problem
- Coin Change### Tree-Related Algorithms:
- Tree Traversal
- Binary Search Tree Ops
- Height of a Tree
- Diameter of a Tree
- Lowest Common Ancestor### Graph Algorithms:
- Depth-First Search (DFS)
- Breadth-First Search (BFS)
- Shortest Path Algorithms
- Cycle Detection Algorithms
- Minimum Spanning Tree Algorithms
- Topological Sorting### Sliding Window:
- Maximum Sum Subarray
- Longest Substring with k Distinct
- Minimum Window Substring### Top 5 Algorithms
- BFS and DFS (Graph Traversal, Topological sort)
- Dynamic Programming
- Backtracking (w/ recursion)
- Sliding Window
- Top K elements (using heap find top 3 largest element)