Skip to content

Latest commit

 

History

History
96 lines (59 loc) · 3.32 KB

Readme.md

File metadata and controls

96 lines (59 loc) · 3.32 KB

Data Structure and Algorithms using Python

This repository aims to provide a comprehensive collection of data structures and algorithms implementations in Python. Following along with this repository requires fundamental knowledge of programming in python, for that checkout this Repository. Python

Table of Contents

Data Structures

A data structure is a particular way of organizing and storing data in a computer so that it can be accessed and modified efficiently.

1. Linked List

  • Implementation of a singly linked list
  • Implementation of a doubly linked list
  • Operations: insertion, deletion, traversal, etc.

2. Stack

  • Implementation of a stack using arrays and linked lists
  • Operations: push, pop, peek, etc.

3. Queue

  • Implementation of a queue using arrays and linked lists
  • Operations: enqueue, dequeue, peek, etc.

4. Tree

  • Implementation of various tree data structures: binary tree, binary search tree, AVL tree, etc.
  • Tree traversal algorithms: inorder, preorder, postorder
  • Operations: insertion, deletion, searching, etc.

5. Graph

  • Implementation of graph data structure
  • Graph traversal algorithms: BFS, DFS
  • Shortest path algorithms: Dijkstra's algorithm, Bellman-Ford algorithm
  • Minimum spanning tree algorithms: Prim's algorithm, Kruskal's algorithm

Algorithms

An algorithm is a step-by-step procedure or formula for solving a problem.

1. Sorting Algorithms

  • Bubble Sort
  • Selection Sort
  • Insertion Sort
  • Merge Sort
  • Quick Sort
  • Heap Sort

2. Searching Algorithms

  • Linear Search
  • Binary Search
  • Depth-First Search (DFS)
  • Breadth-First Search (BFS)
  • Implementation of greedy algorithms
  • Examples: Minimum spanning tree, Huffman coding, etc.
  • Implementation of divide and conquer algorithms
  • Examples: Binary search, merge sort, etc.
  • Implementation of dynamic programming solutions for various problems
  • Examples: Fibonacci series, knapsack problem, longest common subsequence, etc.

How to Use This Repository

  • Learning: If you are new to DSA, start by exploring the theoretical documents to build a strong foundation. Then, dive into the code examples and implement data structures and algorithms from scratch.

  • Leetcode Interview Problems: Use the Leetcode interview questions section to practice and improve your problem-solving skills. Understand the logic behind each solution and try to solve them independently first.

All of the practical examples are written using python programming. If you wanna use C++ we also have an amazing resource for this. Checkout this repository DSA-C++

Learning Resources

Python: https://github.com/sarmad426/Python

Python Projects: https://github.com/Sarmad426/Python-projects

Back end API development using Fast API: https://github.com/Sarmad426/FastAPI

Learn AI and Data Science: https://github.com/Sarmad426/AI

Learn Generative AI: https://github.com/Sarmad426/Generative-AI