Skip to content

HopefulRational/leetcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

leetcode solutions

LLD Solutions

Total : 60 All Solutions
Problem Solution
Special Subarrays Solution
Encode and Decode Strings (Medium) - NeetCode Solution
Maximum sum of Non-adjacent nodes (Medium) - GFG Solution
2. Add Two Numbers (Medium) Solution
3. Longest Substring Without Repeating Characters (Medium) Solution
4. Median of Two Sorted Arrays (Hard) Solution
11. Container With Most Water (Medium) Solution
19. Remove Nth Node From End of List (Medium) Solution
22. Generate Parentheses (Medium) Solution
23. Merge k Sorted Lists (Hard) Solution
25. Reverse Nodes in k-Group (Hard) Solution
36. Valid Sudoku (Medium) Solution
39. Combination Sum (Medium) Solution
42. Trapping Rain Water (Hard) Solution
49. Group Anagrams (Medium) Solution
74. Search a 2D Matrix (Medium) Solution
76. Minimum Window Substring (Hard) Soltion
78. Subsets (Medium) Solution
81. Search in Rotated Sorted Array II (Medium) Solution
84. Largest Rectangle in Histogram (Hard) Solution
121. Best Time to Buy and Sell Stock (Easy) Solution
124. Binary Tree Maximum Path Sum (Hard) Solution
125. Valid Palindrome (Easy) Solution
128. Longest Consecutive Sequence (Medium) Solution
130. Surrounded Regions (Medium) Solution
133. Clone Graph (Medium) Solution
138. Copy List with Random Pointer (Medium) Solution
141. Linked List Cycle (Easy) Solution
143. Reorder List (Medium) Solution
146. LRU Cache (Medium) Solution
153. Find Minimum in Rotated Sorted Array(Medium) Solution
155. Min Stack (Medium) Solution
206. Reverse Linked List (Easy) Solution
235. Lowest Common Ancestor of a Binary Search Tree Solution
239. Sliding Window Maximum (Hard) Solution
242. Valid Anagram (Easy) Solution
257. Binary Tree Paths (Easy) Soluiton
287. Find the Duplicate Number (Medium) Solution
424. Longest Repeating Character Replacement (Medium) Solution
515. Find Largest Value in Each Tree Row (Medium) Solution
543. Diameter of Binary Tree (Easy) Solution
559. Maximum Depth of N-ary Tree (Easy) Solution
567. Permutation in String (Medium) Solution
684. Redundant Connection (Medium) Solution
704. Binary Search (Easy) Solution
808. Soup Servings (Medium) Solution
865. Smallest Subtree with all the Deepest Nodes (Medium) Solution
853. Car Fleet (Medium) Solution
875. Koko Eating Bananas (Medium) Solution
930. Binary Subarrays With Sum (Medium) Solution
968. Binary Tree Cameras (Hard) Solution
979. Distribute Coins in Binary Tree (Medium) Solution
981. Time Based Key-Value Store (Medium) Solution
988. Smallest String Starting From Leaf (Medium) Solution
990. Satisfiability of Equality Equations (Medium) Solution
994. Rotting Oranges (Medium) Solution
1034. Coloring A Border (Medium) Solution
1080. Insufficient Nodes in Root to Leaf Paths (Medium) Solution
1559. Detect Cycles in 2D Grid (Medium) Solution
Array & Hashing
Num Problem Solution
1 981. Time Based Key-Value Store (Medium) Solution
2 242. Valid Anagram (Easy) Solution
3 49. Group Anagrams (Medium) Solution
4 Encode and Decode Strings (Medium) - NeetCode Solution
5 36. Valid Sudoku (Medium) Solution
6 128. Longest Consecutive Sequence (Medium) Solution
7 853. Car Fleet (Medium) Solution
Linked List
Num Problem Solution
1 206. Reverse Linked List (Easy) Solution
2 21. Merge Two Sorted Lists (Easy) Solution
3 141. Linked List Cycle (Easy) Solution
4 143. Reorder List (Medium) Solution
5 19. Remove Nth Node From End of List (Medium) Solution
6 138. Copy List with Random Pointer (Medium) Solution
7 2. Add Two Numbers (Medium) Solution
8 287. Find the Duplicate Number (Medium) Solution
9 146. LRU Cache (Medium) Solution
10 23. Merge k Sorted Lists (Hard) Solution
11 25. Reverse Nodes in k-Group (Hard) Solution
Stacks & Queues
Num Problem Solution
1 155. Min Stack (Medium) Solution
2 22. Generate Parentheses (Medium) Solution
3 84. Largest Rectangle in Histogram (Hard) Solution
Two Pointers
Num Problem Solution
1 125. Valid Palindrome (Easy) Solution
2 11. Container With Most Water (Medium) Solution
3 42. Trapping Rain Water (Hard) Solution
Sliding Window
Num Problem Solution
1 930. Binary Subarrays With Sum (Medium) Solution
2 121. Best Time to Buy and Sell Stock (Easy) Solution
3 3. Longest Substring Without Repeating Characters (Medium) Solution
4 424. Longest Repeating Character Replacement (Medium) Solution
5 567. Permutation in String (Medium) Solution
6 76. Minimum Window Substring (Hard) Soltion
7 239. Sliding Window Maximum (Hard) Solution
Binary Search
Num Problem Solution
1 704. Binary Search (Easy) Solution
2 74. Search a 2D Matrix (Medium) Solution
3 875. Koko Eating Bananas (Medium) Solution
4 153. Find Minimum in Rotated Sorted Array(Medium) Solution
5 81. Search in Rotated Sorted Array II (Medium) Solution
6 4. Median of Two Sorted Arrays (Hard) Solution
Heap/Priority Queue
Num Problem Solution
Data 1 Data 2 Data 3
More Data Centered Aligned
Backtracking
Num Problem Solution
1 78. Subsets (Medium) Solution
2 39. Combination Sum (Medium) Solution
Trees
Num Problem Solution
1 865. Smallest Subtree with all the Deepest Nodes (Medium) Solution
2 257. Binary Tree Paths (Easy) Soluiton
3 515. Find Largest Value in Each Tree Row (Medium) Solution
4 1080. Insufficient Nodes in Root to Leaf Paths (Medium) Solution
5 559. Maximum Depth of N-ary Tree (Easy) Solution
6 979. Distribute Coins in Binary Tree (Medium) Solution
7 968. Binary Tree Cameras (Hard) Solution
8 988. Smallest String Starting From Leaf (Medium) Solution
9 543. Diameter of Binary Tree (Easy) Solution
10 124. Binary Tree Maximum Path Sum (Hard) Solution
11 235. Lowest Common Ancestor of a Binary Search Tree (Medium) Solution
12 1034. Coloring A Border (Medium) Solution
13 Maximum sum of Non-adjacent nodes (Medium) - GFG Solution
Tries
Num Problem Solution
More Data Centered Aligned
Graphs
Num Problem Solution
1 130. Surrounded Regions (Medium) Solution
2 990. Satisfiability of Equality Equations (Medium) Solution
3 994. Rotting Oranges (Medium) Solution
4 1559. Detect Cycles in 2D Grid (Medium) Solution
5 684. Redundant Connection (Medium) Solution
6 133. Clone Graph (Medium) Solution
7 BFS of graph (Easy) - GFG Solution
8 DFS of Graph (Easy) - GFG Solution
9 Number of Provinces (Medium) - GFG Solution
10 Find the number of islands (Medium) - GFG Solution
11 Flood Fill Algorithm (Medium) - GFG Solution
12 Rotten Oranges (Medium) - GFG Solution
13 Undirected Graph Cycle (Medium) - GFG Solution
14 Distance of nearest cell having 1 (Medium) - GFG Solution
15 Replace O's with X's (Medium) - GFG Solution
16 Number Of Enclaves (Medium) - GFG Solution
17 Number of Distinct Islands (Medium) - GFG Solution
18 Bipartite Graph (Medium) - GFG Solution
19 Directed Graph Cycle (Medium) - GFG Solution
20 Solution
21 Solution
22 Solution
23 Solution
24 Solution
Greedy
Num Problem Solution
Data 1 Data 2 Data 3
More Data Centered Aligned
1D Dynamic Programming
Num Problem Solution
1 70. Climbing Stairs (Easy) Solution
2 Max Sum without Adjacents (Medium) - GFG Solution
3 198. House Robber (Medium) Solution
4 213. House Robber II (Medium) Solution
Solution
Solution
Solution
Solution
Solution
Solution
More Data Centered Aligned
2D Dynamic Programming
Num Problem Solution
1 808. Soup Servings (Medium) Solution
2 62. Unique Paths (Medium) Solution
3 120. Triangle (Medium) Solution
4 Maximum path sum in matrix (Medium) - GFG Solution
5 1463. Cherry Pickup II (Hard) Solution
6 416. Partition Equal Subset Sum (Medium) Solution
7 1049. Last Stone Weight II (Medium) Solution
Intervals
Num Problem Solution
Data 1 Data 2 Data 3
More Data Centered Aligned
Math and Geometry
Num Problem Solution
1 Special Subarrays Solution
Bit Manipulation
Num Problem Solution
Data 1 Data 2 Data 3
More Data Centered Aligned
Miscellaneous
Num Problem Solution
Data 1 Data 2 Data 3
More Data Centered Aligned
For New Table
Num Problem Solution
Data 1 Data 2 Data 3
More Data Centered Aligned

About

Leetcode Soluitons

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages