317 posts found

362. Design Hit Counter

362. Design Hit Counter
leetcodemediumdesignqueuesliding-window

841. Keys and Rooms

841. Keys and Rooms
leetcodemediumgraphdfsbfs

383. Ransom Note

383. Ransom Note
leetcodeeasystringhash-table

242. Valid Anagram

242. Valid Anagram
leetcodeeasystringhash-table

219. Contains Duplicate II

219. Contains Duplicate II
leetcodeeasyarrayhash-tablesliding-window

113. Path Sum II

113. Path Sum II
leetcodemediumtreedfs

112. Path Sum

112. Path Sum
leetcodeeasytreedfs

78. Subsets

78. Subsets
leetcodemediumbacktrackingdfs

621. Task Scheduler

621. Task Scheduler
leetcodemediumgreedycounting

61. Rotate List

61. Rotate List
leetcodemediumlinked-listpython

187. Repeated DNA Sequences

187. Repeated DNA Sequences
leetcodemediumstringhashingsliding-windowbit-manipulation

59. Spiral Matrix II

59. Spiral Matrix II
leetcodemediummatrixsimulation

43. Multiply Strings

43. Multiply Strings
leetcodemediumstringmathsimulation

42. Trapping Rain Water

42. Trapping Rain Water
leetcodehardtwo-pointersstackdp

38. Count and Say

38. Count and Say
leetcodemediumstringsimulation

23. Merge k Sorted Lists

23. Merge k Sorted Lists
leetcodehardlinked-listdivide-and-conquerheap

36. Valid Sudoku

36. Valid Sudoku
leetcodemediummathbit-manipulation

29. Divide Two Integers

29. Divide Two Integers
leetcodemediummathbit-manipulation

155. Min Stack

155. Min Stack
leetcodemediumstack

91. Decode Ways

91. Decode Ways
leetcodemediumdynamic-programming

210. Course Schedule II

210. Course Schedule II
leetcodemediumgraphtopological-sort

252. Meeting Rooms

252. Meeting Rooms
leetcodeeasyarraysortingintervals

1109. Corporate Flight Bookings

1109. Corporate Flight Bookings
leetcodemediumarrayprefix-sumdifference-array

787. Cheapest Flights Within K Stops

787. Cheapest Flights Within K Stops
leetcodemediumgraphshortest-pathdynamic-programmingbellman-ford

743. Network Delay Time

743. Network Delay Time
leetcodemediumgraphshortest-pathdijkstra

843. Guess the Word

843. Guess the Word
leetcodehardarraystringinteractiveminmax

560. Subarray Sum Equals K

560. Subarray Sum Equals K
leetcodemediumarrayhash-tableprefix-sum

44. Wildcard Matching

44. Wildcard Matching
leetcodehardstringdynamic-programminggreedytwo-pointers

162. Find Peak Element

162. Find Peak Element
leetcodemediumarraybinary-search

739. Daily Temperatures

739. Daily Temperatures
leetcodemediumarraystackmonotonic-stack

2080. Range Frequency Queries

2080. Range Frequency Queries
leetcodemediumarrayhash-mapbinary-searchdesign

1136. Parallel Courses

1136. Parallel Courses
leetcodehardgraphtopological-sortdfsdynamic-programming

209. Minimum Size Subarray Sum

209. Minimum Size Subarray Sum
leetcodemediumarraysliding-windowbinary-searchprefix-sum

862. Shortest Subarray with Sum at Least K

862. Shortest Subarray with Sum at Least K
leetcodehardarraysliding-windowdequeprefix-summonotonic-deque

27. Remove Element

27. Remove Element
leetcodeeasyarraytwo-pointers

354. Russian Doll Envelopes

354. Russian Doll Envelopes
leetcodemediumarraydynamic-programmingbinary-searchsorting

213. House Robber II

213. House Robber II
leetcodemediumarraydynamic-programming

622. Design Circular Queue

622. Design Circular Queue
leetcodemediumarraylinked-listdesignqueue

63. Unique Paths II

63. Unique Paths II
leetcodemediumarraydynamic-programmingmatrix

498. Diagonal Traverse

498. Diagonal Traverse
leetcodemediumarraymatrixsimulation

189. Rotate Array

189. Rotate Array
leetcodemediumarray

Algorithm Templates: Search

Minimal, copy-paste C++ for binary search, rotated arrays, 2D search, and answer-space search. Matches Data Structures lower/upper bound style.
leetcodetemplatessearchbinary-search

327. Count of Range Sum

327. Count of Range Sum
leetcodehardarraydivide-and-conquer

645. Set Mismatch

645. Set Mismatch
leetcodeeasyarrayhash-tablemath

409. Longest Palindrome

409. Longest Palindrome
leetcodeeasystringhash-tablegreedy

112. Path Sum

112. Path Sum
leetcodeeasytreedfs

100. Same Tree

100. Same Tree
leetcodeeasytreedfs

409. Longest Palindrome

409. Longest Palindrome
leetcodeeasystringhash-tablegreedy

732. My Calendar III

732. My Calendar III
leetcodehardarraybinary-searchdesignsegment-treeordered-set

729. My Calendar I

729. My Calendar I
leetcodemediumarraybinary-searchdesignordered-set

315. Count of Smaller Numbers After Self

315. Count of Smaller Numbers After Self
leetcodehardarraybinary-searchdivide-and-conquerbinary-indexed-treesegment-treemerge-sort

3477. Number of Unplaced Fruits

3477. Number of Unplaced Fruits
leetcodemediumarraygreedysegment-tree

307. Range Sum Query - Mutable

307. Range Sum Query - Mutable
leetcodemediumarraysegment-treebinary-indexed-tree

305. Number of Islands II

305. Number of Islands II
leetcodehardarrayunion-findgraph

802. Find Eventual Safe States

802. Find Eventual Safe States
leetcodemediumgraphdfscycle-detection

315. Count of Smaller Numbers After Self

315. Count of Smaller Numbers After Self
leetcodehardarraybinary-searchdivide-and-conquerbinary-indexed-treesegment-treemerge-sort

LCR 113. Course Schedule II

LCR 113. Course Schedule II
leetcodemediumgraphtopological-sortdfs

310. Minimum Height Trees

310. Minimum Height Trees
leetcodemediumgraphtreetopological-sortbfs

269. Alien Dictionary

269. Alien Dictionary
leetcodehardgraphtopological-sortstring

79. Word Search

79. Word Search
leetcodemediumarraybacktrackingmatrixdfs

22. Generate Parentheses

22. Generate Parentheses
leetcodemediumstringbacktrackingrecursion

51. N-Queens

51. N-Queens
leetcodehardarraybacktrackingrecursion

721. Accounts Merge

721. Accounts Merge
leetcodemediumarrayhash-tablestringunion-finddfs

64. Minimum Path Sum

64. Minimum Path Sum
leetcodemediumarraydynamic-programmingmatrix

1340. Jump Game V

1340. Jump Game V
leetcodehardarraydynamic-programmingdfsmemoization

692. Top K Frequent Words

692. Top K Frequent Words
leetcodemediumhash-tableheapsortingstring

5. Longest Palindromic Substring

5. Longest Palindromic Substring
leetcodemediumstringtwo-pointersdynamic-programming

993. Cousins in Binary Tree

993. Cousins in Binary Tree
leetcodeeasytreebfsbinary-tree

215. Kth Largest Element in an Array

215. Kth Largest Element in an Array
leetcodemediumarrayheapquickselectdivide-and-conquer

Algorithm Templates: Heap

Minimal, copy-paste C++ for min/max heap, K-way merge, top K, and two heaps. See also Data Structures for heap patterns.
leetcodetemplatesheappriority-queue

53. Maximum Subarray

53. Maximum Subarray
leetcodemediumarraydynamic-programminggreedydivide-and-conquer

392. Is Subsequence

392. Is Subsequence
leetcodeeasystringtwo-pointersgreedydynamic-programming

55. Jump Game

55. Jump Game
leetcodemediumarraygreedydynamic-programming

715. Range Module

715. Range Module
leetcodeharddesigndata-structuresintervalmaptree-map

Algorithm Templates: Greedy

Minimal, copy-paste C++ for interval scheduling, activity selection, and greedy on arrays/strings with sorting.
leetcodetemplatesgreedy

[Easy] 67. Add Binary

[Easy] 67. Add Binary
leetcodealgorithmeasycppstringmathbit-manipulationproblem-solving

[Medium] 146. LRU Cache

[Medium] 146. LRU Cache
leetcodealgorithmmediumcppdesigndata-structureshash-maplinked-listproblem-solving

[Medium] 146. LRU Cache

[Medium] 146. LRU Cache
leetcodealgorithmmediumcppdesigndata-structureshash-maplinked-listproblem-solving

[Medium] 647. Palindromic Substrings

[Medium] 647. Palindromic Substrings
leetcodealgorithmmediumcppstringtwo-pointersproblem-solving

[Medium] 56. Merge Intervals

[Medium] 56. Merge Intervals
leetcodealgorithmmediumcpparraysortingintervalproblem-solving

[Medium] 528. Random Pick with Weight

[Medium] 528. Random Pick with Weight
leetcodealgorithmmediumcppdesignbinary-searchprefix-sumproblem-solving

[Medium] 398. Random Pick Index

[Medium] 398. Random Pick Index
leetcodealgorithmmediumcpphash-tablereservoir-samplingproblem-solving

[Medium] 277. Find the Celebrity

[Medium] 277. Find the Celebrity
leetcodealgorithmmediumcppgraphtwo-pointersproblem-solving

[Hard] 489. Robot Room Cleaner

[Hard] 489. Robot Room Cleaner
leetcodealgorithmhardcppdfsbacktrackingproblem-solving

[Hard] 32. Longest Valid Parentheses

[Hard] 32. Longest Valid Parentheses
leetcodealgorithmhardcppstringdynamic-programmingstackproblem-solving

[Easy] 938. Range Sum of BST

[Easy] 938. Range Sum of BST
leetcodealgorithmeasycpptreebstdfsproblem-solving

Algorithm Templates: String Processing

Minimal, copy-paste C++ for sliding window, two pointers, string matching, manipulation, and parsing. See also Arrays & Strings for KMP and rolling hash.
leetcodetemplatesstring

Algorithm Templates: Queue

Minimal, copy-paste C++ for BFS queue, monotonic queue, priority queue, circular queue, and deque. See also Graph and Data Structures (monotonic queue).
leetcodetemplatesqueue

Algorithm Templates: Math & Bit Manipulation

Minimal, copy-paste C++ for bit operations, fast exponentiation, GCD/LCM, primes, and number theory. See also Math & Geometry.
leetcodetemplatesmathbit-manipulation

Algorithm Templates: Linked List

Minimal, copy-paste C++ for traversal, two pointers, dummy node, reversal, merge, cycle detection, and circular list.
leetcodetemplateslinked-list

Algorithm Templates: DFS

Minimal, copy-paste C++ for graph DFS, grid DFS, tree DFS, memoization, and iterative DFS. See also Graph and Backtracking.
leetcodetemplatesdfsgraph

Algorithm Templates: Data Structure Design

Minimal, copy-paste C++ for LRU/LFU cache, Trie, time-based key-value store, and common design patterns.
leetcodetemplatesdesign

Algorithm Templates: BFS

Minimal, copy-paste C++ for graph and grid BFS, multi-source BFS, shortest path, and level-order traversal. See also Graph for Dijkstra and 0-1 BFS.
leetcodetemplatesbfsgraph

Algorithm Templates: Backtracking

Minimal, copy-paste C++ for permutations, combinations, subsets, combination sum, grid pathfinding, and constraint satisfaction (N-Queens, Sudoku).
leetcodetemplatesbacktracking

Algorithm Templates: Array & Matrix

Minimal, copy-paste C++ for two pointers, sliding window, prefix sum, binary search, and matrix operations. See also Arrays & Strings and Search.
leetcodetemplatesarraymatrix

[Medium] 200. Number of Islands

[Medium] 200. Number of Islands
leetcodealgorithmmediumcppdfsgraphmatrixproblem-solving

[Medium] 969. Pancake Sorting

[Medium] 969. Pancake Sorting
leetcodealgorithmmediumcpparraysortingproblem-solving

[Medium] 49. Group Anagrams

[Medium] 49. Group Anagrams
leetcodealgorithmmediumcppstringhash-tableproblem-solving

[Medium] 45. Jump Game II

[Medium] 45. Jump Game II
leetcodealgorithmmediumcpparraygreedyproblem-solving

[Medium] 2. Add Two Numbers

[Medium] 2. Add Two Numbers
leetcodealgorithmmediumcpplinked-listrecursionproblem-solving

[Medium] 198. House Robber

[Medium] 198. House Robber
leetcodealgorithmmediumcppdynamic-programmingdpproblem-solving

[Easy] 509. Fibonacci Number

[Easy] 509. Fibonacci Number
leetcodealgorithmeasycppdynamic-programmingrecursionproblem-solving

[Medium] 146. LRU Cache

[Medium] 146. LRU Cache
leetcodealgorithmmediumcppdesigndata-structureshash-maplinked-listproblem-solving

[Hard] 460. LFU Cache

[Hard] 460. LFU Cache
leetcodealgorithmhardcppdesigndata-structureshash-maplinked-listproblem-solving

Algorithm Templates: Stack

Minimal, copy-paste C++ for parentheses matching, expression evaluation, nested structures, and monotonic stack.
leetcodetemplatesstackdata-structures

Algorithm Templates: Calculator

Minimal, copy-paste C++ for expression evaluation with +, −, ×, ÷ and parentheses. See also Stack for RPN and nested expressions.
leetcodetemplatescalculatorexpression-evaluation

[Medium] 224. Basic Calculator

[Medium] 224. Basic Calculator
leetcodealgorithmmediumcppstringstackexpression-evaluationproblem-solving

[Hard] 772. Basic Calculator III

[Hard] 772. Basic Calculator III
leetcodealgorithmhardcppstringstackrecursionexpression-evaluationproblem-solving

[Medium] 227. Basic Calculator II

[Medium] 227. Basic Calculator II
leetcodealgorithmmediumcppstringstackexpression-evaluationproblem-solving

[Medium] 324. Wiggle Sort II

[Medium] 324. Wiggle Sort II
leetcodealgorithmmediumcpparraysnth-elementthree-way-partitionindex-mappingproblem-solving

[Easy] 20. Valid Parentheses

[Easy] 20. Valid Parentheses
leetcodealgorithmeasycppstringstackproblem-solving

[Medium] 525. Contiguous Array

[Medium] 525. Contiguous Array
leetcodealgorithmmediumcpparrayshash-mapprefix-sumproblem-solving

[Hard] 480. Sliding Window Median

[Hard] 480. Sliding Window Median
leetcodealgorithmhardcpparraysmultisetsliding-windowtwo-heapsproblem-solving

[Hard] 239. Sliding Window Maximum

[Hard] 239. Sliding Window Maximum
leetcodealgorithmhardcpparraysdequesliding-windowmonotonic-queueproblem-solving

[Easy] 485. Max Consecutive Ones

[Easy] 485. Max Consecutive Ones
leetcodealgorithmeasycpparrayssliding-windowproblem-solving

[Medium] 18. 4Sum

[Medium] 18. 4Sum
leetcodealgorithmmediumcpparraystwo-pointerssortingproblem-solving

LC 1094: Car Pooling

LC 1094: Car Pooling
leetcodemediumarraysorting

LC 347: Top K Frequent Elements

LC 347: Top K Frequent Elements
leetcodemediumarrayhash-tableheap

322. Coin Change

322. Coin Change
leetcodemediumdynamic-programmingdpcoin-change

47. Permutations II

47. Permutations II
leetcodealgorithmmediumbacktrackingrecursionduplicates

77. Combinations

77. Combinations
leetcodemediumbacktrackingrecursioncombinations

46. Permutations

46. Permutations
leetcodealgorithmmediumbacktrackingrecursion

[Medium] 912. Sort an Array

[Medium] 912. Sort an Array
pythonsortingmerge-sortheap-sortcounting-sortdata-structuresdivide-conquerproblem-solving

Meta‑Style LeetCode Question List

Meta‑Style LeetCode Question List
leetcodealgorithmmetainterview-preparationpractice-listfaangcoding-interviewproblem-solvingcompetitive-programmingdata-structures

Hash Table Mastery List

🧩 Hash Table Mastery List
leetcodealgorithmhashdata-structuresinterview-preparationpractice-listhash-tablehash-mapproblem-solvingcompetitive-programming

LeetCode Linked List Mastery List

LeetCode Linked List Mastery List
leetcodealgorithmlinked-listdata-structuresinterview-preparationpractice-listproblem-solvingcompetitive-programmingpointerstraversal

Python Quick Reference for LeetCode

📚 Python Quick Reference for LeetCode
pythondata-structuresreferencecheat-sheetprogrammingcontainersalgorithmscompetitive-programming
← Back to Home