0% found this document useful (0 votes)
4 views2 pages

DSA Algorithms CheatSheet

The document summarizes various data structure and algorithm (DSA) techniques categorized into arrays, linked lists, stacks, queues, trees, binary search trees, heaps, hashing, tries, graphs, disjoint sets, segment trees, matrices, and strings. Each category includes key algorithms and concepts such as search methods, tree traversal techniques, and dynamic programming approaches. This comprehensive overview serves as a quick reference for essential DSA algorithms.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views2 pages

DSA Algorithms CheatSheet

The document summarizes various data structure and algorithm (DSA) techniques categorized into arrays, linked lists, stacks, queues, trees, binary search trees, heaps, hashing, tries, graphs, disjoint sets, segment trees, matrices, and strings. Each category includes key algorithms and concepts such as search methods, tree traversal techniques, and dynamic programming approaches. This comprehensive overview serves as a quick reference for essential DSA algorithms.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

DSA Algorithms Summary

1. Array Algorithms
Linear Search, Binary Search, Kadanes Algorithm (Max Subarray), Prefix Sum Array, Two Pointer, Sliding Window,
Dutch National Flag, Merge Intervals, Rotate Array, Boyer-Moore Voting.

2. Linked List Algorithms


Insert, Delete, Reverse (Iter/Rec), Detect Loop (Floyd), Find Middle, Merge Sorted Lists, Add Two Numbers,
Intersection, Remove N-th Node.

3. Stack Algorithms
Infix to Postfix, Balanced Parentheses, Evaluate Postfix, Stock Span, Next Greater Element, Min Stack, Largest
Rectangle in Histogram.

4. Queue Algorithms
Circular Queue, Deque, LRU Cache, Sliding Window Max, Rotten Oranges (BFS).

5. Tree Algorithms
Inorder, Preorder, Postorder, Level Order, Height, Diameter, LCA, Convert to DLL, Balanced Tree, Validate BST,
Serialize/Deserialize.

6. Binary Search Tree (BST) Algorithms


Insert, Delete, Search, Floor/Ceil, Validate BST, Kth Smallest/Largest, Range Sum.

7. Heap / Priority Queue Algorithms


Min/Max Heap, Heapify, K Largest/Smallest, Merge K Sorted, Median in Stream, Top K Frequent.

8. Hashing Algorithms
Two Sum, Subarray with Zero Sum, Longest Consecutive, Count Distinct in Window, Group Anagrams, Detect
Duplicates, Longest Substring w/o Repeat.

9. Trie Algorithms
Insert, Search, Prefix Search, Auto-complete, Delete Word, Word Break.

10. Graph Algorithms


DFS, BFS, Cycle Detection (DFS/Union-Find), Topo Sort, Dijkstra, Bellman-Ford, Floyd-Warshall, Prim, Kruskal, Bridges
(Tarjan), SCC (Kosaraju).

11. Disjoint Set (Union-Find)


Union by Rank, Path Compression, Cycle Detection, Kruskal's MST, Connected Components.

12. Segment Tree / BIT


DSA Algorithms Summary

Range Sum/Min/Max Query, Point/Range Update, Lazy Propagation, 2D Segment Tree/BIT.

13. Matrix Algorithms


Rotate Matrix, Search in Sorted Matrix, Spiral Traversal, Word Search, Island Count, Min Path Sum.

14. String Algorithms


KMP, Rabin-Karp, Z-Algorithm, Manacher, Longest Palindromic Substring, LCS/LCSubstring, Edit Distance, Trie
Matching (Aho-Corasick).

You might also like