Welcome to DSA-for-ML, a comprehensive repository designed to teach Data Structures & Algorithms (DSA) with a focus on Machine Learning applications.
This repository is structured to help beginners and intermediate learners understand algorithms, implement them in code, and see how they can be applied in AI/ML workflows.
- Build a strong foundation in DSA.
- Learn code implementation for all major data structures and algorithms.
- Understand the time and space complexity of algorithms.
- Apply DSA concepts to real-world ML problems.
- Create a portfolio-ready project repository.
DSA-for-ML/
│
├── 01_Basics/
├── 02_Arrays_and_Strings/
├── 03_Linked_Lists/
├── 04_Stacks_and_Queues/
├── 05_Trees/
├── 06_Graphs/
├── 07_Hashing_and_Sets/
├── 08_Recursion_and_Backtracking/
├── 09_Sorting_and_Searching/
├── 10_Dynamic_Programming/
├── 11_Advanced_Topics/
└── 12_ML_Application_of_DSA/
Each folder contains:
README.md→ Concept explanationCode_Examples/→ Implementations in Python- Optional diagrams, explanations, and notes
- Basics – Programming fundamentals, complexity analysis
- Arrays & Strings – Sliding window, two pointers
- Linked Lists – Singly, doubly, circular
- Stacks & Queues – Implementation and use-cases
- Trees – Binary trees, BST, AVL, Segment Trees, Trie
- Graphs – BFS, DFS, Dijkstra, Bellman-Ford
- Hashing & Sets – HashMaps, sets, collision handling
- Recursion & Backtracking – Problem-solving strategies
- Sorting & Searching – Merge, Quick, Heap, Binary Search
- Dynamic Programming – Knapsack, LCS, Matrix DP
- Advanced Topics – Greedy, Divide & Conquer, Graph Algorithms
- ML Applications – Feature engineering, trees in decision trees, graphs in GNN
- Clone the repo:
git clone https://github.com/yourusername/DSA-for-ML.git- Navigate to any topic folder and explore:
cd 01_Basics- Run code examples in Python:
python example.pyContributions are welcome! Please follow these steps:
- Fork the repository
- Create your feature branch (
git checkout -b feature/your-topic) - Commit your changes (
git commit -m 'Add new topic explanation') - Push to the branch (
git push origin feature/your-topic) - Open a Pull Request
— Hamna Munir
This repository is licensed under the MIT License.