Description: This technique uses two pointers moving at different speeds to solve problems involving cycles, such as finding the middle of a list, detecting loops, or checking for palindromes.
Description: Intervals are often manipulated through sorting and merging based on their start and end times.
Description: Prefix Sums/Products are techniques that store cumulative sums or products up to each index, allowing for quick subarray range queries.
Description: A sliding window is a subarray or substring that moves over data to solve problems efficiently in linear time.
Description: The two pointers technique involves having two different indices move through the input at different speeds to solve various array or linked list problems.
Description: Cyclic sort is an efficient approach to solve problems where numbers are consecutively ordered and must be placed in the correct index.
Description: Reversing a linked list in place without using extra space is key for problems that require in-place list manipulations.
Description: Problems involving 2D arrays (matrices) are often solved using row-column traversal or manipulation based on matrix properties.
Description: BFS explores nodes level by level using a queue. It is particularly useful for shortest path problems.
Description: DFS explores as far as possible along a branch before backtracking. It's useful for graph traversal, pathfinding, and connected components.
Description: Backtracking helps in problems where you need to explore all potential solutions, such as solving puzzles, generating combinations, or finding paths.
Description: A modified version of binary search that applies to rotated arrays, unsorted arrays, or specialized conditions.
Description: XOR is a powerful bitwise operator that can solve problems like finding single numbers or efficiently pairing elements.
Description: This pattern uses heaps or quickselect to efficiently find the top 'K' largest/smallest elements from a dataset.
Description: The K-way merge technique uses a heap to efficiently merge multiple sorted lists or arrays.
Description: This pattern uses two heaps (max heap and min heap) to solve problems involving tracking medians and efficiently managing dynamic data.
Description: A monotonic stack helps solve range queries by maintaining a stack of elements in increasing or decreasing order.
Description: Solve optimization problems like selecting items with the max/min value under certain constraints.
Description: Similar to the 0/1 knapsack, but items can be chosen multiple times.
Description: It involves finding the longest subsequence of a given sequence where the elements are in ascending order
Description: Dynamic Programming on matrices involves solving problems that can be broken down into smaller overlapping subproblems within a matrix.
Description: It Involves 2 strings, whenever you are considering two substrings/subsequence from given two strings, concentrate on what happens when the last characters of the two substrings are same, i.e, matching.
Description: It focuses on maximizing profit from buying and selling stocks over time while considering constraints.
Description: It Involves a sequence that needs to be divided into partitions in an optimal way. The goal is often to minimize or maximize a cost function, such as computation time, multiplications, or some other metric, by exploring all possible partitions and combining results from subproblems.
Description: Topological sorting is useful for tasks that require dependency resolution (InDegree) in directed acyclic graphs (DAGs).
Description: Union-Find (or Disjoint Set) is used to solve problems involving connectivity or grouping, often in graphs.
Description: Advanced graph algorithms are used to solve complex problems involving shortest paths, minimum spanning trees, and graph cycles.
Description: Greedy algorithms make local optimal choices at each step, which lead to a global optimal solution for problems like scheduling and resource allocation.
Description: It involves building custom data structures to efficiently handle specific operations, like managing data access, updates, and memory usage. Focusing on optimizing performance and resource management.
Happy LeetCoding !