పరిష్కారాలు
LeetCode పరిష్కారాలు, దశలవారీగా వివరణతో
నేను పరిష్కరించిన 310 ప్రాబ్లమ్స్ — ప్రతిదానికీ intuition, approach, నా accepted కోడ్, complexity, animated test cases, line-by-line debugger.
పరిష్కారాల వివరణ ఇంగ్లీష్లో ఉంది.
Array42
Hashing / Anagram
- 1. Two Sumసులభం
- 217. Contains Duplicateసులభం
- 242. Valid Anagramసులభం
- 350. Intersection of Two Arrays IIసులభం
- 268. Missing Numberసులభం
- 136. Single Numberసులభం
- 49. Group Anagramsమధ్యస్థం
- 128. Longest Consecutive Sequenceమధ్యస్థం
Prefix Sum
- 238. Product of Array Except Selfమధ్యస్థం
- 560. Subarray Sum Equals Kమధ్యస్థం
- 523. Continuous Subarray Sumమధ్యస్థం
Two Pointers
- 202. Happy Numberసులభం
- 88. Merge Sorted Arrayసులభం
- 283. Move Zeroesసులభం
- 26. Remove Duplicates from Sorted Arrayసులభం
- 27. Remove Elementసులభం
- 125. Valid Palindromeసులభం
- 167. Two Sum II - Input Array Is Sortedమధ్యస్థం
- 15. 3Sumమధ్యస్థం
- 16. 3Sum Closestమధ్యస్థం
- 18. 4Sumమధ్యస్థం
- 11. Container With Most Waterమధ్యస్థం
- 31. Next Permutationమధ్యస్థం
- 80. Remove Duplicates from Sorted Array IIమధ్యస్థం
- 189. Rotate Arrayమధ్యస్థం
- 75. Sort Colorsమధ్యస్థం
- 42. Trapping Rain Waterకఠినం
Kadane
- 53. Maximum Subarrayమధ్యస్థం
Matrix
- 48. Rotate Imageమధ్యస్థం
- 73. Set Matrix Zeroesమధ్యస్థం
- 54. Spiral Matrixమధ్యస్థం
- 36. Valid Sudokuమధ్యస్థం
- 289. Game of Lifeమధ్యస్థం
Sorting
- 56. Merge Intervalsమధ్యస్థం
Cyclic Sort / Index Marking
Counting Sort
- 274. H-Indexమధ్యస్థం
Moore Voting
- 169. Majority Elementసులభం
- 229. Majority Element IIమధ్యస్థం
Linear Scan
Design
String18
Two Pointers
- 344. Reverse Stringసులభం
- 680. Valid Palindrome IIసులభం
- 392. Is Subsequenceసులభం
- 151. Reverse Words in a Stringమధ్యస్థం
Palindrome / Expand Around Center
- 5. Longest Palindromic Substringమధ్యస్థం
String Matching (KMP / Rabin-Karp)
Hashing / Frequency
- 205. Isomorphic Stringsసులభం
- 290. Word Patternసులభం
Parsing / Conversion
- 13. Roman to Integerసులభం
- 8. String to Integer (atoi)మధ్యస్థం
- 6. Zigzag Conversionమధ్యస్థం
- 165. Compare Version Numbersమధ్యస్థం
- 38. Count and Sayమధ్యస్థం
Math
- 50. Pow(x, n)మధ్యస్థం
- 7. Reverse Integerమధ్యస్థం
Prefix / Misc
Sliding Window
Sliding Window14
Fixed Window
Variable Window – Longest
Variable Window – Shortest / Minimum
- 209. Minimum Size Subarray Sumమధ్యస్థం
Counting Subarrays (Exactly K = AtMost K − AtMost K−1)
Window + Hashing (Multi-word)
Monotonic Queue
Prefix / Circular Window
Binary Search20
Basics / Lower & Upper Bound
Rotated Sorted Array
Peak / Check Mid Sides
- 162. Find Peak Elementమధ్యస్థం
- 540. Single Element in a Sorted Arrayమధ్యస్థం
Binary Search on Answer
2D Matrix
- 74. Search a 2D Matrixమధ్యస్థం
- 240. Search a 2D Matrix IIమధ్యస్థం
Two Sorted Arrays / Partition
Math / Missing Numbers
Design
- 981. Time Based Key-Value Storeమధ్యస్థం
Linked List20
Basics
Fast & Slow Pointers
- 141. Linked List Cycleసులభం
- 142. Linked List Cycle IIమధ్యస్థం
- 19. Remove Nth Node From End of Listమధ్యస్థం
Reversal
- 206. Reverse Linked Listసులభం
- 92. Reverse Linked List IIమధ్యస్థం
- 61. Rotate Listమధ్యస్థం
- 25. Reverse Nodes in k-Groupకఠినం
Merge
Palindrome
Reordering / Partition
- 86. Partition Listమధ్యస్థం
Intersection
Deep Copy / Multilevel
Design
- 146. LRU Cacheమధ్యస్థం
- 460. LFU Cacheకఠినం
Sorting
- 148. Sort Listమధ్యస్థం
Arithmetic
- 2. Add Two Numbersమధ్యస్థం
Stack & Queue18
Parentheses / Bracket Matching
Stack Simulation / String Processing
Expression Evaluation
Stack / Queue Design
Iterator (Stack-based)
- 173. Binary Search Tree Iteratorమధ్యస్థం
Queue Simulation
Monotonic Stack – Next / Previous Greater or Smaller
Monotonic Stack – Greedy Removal
- 402. Remove K Digitsమధ్యస్థం
Monotonic Stack – Contribution / Area
Tree33
Traversals (Recursive / Iterative)
DFS Basics
Root-to-Leaf Paths
- 112. Path Sumసులభం
- 129. Sum Root to Leaf Numbersమధ్యస్థం
BFS / Level Order
Lowest Common Ancestor / Distance
BST
Construction / Serialization
- 105. Construct Binary Tree from Preorder and Inorder Traversalమధ్యస్థం
- 106. Construct Binary Tree from Inorder and Postorder Traversalమధ్యస్థం
- 1008. Construct Binary Search Tree from Preorder Traversalమధ్యస్థం
- 114. Flatten Binary Tree to Linked Listమధ్యస్థం
- 297. Serialize and Deserialize Binary Treeకఠినం
Tree DP
Heap8
Top K
- 973. K Closest Points to Originమధ్యస్థం
- 215. Kth Largest Element in an Arrayమధ్యస్థం
- 347. Top K Frequent Elementsమధ్యస్థం
- 658. Find K Closest Elementsమధ్యస్థం
Two Heaps
K-way Merge
Greedy + Heap / Scheduling
- 621. Task Schedulerమధ్యస్థం
Recursion & Backtracking18
Recursion Basics
- 1922. Count Good Numbersమధ్యస్థం
Subsets
- 78. Subsetsమధ్యస్థం
- 90. Subsets IIమధ్యస్థం
Combinations
- 77. Combinationsమధ్యస్థం
- 39. Combination Sumమధ్యస్థం
- 40. Combination Sum IIమధ్యస్థం
- 216. Combination Sum IIIమధ్యస్థం
- 17. Letter Combinations of a Phone Numberమధ్యస్థం
Permutations
- 46. Permutationsమధ్యస్థం
- 47. Permutations IIమధ్యస్థం
- 60. Permutation Sequenceకఠినం
Generate / Build Strings
- 22. Generate Parenthesesమధ్యస్థం
Partitioning
- 131. Palindrome Partitioningమధ్యస్థం
Constraint Satisfaction
- 51. N-Queensకఠినం
- 52. N-Queens IIకఠినం
- 37. Sudoku Solverకఠినం
- 282. Expression Add Operatorsకఠినం
Grid Search / Backtracking DFS
- 79. Word Searchమధ్యస్థం
Greedy11
Sorting + Simple Greedy
- 455. Assign Cookiesసులభం
- 12. Integer to Romanమధ్యస్థం
Jump / Reachability
- 55. Jump Gameమధ్యస్థం
- 45. Jump Game IIమధ్యస్థం
- 134. Gas Stationమధ్యస్థం
- 122. Best Time to Buy and Sell Stock IIమధ్యస్థం
Local Choice / Two-pass
- 135. Candyకఠినం
Intervals
- 228. Summary Rangesసులభం
- 57. Insert Intervalమధ్యస్థం
- 435. Non-overlapping Intervalsమధ్యస్థం
- 452. Minimum Number of Arrows to Burst Balloonsమధ్యస్థం
Graph40
Graph Fundamentals / BFS
- 133. Clone Graphమధ్యస్థం
- 200. Number of Islandsమధ్యస్థం
Graph Fundamentals / DFS
- 733. Flood Fillసులభం
- 841. Keys and Roomsమధ్యస్థం
- 1020. Number of Enclavesమధ్యస్థం
- 1466. Reorder Routes to Make All Paths Lead to the City Zeroమధ్యస్థం
- 130. Surrounded Regionsమధ్యస్థం
Graph Fundamentals / DFS + DSU
- 547. Number of Provincesమధ్యస్థం
Multi-Source BFS
- 542. 01 Matrixమధ్యస్థం
- 1162. As Far from Land as Possibleమధ్యస్థం
- 1765. Map of Highest Peakమధ్యస్థం
- 994. Rotting Orangesమధ్యస్థం
State-Space BFS
- 433. Minimum Genetic Mutationమధ్యస్థం
- 1926. Nearest Exit from Entrance in Mazeమధ్యస్థం
- 909. Snakes and Laddersమధ్యస్థం
Bipartite / 2-Coloring
- 785. Is Graph Bipartite?మధ్యస్థం
Topological Sort / DAG
- 207. Course Scheduleమధ్యస్థం
- 210. Course Schedule IIమధ్యస్థం
- 802. Find Eventual Safe Statesమధ్యస్థం
State-Space / Transformation BFS
- 399. Evaluate Divisionమధ్యస్థం
- 127. Word Ladderకఠినం
- 126. Word Ladder IIకఠినం
Shortest Path / Dijkstra
Shortest Path / Floyd-Warshall
Minimum Spanning Tree
Union Find / DSU
Bridges / Articulation Points
Graph DP
Shortest Path / BFS-Dijkstra
Graph Fundamentals / DFS-BFS
Dynamic Programming52
1D / Fibonacci
- 70. Climbing Stairsసులభం
- 509. Fibonacci Numberసులభం
- 746. Min Cost Climbing Stairsసులభం
- 198. House Robberమధ్యస్థం
- 213. House Robber IIమధ్యస్థం
Kadane / Subarray DP
- 152. Maximum Product Subarrayమధ్యస్థం
- 918. Maximum Sum Circular Subarrayమధ్యస్థం
State Machine / Stocks
Grid DP
- 3418. Maximum Amount of Money Robot Can Earnమధ్యస్థం
- 931. Minimum Falling Path Sumమధ్యస్థం
- 64. Minimum Path Sumమధ్యస్థం
- 62. Unique Pathsమధ్యస్థం
- 63. Unique Paths IIమధ్యస్థం
Triangle / Pascal
- 118. Pascal's Triangleసులభం
- 119. Pascal's Triangle IIసులభం
- 120. Triangleమధ్యస్థం
0/1 Knapsack / Subset Sum
- 416. Partition Equal Subset Sumమధ్యస్థం
- 494. Target Sumమధ్యస్థం
Unbounded Knapsack
- 322. Coin Changeమధ్యస్థం
- 518. Coin Change IIమధ్యస్థం
- 279. Perfect Squaresమధ్యస్థం
String DP / Word Break
- 91. Decode Waysమధ్యస్థం
- 97. Interleaving Stringమధ్యస్థం
- 139. Word Breakమధ్యస్థం
- 472. Concatenated Wordsకఠినం
- 72. Edit Distanceమధ్యస్థం
- 698. Partition to K Equal Sum Subsetsమధ్యస్థం
- 44. Wildcard Matchingకఠినం
- 140. Word Break IIకఠినం
LCS
- 583. Delete Operation for Two Stringsమధ్యస్థం
- 1143. Longest Common Subsequenceమధ్యస్థం
- 516. Longest Palindromic Subsequenceమధ్యస్థం
- 718. Maximum Length of Repeated Subarrayమధ్యస్థం
- 115. Distinct Subsequencesకఠినం
- 1312. Minimum Insertion Steps to Make a String Palindromeకఠినం
- 1092. Shortest Common Supersequenceకఠినం
LIS
Palindrome / Interval DP
DP on Squares / Matrix
- 1277. Count Square Submatrices with All Onesమధ్యస్థం
- 221. Maximal Squareమధ్యస్థం
Game DP
- 1025. Divisor Gameసులభం
- 877. Stone Gameమధ్యస్థం
DP on Array
- 403. Frog Jumpకఠినం
Top Interview 15012
Other
- 222. Count Complete Tree Nodesమధ్యస్థం
- 58. Length of Last Wordసులభం
- 9. Palindrome Numberసులభం
- 66. Plus Oneసులభం
- 383. Ransom Noteసులభం
- 427. Construct Quad Treeమధ్యస్థం
- 172. Factorial Trailing Zeroesమధ్యస్థం
- 117. Populating Next Right Pointers in Each Node IIమధ్యస్థం
- 149. Max Points on a Lineకఠినం
- 68. Text Justificationకఠినం