# leetcode | lucifer | Knowledge Base | Instagit

LeetCode Solutions: A Record of My Problem Solving Journey.( leetcode题解，记录自己的leetcode解题之路。)

GitHub Stars: 55.8k

Repository: https://github.com/azl397985856/leetcode

---

## Articles

### [When to Use Recursion vs Iteration in Algorithm Design](/azl397985856/leetcode/recursion-vs-iteration-when-to-use-each)

Decide between recursion and iteration based on problem structure, depth, and memory. Understand when each approach offers superior clarity and efficiency for algorithm design.

- Tags: deep-dive
- Published: 2026-03-06

### [Common String Manipulation Patterns and Techniques for LeetCode Solutions](/azl397985856/leetcode/string-manipulation-patterns-and-techniques)

Unlock LeetCode string solutions with six key patterns like two-pointer sliding windows, prefix sums, tries, rolling hash, DP, and greedy frequency analysis. Solve problems faster.

- Tags: tutorial
- Published: 2026-03-06

### [Matrix and 2D Array Traversal Patterns: 8 Essential Techniques for Grid Problems](/azl397985856/leetcode/matrix-and-2d-array-traversal-patterns)

Master 8 essential matrix and 2D array traversal patterns like row-major, spiral, and BFS/DFS to conquer grid problems on LeetCode. Optimize your solutions efficiently.

- Tags: how-to-guide
- Published: 2026-03-06

### [Linked List Problem Solving Techniques: A Complete Guide to LeetCode Mastery](/azl397985856/leetcode/linked-list-problem-solving-techniques)

Master linked list problems with dummy heads, fast/slow pointers, stitch-and-link operations, and systematic pointer updates. Avoid cycles and errors in this complete LeetCode guide.

- Tags: how-to-guide
- Published: 2026-03-06

### [Hash Table Optimization Strategies: A Technical Guide to High-Performance Lookups](/azl397985856/leetcode/hash-table-optimization-strategies)

Learn hash table optimization strategies for high performance including hash functions, collision resolution, load factors, and composite key encoding to boost lookup speed.

- Tags: tutorial
- Published: 2026-03-06

### [Stack-Based Problem Solving Patterns: 5 Essential Techniques from the LeetCode Repository](/azl397985856/leetcode/stack-based-problem-solving-patterns)

Discover 5 essential stack-based problem solving patterns including monotonic stacks, iterative traversals, and parentheses matching. Enhance your algorithm skills with these LeetCode techniques.

- Tags: best-practices
- Published: 2026-03-06

### [How to Identify and Validate Greedy Algorithms: A Complete Guide](/azl397985856/leetcode/greedy-algorithm-identification-and-validation)

Master identifying and validating greedy algorithms. Learn to make locally optimal choices for global solutions with this complete guide. Perfect for LeetCode challenges.

- Tags: tutorial
- Published: 2026-03-06

### [How to Identify the Problem Type from Its Description in LeetCode](/azl397985856/leetcode/identify-problem-type-from-description)

Learn to identify LeetCode problem types by extracting keywords, constraints, and number limits. Discover algorithmic categories in the azl397985856/leetcode repository.

- Tags: how-to-guide
- Published: 2026-03-06

### [Common LeetCode Patterns by Top Tech Companies: Essential Algorithms for FAANG Interviews](/azl397985856/leetcode/leetcode-patterns-by-top-tech-companies)

Master common LeetCode patterns used by FAANG companies like Google and Meta. Explore essential algorithms with template code in the azl397985856/leetcode repository to ace your technical interviews.

- Tags: tutorial
- Published: 2026-03-06

### [How to Optimize Brute Force Solutions: 8 Proven Patterns from the LeetCode Knowledge Base](/azl397985856/leetcode/how-to-optimize-brute-force-solutions)

Optimize brute force solutions by replacing loops with data structures like prefix sums, hash maps, and sliding windows. Reduce time complexity from O(N^2) to O(N).

- Tags: how-to-guide
- Published: 2026-03-06

### [How to Use the Trie Data Structure for String Operations: A Complete Guide](/azl397985856/leetcode/trie-data-structure-for-string-operations)

Master the Trie data structure for efficient string operations. Learn how to insert, search, and perform prefix checks in O(m) time with this comprehensive guide.

- Tags: deep-dive
- Published: 2026-03-06

### [Island Counting Pattern in Grid Problems: A Complete DFS Guide](/azl397985856/leetcode/island-counting-pattern-in-grid-problems)

Master island counting in grid problems with a complete DFS guide. Learn how to identify and count connected land cells efficiently. Boost your algorithm skills.

- Tags: tutorial
- Published: 2026-03-06

### [How the Prefix Sum Technique Works for Range Queries: A Complete Guide](/azl397985856/leetcode/prefix-sum-technique-for-range-queries)

Master the prefix sum technique for O(1) range queries. Learn how to preprocess arrays in O(N) for efficient sum calculations. A complete guide for developers.

- Tags: deep-dive
- Published: 2026-03-06

### [Common Dynamic Programming State Definitions: Patterns from the LeetCode Repository](/azl397985856/leetcode/common-dynamic-programming-state-definitions)

Master dynamic programming state definitions from the LeetCode repository. Learn patterns like dp[i], dp[i][j], and dp[i][mask] to solve complex problems efficiently. Unlock optimal substructure.

- Tags: deep-dive
- Published: 2026-03-06

### [Essential Bit Manipulation Tricks and Optimization Techniques from the LeetCode Repository](/azl397985856/leetcode/bit-manipulation-tricks-and-optimization-techniques)

Discover essential bit manipulation tricks like XOR cancellation and subset masking to optimize your code and achieve O(1) space solutions. Boost your problem-solving skills with LeetCode techniques.

- Tags: deep-dive
- Published: 2026-03-06

### [Practical Applications of a Monotonic Stack: From Next Greater Element to Trapping Rain Water](/azl397985856/leetcode/monotonic-stack-applications)

Discover practical applications of a monotonic stack. Learn how it solves nearest greater element problems and trapping rain water in O(N) time. Optimize your algorithms today.

- Tags: deep-dive
- Published: 2026-03-06

### [How to Apply the Two Pointers Technique for Array Problems: 3 Patterns Explained](/azl397985856/leetcode/two-pointers-technique-for-array-problems)

Master the two pointers technique for array problems. Learn 3 essential patterns to solve common challenges with O(N) time and O(1) space complexity, optimizing your code.

- Tags: tutorial
- Published: 2026-03-06

### [Typical Usage Scenarios for Heap and Priority Queues: A Complete Guide](/azl397985856/leetcode/heap-and-priority-queue-usage-scenarios)

Discover typical usage scenarios for heap and priority queues. Learn how these data structures excel at efficiently managing dynamic collections and extracting min/max elements. Get O(log N) insertion/deletion and O(1) extremum...

- Tags: how-to-guide
- Published: 2026-03-06

### [Backtracking Algorithm Approach: Core Concepts and Common Patterns for Problem Solving](/azl397985856/leetcode/backtracking-algorithm-approach-and-common-patterns)

Learn about the backtracking algorithm approach, its core concepts, and common patterns. Discover how this depth-first search technique prunes invalid paths to efficiently solve problems.

- Tags: deep-dive
- Published: 2026-03-06

### [When to Use DFS vs BFS for Tree Traversal Methods](/azl397985856/leetcode/dfs-vs-bfs-for-tree-traversal)

Master tree traversal by learning when to use DFS for path exploration and backtracking, and BFS for shortest paths and level order processing. Optimize your algorithms now.

- Tags: deep-dive
- Published: 2026-03-06

### [How to Use the Sliding Window Technique for Array Problems](/azl397985856/leetcode/sliding-window-technique-for-array-problems)

Master the sliding window technique for array problems. Learn how this O(n) two-pointer strategy processes subarrays effectively to solve LeetCode challenges.

- Tags: how-to-guide
- Published: 2026-03-06

### [Binary Search Algorithm Variations and Their Edge Cases: A Complete Guide to the LeetCode Repository](/azl397985856/leetcode/binary-search-algorithm-variations-and-edge-cases)

Master binary search variations like bisect_left/right and predicate search. Handle edge cases: empty inputs, overflow, duplicates. Your LeetCode guide.

- Tags: deep-dive
- Published: 2026-03-06

### [How to Identify and Solve Dynamic Programming Problems: A Systematic Guide](/azl397985856/leetcode/how-to-identify-and-solve-dynamic-programming-problems)

Learn to identify and solve dynamic programming problems. Master states, transitions, and memoization with this systematic guide. Boost your problem-solving skills.

- Tags: how-to-guide
- Published: 2026-03-06

