Welcome to the Data Structures and Algorithms (DSA) repository! This repository features Python implementations of various data structures and algorithms commonly utilized in computer science. Whether you're a beginner or an experienced developer, this resource aims to enhance your understanding and skills in DSA.
- Introduction
- List of Data Structures and Algorithms
- Directory Structure
- How to Use
- Contributing
- License
This repository is crafted to assist learners in implementing both basic and advanced Data Structures and Algorithms using Python. Each implementation is designed for clarity and simplicity, adhering to standard Python coding conventions.
In addition to code, you will find comprehensive explanations for each data structure and algorithm, including their time and space complexities.
Below is a list of the Data Structures and Algorithms implemented in this repository:
- Array: Operations such as insert, delete, search, etc.
- Linked List: Singly Linked List with operations like insert, delete, reverse, and search.
- Stack: Operations including push, pop, peek, and isEmpty.
- Queue: Includes enqueue, dequeue, peek, and isEmpty operations.
- Binary Search Tree (BST): Functions for insert, search, delete, findMin, and findMax.
- Hash Table: Operations for insert, search, delete, resize, and hash function.
- Heap (Min/Max): Functions for insert, extract min/max, peek, delete, and heapify.
- Graph: Methods for adding vertices/edges, DFS, BFS, and removing vertices.
- Trie (Prefix Tree): Operations for insert, search, delete, startsWith, and display.
- Dynamic Programming: Solutions for Fibonacci sequence, longest common subsequence (LCS), and knapsack problem.
Each implementation includes a corresponding Python file (.py
) along with a markdown file (.md
) that explains the concept in detail, discusses operations and complexities, and provides example usage.
DSA/
|──Data Structure/
| ├── arrays/
│ ├── array.py # Python code for Array operations
│ └── array.md # Explanation and details for Array
├── linked_list/
│ ├── linked_list.py # Python code for Linked List operations
│ └── linked_list.md # Explanation and details for Linked List
├── stack/
│ ├── stack.py # Python code for Stack operations
│ └── stack.md # Explanation and details for Stack
├── queue/
│ ├── queue.py # Python code for Queue operations
│ └── queue.md # Explanation and details for Queue
├── bst/
│ ├── bst.py # Python code for Binary Search Tree operations
│ └── bst.md # Explanation and details for BST
├── hash_table/
│ ├── hash_table.py # Python code for Hash Table operations
│ └── hash_table.md # Explanation and details for Hash Table
├── heap/
│ ├── heap.py # Python code for Heap operations
│ └── heap.md # Explanation and details for Heap
├── graph/
│ ├── graph.py # Python code for Graph operations
│ └── graph.md # Explanation and details for Graph
├── trie/
│ ├── trie.py # Python code for Trie operations
│ └── trie.md # Explanation and details for Trie
|
|──Algorithm/
| ├── dynamic_programming/
│ ├── dynamic_programming.py # Python code for Dynamic Programming
│ └── dynamic_programming.md # Explanation and details for Dynamic Programming
├── README.md # Project README
└── CONTRIBUTING.md # Contribution Guidelines
To get started with this repository on your local machine, clone it using the following command:
git clone https://github.com/mmabiaa/dsa_In_python.git
Navigate to the desired directory (e.g., arrays
, linked_list
, etc.) to find the relevant .py
file. You can run any script directly using Python:
We welcome contributions to enhance this repository! If you're interested in contributing, please review our guidelines in the Contribution file.
This repository is licensed under the MIT License. For more information, please refer to the LICENSE file.
Feel free to explore the repository and dive into the fascinating world of Data Structures and Algorithms! Happy coding!