Java | JavaScript | SQL | Shell |
---|---|---|---|
Understanding these key topics will help you master LeetCode problems and improve your problem-solving skills.
- Math - Algorithms involving mathematical concepts and calculations.
- Basic Programming - Fundamental concepts and algorithms essential for coding.
- Bit Manipulation - Techniques for working directly with binary digits (bits).
- Dynamic Programming - Solving problems by breaking them down into simpler subproblems and storing results for future use.
- Divide and Conquer / Merge - Dividing a problem into smaller parts, solving them independently, and combining their results.
- Two Pointers - Using two indices to solve problems involving arrays or lists.
- Sliding Window - A dynamic window to solve problems involving subarrays.
- Binary Search - Efficiently finding an element in a sorted array.
- Prefix Sum - Using cumulative sums to solve range query problems.
- Linked List - A data structure where elements are nodes connected by pointers.
- Stack - A collection of elements with Last-In-First-Out (LIFO) access.
- Hash - Using hash tables to store key-value pairs for quick access.
- Trees - Hierarchical data structures with a root and child nodes.
- Matrix - Representing graphs using adjacency matrices.
- BFS (Breadth-First Search) - Traversing graphs level by level.
- DFS (Depth-First Search) - Traversing graphs by exploring as far as possible along each branch.
- Heap / Priority Queue - Data structures for efficiently managing a dynamically changing dataset where you need quick access to the smallest or largest element.
- Math: Algorithms based on mathematical principles, such as prime numbers, greatest common divisor (GCD), and more.
- Basic Programming: Essential algorithms like sorting, searching, and basic data structures.
- Bit Manipulation: Operations on individual bits to solve problems efficiently, often used in optimization.
- Dynamic Programming: Techniques for solving complex problems by combining solutions to simpler subproblems. It involves the use of memoization or tabulation.
- Divide and Conquer / Merge: Breaking a problem into smaller subproblems, solving each independently, and merging the results. Examples include merge sort and quicksort.
- Two Pointers: A technique where two pointers iterate through the data structure to solve problems involving pairs or subarrays.
- Sliding Window: A technique to maintain a window of elements and slide it over the data structure to solve subarray problems.
- Binary Search: An efficient algorithm to find an element in a sorted array by repeatedly dividing the search interval in half.
- Prefix Sum: Precomputing cumulative sums to quickly answer range sum queries.
- Linked List: A linear data structure where each element points to the next, allowing for efficient insertions and deletions.
- Stack: A linear data structure that follows the Last-In-First-Out (LIFO) principle, used in problems involving backtracking and recursion.
- Hash: A data structure that maps keys to values for efficient lookups. Commonly used in caching and indexing.
- Trees: Non-linear data structures with a hierarchical relationship between elements. Used in various applications like parsing expressions, hierarchical data representation, etc.
- Graphs: Structures made up of nodes (vertices) connected by edges, used to represent networks, relationships, and paths.
- Matrix: Representing graphs using a two-dimensional array.
- BFS: An algorithm for traversing or searching tree or graph data structures by exploring neighbors level by level.
- DFS: An algorithm for traversing or searching tree or graph data structures by exploring as far as possible along each branch before backtracking.
- Heap / Priority Queue: Specialized tree-based data structures that allow for efficient retrieval of the minimum or maximum element.
These concepts form the foundation of problem-solving strategies on platforms like LeetCode and are crucial for technical interviews and competitive programming.