> For the complete documentation index, see [llms.txt](https://tahas-organization-2.gitbook.io/dsa-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tahas-organization-2.gitbook.io/dsa-guide/master-data-structures-and-algorithms-the-ultimate-guide-to-learning-resources.md).

# Master Data Structures and Algorithms: The Ultimate Guide to Learning Resources

## DSA Resources

1. **Page Content**
   * [YT Channels](#yt-channels)
   * [Websites](#websites)
   * [Books](#books)
   * [DSA Topics/Syllabus](#dsa-topics-syllabus)
   * [Plateforms](#plateforms)
   * [DSA Blogs](#useful-blogs)
2. [You can also follow this roadmap](https://roadmap.sh/datastructures-and-algorithms) &#x20;

### **YT Channels**

* [TakeUForward AKA Striver](https://www.youtube.com/@takeUforward/playlists) `Recommended`
* [Abdul Bari](https://www.youtube.com/@abdul_bari/playlists) `Recommended`
* [NeetCode](https://www.youtube.com/@NeetCode/playlists)
* [CodeWithHarry](https://www.youtube.com/playlist?list=PLu0W_9lII9ahIappRPN0MCAgtOu3lQjQi)
* [Jenny's Lectures](https://www.youtube.com/playlist?list=PLdo5W4Nhv31bbKJzrsKfMpo_grxuLl8LU)
* [CodeHelp - by Babbar](https://www.youtube.com/@CodeHelp/playlists)
* [MIT Spring (2020)](https://www.youtube.com/playlist?list=PLUl4u3cNGP63EdVPNLG3ToM6LaEUuStEY)
* [Free Code Camp](https://youtu.be/2ZLl8GAk1X4?si=dsUpbqVKS-rFGXiD)

### **Websites**

* [TakeUForward](https://takeuforward.org/)
* [GeeksForGeeks](https://www.geeksforgeeks.org/)

### **Books**

* *Introduction to Algorithms* by Cormen, Leiserson, Rivest, and Stein
* *Algorithm Design Manual* by Steven S. Skiena
* *Algorithms* by Robert Sedgewick and Kevin Wayne
* *Data Structures and Algorithm Analysis in C++* by Mark Allen Weiss
* *Competitive Programming* by Steven Halim and Felix Halim
* *Cracking the Coding Interview* by Gayle Laakmann McDowell
* Jay Wengrow - A Common-Sense Guide to Data Structures and Algorithms in Python, Volume 1\_ Level Up Your Core Programming Skills

### DSA Topics/ Syllabus

* #### Basic Data Structures

  * **Arrays**: A collection of elements identified by index or key.
    * **Strings**: A sequence of characters, often used for text manipulation.
    * **Linked Lists**: A linear collection of elements (nodes), where each node points to the next.
    * **Stacks**: A collection of elements with Last In, First Out (LIFO) access.
    * **Queues**: A collection of elements with First In, First Out (FIFO) access.

  #### Advanced Data Structures

  * **Trees**: Hierarchical data structures with nodes having zero or more children.
    * **Binary Trees**: Each node has at most two children.
    * **Binary Search Trees (BST)**: A binary tree where left children are smaller and right children are larger.
    * **AVL Trees**: A self-balancing binary search tree.
    * **B-Trees**: A balanced tree data structure designed for systems that read and write large blocks of data.
  * **Graphs**: Collections of nodes connected by edges.
    * **Graph Representation**: Ways to represent graphs, such as adjacency matrices and adjacency lists.
    * **Depth-First Search (DFS)**: An algorithm for traversing or searching tree/graph structures.
    * **Breadth-First Search (BFS)**: Another algorithm for traversing or searching tree/graph structures.
    * **Shortest Path Algorithms**: Methods to find the shortest path between nodes.
      * **Dijkstra's Algorithm**: Finds the shortest path from a source to all other nodes.
      * **Bellman-Ford Algorithm**: Handles graphs with negative weights.
    * **Minimum Spanning Tree**: Finds a subset of edges that connects all nodes with the minimum total edge weight.
      * **Prim's Algorithm**: A method for finding the minimum spanning tree.
      * **Kruskal's Algorithm**: Another method for finding the minimum spanning tree.
  * **Heaps**: Specialized tree-based structures that satisfy the heap property.
    * **Min Heap**: The smallest element is at the root.
    * **Max Heap**: The largest element is at the root.
    * **Heap Sort**: A sorting algorithm based on heap data structure.
  * **Hash Tables**: A data structure that maps keys to values for efficient lookup.
  * **Disjoint Set Union (Union-Find)**: A data structure that manages a partition of a set into disjoint subsets.
  * **Trie**: A tree-like data structure for efficient retrieval of a key in a dataset of strings.
  * **Segment Tree**: A data structure for answering range queries and updates.
  * **Fenwick Tree**: Also known as Binary Indexed Tree, used for efficient querying and updating of prefix sums.

  #### Algorithmic Paradigms

  * **Brute Force**: A straightforward approach that tries all possible solutions.
  * **Divide and Conquer**: Breaks a problem into smaller subproblems, solves each subproblem, and combines solutions.
  * **Greedy Algorithms**: Makes a series of choices, each of which looks best at the moment.
  * **Dynamic Programming**: Solves problems by breaking them down into simpler subproblems and storing the results.
  * **Backtracking**: An algorithmic technique for solving problems incrementally by trying partial solutions and backtracking upon failure.
  * **Sliding Window Technique**: A method for solving problems related to arrays or lists by maintaining a window of elements.
  * **Two Pointer Technique**: Uses two pointers to solve problems efficiently, often in sorted arrays or linked lists.
  * **Divide and Conquer Optimization**: Techniques to optimize divide and conquer algorithms.
    * **Merge Sort Tree**: An advanced data structure for range queries and updates.
    * **Persistent Segment Tree**: A version of segment trees that allows querying of historical states.

  #### Searching Algorithms

  * **Linear Search**: Sequentially checks each element until the target is found or the list ends.
  * **Binary Search**: Efficiently searches a sorted array by repeatedly dividing the search interval in half.
  * **Depth-First Search**: Explores as far as possible along each branch before backtracking.
  * **Breadth-First Search**: Explores all neighbors at the present depth before moving on to nodes at the next depth level.

  #### Sorting Algorithms

  * **Bubble Sort**: Repeatedly steps through the list, compares adjacent elements, and swaps them if they are in the wrong order.
  * **Selection Sort**: Repeatedly selects the smallest (or largest) element and moves it to its correct position.
  * **Insertion Sort**: Builds the final sorted array one item at a time.
  * **Merge Sort**: A divide-and-conquer algorithm that divides the list into halves, sorts them, and merges them back together.
  * **Quick Sort**: A divide-and-conquer algorithm that selects a 'pivot' element and partitions the array around the pivot.
  * **Heap Sort**: Converts the array into a heap and then sorts it.

  #### Graph Algorithms

  * **Topological Sort**: Orders nodes in a Directed Acyclic Graph (DAG) such that for every directed edge UV, vertex U comes before V.
  * **Strongly Connected Components**: Finds components where every vertex is reachable from every other vertex.
  * **Articulation Points and Bridges**: Identifies nodes and edges whose removal increases the number of connected components.

  #### Dynamic Programming

  * **Introduction to DP**: Basic principles of dynamic programming.
  * **Fibonacci Series using DP**: Uses DP to efficiently calculate Fibonacci numbers.
  * **Longest Common Subsequence**: Finds the longest subsequence common to two sequences.
  * **Longest Increasing Subsequence**: Finds the longest subsequence where each element is greater than the previous.
  * **Knapsack Problem**: Determines the maximum value that can be achieved with a given weight capacity.
  * **Matrix Chain Multiplication**: Finds the optimal order of matrix multiplications.
  * **Dynamic Programming on Trees**: Applies dynamic programming techniques to tree structures.

  #### Mathematical and Bit Manipulation Algorithms

  * **Prime Numbers and Sieve of Eratosthenes**: Efficiently finds all prime numbers up to a given limit.
  * **Greatest Common Divisor (GCD)**: Finds the largest number that divides two numbers without leaving a remainder.
  * **Least Common Multiple (LCM)**: Finds the smallest number that is a multiple of two numbers.
  * **Modular Arithmetic**: Operations with numbers under a modulus.
  * **Bit Manipulation Tricks**: Techniques for efficient manipulation of binary representations of numbers.

  #### Advanced Topics

  * **Trie-based Algorithms**:
    * **Auto-completion**: Uses a trie for suggesting completions based on prefixes.
    * **Spell Checker**: Uses a trie for checking the correctness of words.
  * **Suffix Trees and Arrays**: Data structures for efficient substring queries and operations.
  * **Computational Geometry**: Study of geometric problems and algorithms.
  * **Number Theory**:
    * **Euler’s Totient Function**: Counts the number of integers up to a given integer that are coprime to it.
    * **Mobius Function**: Used in number theory for various purposes, including the inclusion-exclusion principle.
  * **String Algorithms**:
    * **KMP Algorithm**: Searches for occurrences of a substring within a string.
    * **Rabin-Karp Algorithm**: Searches for patterns using hashing.

### Plateforms&#x20;

* [Leetcode](https://leetcode.com/problemset/) `Recommended`
* [GeeksForGeeks](https://www.geeksforgeeks.org/explore?page=1\&sortBy=submissions\&itm_source=geeksforgeeks\&itm_medium=main_header\&itm_campaign=practice_header) `Recommended`
* [Hackerrank](https://www.hackerrank.com/dashboard)
* [Hackerearth](https://www.hackerearth.com/)
* [CodingNinja](https://www.naukri.com/code360/problems)

### Useful Blogs

* [**Dynamic Programming Patterns**](https://leetcode.com/discuss/study-guide/458695/Dynamic-Programming-Patterns)
* [**Graph For Beginners \[Problems | Pattern | Sample Solutions\]**](/dsa-guide/master-data-structures-and-algorithms-the-ultimate-guide-to-learning-resources.md)
* [**Binary Search Template**](https://leetcode.com/discuss/study-guide/786126/Python-Powerful-Ultimate-Binary-Search-Template.-Solved-many-problems)
* [**Two Pointer Template**](https://leetcode.com/discuss/study-guide/1688903/Solved-all-two-pointers-problems-in-100-days)
* [**Permutation Problems**](https://leetcode.com/problems/permutations/solutions/18239/A-general-approach-to-backtracking-questions-in-Java-\(Subsets-Permutations-Combination-Sum-Palindrome-Partioning\)/)
* [**Substring Problems**](https://leetcode.com/problems/minimum-window-substring/solutions/26808/Here-is-a-10-line-template-that-can-solve-most-'substring'-problems/)
