/Data-Structures-and-Algorithms-in-Python

Data Structures and Algorithms in Python

Primary LanguagePythonMIT LicenseMIT

Data Structures and Algorithms in Python

Algorithms

1. Sorting Algorithms

2. String Algorithms

3. Kadane's Algorithm

Binary Tree

1. Binary Search Tree

2. Binary Tree

3. Diameter of a Binary Tree

Binary Index Tree(Fenwick Tree)

1. Range Sum and Update Query

Disjoint Set

1. Link By Rank

2. Link By Size

3. Link By Size With Path Compression

4. Naive Linking

Graph Theory

1. Minimum Spanning Tree

2. Ancestor of a node using Binary Lifting

3. Breadth First Search(BFS)

4. Bellman Ford Algorithm

5. Check If Given Graph Is Bipartite

6. Depth First Search(DFS)

7. Detecting A Cycle In Graph using DFS

8. Floyd Warshall Algorithm

9. Representation Of Graph As Adjacency Matrix

10. Shortest Path In Directed Acyclic Graph(DAG)

11. Size Of Subtree Of All the Nodes

12. Dijkstra's Algorithm

13. Dungeon Master(Problem)

14. Euler Tour

15. Representing Grid As A Graph With Four Adjacent Cells Connected By An Edge

16. Lowest Common Ancestor(LCA) Using Binary Lifting

17. Topological Sorting - 1

18. Topological Sorting - 2

19. Cycle Detection Using White-Gray-Black DFS

Heaps

1. Heap Implementation

Linked List

1. Circular Linked List

2. Doubly Linked List

3. Linked List Implementation

4. Double Ended Queue(deque) Using Linked List

5. Queue Implementation With Linked List

Queue

1. Deque with Lists

2. Queue Implementation Using Lists

3. Queue With Linked List

4. Monotonic Queue

Segment Tree

1. Range Minimum And Update Query

2. Range Sum And Update Query

Stacks

1. Stack Using List

2. Stack Using Linked List

TRIE

1. Trie Implementation(Insert, Search and Print the content)