Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

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

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)