Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Medium LeetCode-Java-Solutions

S.no Coding Problem
1 Unique Paths II
2 Missing Ranges
3 First Unique Number
4 Minimum Number of Vertices to Reach All Nodes
5 Inorder Successor in BST
6 3Sum Closest
7 Binary Tree Zigzag Level Order Traversal
8 House Robber III
9 Campus Bikes
10 Arithmetic Subarrays
11 Grumpy Bookstore Owner
12 Linked List Cycle II
13 Reconstruct Itinerary
14 Largest Number
15 Web Crawler
16 Champagne Tower
17 Candy Crush
18 Diagonal Traverse
19 Shortest Way to Form String
20 Masking Personal Information
21 The Earliest Moment When Everyone Become Friends
22 Divide Two Integers
23 Minimum Cost to Connect Sticks
24 Lowest Common Ancestor of Deepest Leaves
25 Single Number III
26 Next Greater Element III
27 Making File Names Unique
28 Validate Binary Search Tree
29 Sparse Matrix Multiplication
30 Rectangle Overlap
31 Uncrossed Lines
32 Capacity To Ship Packages Within D Days
33 Set Matrix Zeroes
34 Flatten a Multilevel Doubly Linked List
35 Find Smallest Common Element in All Rows
36 Non Overlapping Intervals
37 Most Stones Removed with Same Row or Column
38 Shortest Word Distance II
39 Total Hamming Distance
40 Count Number of Homogenous Substrings
41 Score of Parentheses
42 Gas Station
43 Number of Subarrays with Bounded Maximum
44 Palindrome Partitioning
45 Find all Duplicates in an Array
46 Find Largest Value in Each Tree Row
47 Flatten 2D Vector
48 Convert Binary Search Tree to Sorted Doubly Linked List
49 Design a File Sharing System
50 Smallest String Starting From Leaf
51 Throne Inheritence
52 Minimum Remove to Make Valid Parentheses
53 Remove Covered Intervals
54 Minimum Add to Make Parentheses Valid
55 Arithmetic Slices
56 Binary Tree Preorder Traversal
57 Time Needed to Inform All Employees
58 Kill Process
59 Line Reflection
60 Maximum Number of Occurrences of a Substring
61 Diameter of N-ary Tree
62 Maximum Number of Non-Overlapping Subarrays With Sum Equals Target
63 Majority Element II
64 Plus One Linked List
65 Longest Consecutive Sequence
66 Find Minimum in Rotated Sorted Array
67 Decrease Elements To Make Array Zigzag
68 Binary Tree Longest Consecutive Sequence II
69 Bitwise AND of Numbers Range
70 Count Number of Teams
71 Prime Palindrome
72 Minimum Path Sum
73 Friend Circles
74 Valid Sudoku
75 Four Divisors
76 As Far from Land as Possible
77 Count Square Submatrices with All Ones
78 Linked List in Binary Tree
79 Number of Nodes in the Sub-Tree With the Same Label
80 Pseudo-Palindromic Paths in a Binary Tree
81 Pancake Sorting
82 Walls and Gates
83 Decode String
84 Combination Sum II
85 Complete Binary Tree Insertor
86 Binary Tree Pruning
87 Escape The Ghosts
88 Longest Arithmetic Sequence
89 Find the Town Judge
90 Count Numbers With Unique Digits
91 Maximum Average Subtree
92 Product of Array Except self
93 Find Bottom Left Tree Value
94 Shifting Letters
95 Minimum Knight Moves
96 Rotting Oranges
97 Palindromic Substrings
98 Maximum of Absolute Value Expression
99 Is Graph Bipartite
100 Add Two Numbers
101 Find Permutation
102 Number of Burgers with No Waste of Ingredients
103 Finding the Users Active Minutes
104 Validate Stack Sequences
105 Number of Substrings Containing All Three Characters
106 Next Greater Element II
107 Maximum Score From Removing Stones
108 Score After Flipping Matrix
109 Design Browser History
110 Meeting Scheduler
111 Perfect Squares
112 Word Search
113 Knight Dialer
114 3Sum Smaller
115 Repeated DNA Sequences
116 Construct K Palindrome Strings
117 Solve the Equation
118 Average Waiting Time
119 Combination Sum
120 Merge Intervals
121 4 Sum II
122 Advantage Shuffle
123 Number of Dice Rolls With Target Sum
124 Basic Calculator II
125 Lonely Pixel I
126 Guess Number Higher or Lower II
127 Remove Duplicate Letters
128 Group the People Given the Group Size They Belong To
129 House Robber II
130 Find the Winner of an Array Game
131 Letter Combinations of a Phone Number
132 Implement Magic Dictionary
133 Task Scheduler
134 Minimum Size Subarray Sum
135 Max Chunks To Make Sorted
136 Max Number of K-Sum Pairs
137 Longest Word in Dictionary through Deleting
138 Maximum Binary Tree
139 Find and Replace in String
140 Sort Characters By Frequency
141 Maximum Erasure Value
142 Number of Matching Subsequences
143 Camelcase Matching
144 Split Array into Consecutive Subsequences
145 Integer To Roman
146 Count Servers That Communicate
147 Minimize Maximum Pair Sum in Array
148 Construct Binary Tree from Inorder and Postorder Traversal
149 Split Linked List into Parts
150 Multiply Strings
151 Path With Minimum Effort
152 Minimum Moves to Equal Array Elements II
153 Adding Two Negabinary Numbers
154 Nested List Weight Sum II
155 Range Sum Query 2D-Immutable
156 Remove Nth Node From End of List
157 Peeking Iterator
158 Subsets
159 Design Circular Queue
160 Single Element in a Sorted Array
161 Permutations II
162 Knight Probability in Chessboard
163 Longest ZigZag Path in a Binary Tree
164 Reduce Array Size to The Half
165 Maximum Length of Pair Chain
166 Binary Tree Vertical Order Traversal
167 Maximum Product Subarray
168 Rotate List
169 Find the Celebrity
170 Swap Nodes in Pairs
171 Filter Restaurants by Vegan-Friendly, Price and Distance
172 Evaluate Division
173 Minimum Operations to Make Array Equal
174 Combinations
175 Sort List
176 Most Frequent Subtree Sum
177 Find Peak Element
178 Open The Lock
179 Fruit Into Baskets
180 Remove K Digits
181 Minimum Number of Steps to Make Two Strings Anagram
182 Satisfisbility of Equality Equations
183 Pour Water
184 Gray Code
185 Encode and Decode TinyURL
186 Game of Life
187 Time Based Key-Value Store
188 Compare Version Numbers
189 Maximum Number of Vowels in a Substring of Given Length
190 Graph Valid Tree
191 Minimum Operations to Reduce X to Zero
192 Group Anagrams
193 Lowest Common Ancestor of a Binary Tree
194 Deepest Leaves Sum
195 Boundary of Binary Tree
196 Clone N-ary Tree
197 Rotate Image
198 Self Dividing Numbers
199 Map Sum Pairs
200 Restore the Array From Adjacent Pairs
201 Find the Index of the Large Integer
202 Delete Leaves With a Given Value
203 Pow
204 Binary Tree Inorder Traversal
205 Remove Comments
206 Next Permutation
207 Design Log Storage System
208 Decode Ways
209 Number of Longest Increasing Subsequence
210 Broken Calculator
211 Vowel Spellchecker
212 4Sum
213 Find Root of N-Ary Tree
214 Rotate Function
215 Can Make Palindrome from Substring
216 Design Hit Counter
217 Insert into a Sorted Circular Linked List
218 Online Stock Span
219 Minimum Area Rectangle
220 Invalid Transactions
221 Remove All Occurrences of a Substring
222 Is Subsequence
223 Search in Rotated Sorted Array
224 Letter Tiles Possibilities
225 Path with Maximum Gold
226 Copy List with Random Pointer
227 Number of Islands
228 Custom Sort String
229 Populating Next Right Pointers in Each Node
230 All Possible Full Binary Trees
231 Sum Root to Leaf Numbers
232 Contiguous Array
233 Large Divisble Subset
234 Minimum Height Trees
235 Analyze User Website Visit Pattern
236 Partitioning Into Minimum Number Of Deci-Binary Numbers
237 Permutations
238 Coin Change 2
239 Construct Quad Tree
240 Valid Parenthesis String
241 Apply Discount Every n Orders
242 All Elements in Two Binary Search Trees
243 Longest Substring Without Repeating Characters
244 Fraction to Recurring Decimal
245 Product of the Last K Numbers
246 Wiggle Sort
247 Accounts Merge
248 Reverse Words in a String II
249 Find Leaves of Binary Tree
250 Partition Labels
251 Sort An Array
252 Hand of Straights
253 Angle Between Hands of a Clock
254 Reorder List
255 Find a Corresponding Node of a Binary Tree in a Clone of That Tree
256 Odd Even Linked Lists
257 Find Right Interval
258 Dot Product of Two Sparse Vectors
259 Minimum Number of Arrows to Burst Balloons
260 HTML Entity Parser
261 Find All Anagrams in a String
262 Boats to Save People
263 Print Words Vertically
264 Sentence Similarity III
265 Minimum Genetic Mutation
266 Split BST
267 Iterator for Combination
268 Valid Triangle Number
269 Keys and Rooms
270 Interval List Intersections
271 Subarray Sums Divisible by K
272 Maximum Level Sum of a Binary Tree
273 Expressive Words
274 Flatten Nested List Iterator
275 Corporate Flight Bookings
276 Unique Binary Search Trees
277 Longest Increasing Subsequence
278 Design A Leaderboard
279 Search in Rotated Sorted Array II
280 Tuple With Same Product
281 Delete Nodes And Return Forest
282 The kth Factor of n
283 Minimum Time Difference
284 Maximum Length of Subarray With Positive Product
285 Smallest Integer Divisible by K
286 Remove Zero Sum Consecutive Nodes from Linked List
287 Validate IP Address
288 Reduction Operations to Make the Array Elements Equal
289 Cinema Seat Allocation
290 Delete Operation for Two Strings
291 Path with Maximum Probability
292 Check If All 1's Are at Least Length K Places Away
293 RLE Iterator
294 Vertical Order Traversal Of Binary Tree
295 Increasing Subsequences
296 Number of Substrings With Only 1s
297 Delete Tree Nodes
298 Exclusive Time of Functions
299 Check If a String Is a Valid Sequence from Root to Leaves Path in a Binary Tree
300 Leftmost Column with at Least a One
301 Subsets II
302 One Edit Distance
303 Swap For Longest Repeated Character Substring
304 Find the Student that Will Replace the Chalk
305 Container With Most Water
306 4Sum II
307 Word Ladder
308 Delete Node in a BST
309 Longest Well-Performing Interval
310 Reconstruct Original Digits from English
311 Single Number II
312 Maximum Value after Insertion
313 Optimal Division
314 Network Delay Time
315 Flip Equivalent Binary Trees
316 Coin Change
317 Max Consecutives Ones II
318 Kth Smallest Element in a BST
319 Remove Interval
320 Find Nearest Right Node in Binary Tree
321 Random Pick Index
322 Distribute Coins in Binary Tree
323 Path With Maximum Minimum Value
324 Partition List
325 Number of Distinct Islands
326 Design Circular Deque
327 Implement Trie (Prefix Tree)
328 Largest BST Subtree
329 Range Sum Query - Mutable
330 Mini Parser
331 Maximum Distance Between a Pair of Values
332 Alert Using Same Key-Card Three or More Times in a One Hour Period
333 Linked List Components
334 Binary Tree Upside Down
335 Max Increase to Keep City Skyline
336 Daily Temperatures
337 Binary Search Tree to Greater Sum Tree
338 Subarray Product Less Than K
339 Design a Stack With Increment Operation
340 Break a Palindrome
341 Maximum Size Subarray Sum Equals k
342 Subarray Sum Equals K
343 Car Pooling
344 Remove Sub-Folders from the Filesystem
345 Add and Search Word - Data structure design
346 Sum of Nodes with Even-Valued Grandparent
347 Check If a String Can Break Another String
348 Ternary Expression Parser
349 Generate Parentheses
350 Encode and Decode Strings
351 Asteroid Collision
352 Minimum Deletion Cost to Avoid Repeating Letters
353 Design Phone Directory
354 Remove Duplicates from Sorted List II
355 Random Pick With Weight
356 Swapping Nodes in a Linked List
357 Number of Connected Components in an Undirected Graph
358 Display Table of Food Orders in a Restaurant
359 Campus Bikes II
360 Longest Line of Consecutive One in Matrix
361 Zigzag Iterator
362 Merge In Between Linked Lists
363 Surrounded Regions
364 Seat Reservation Manager
365 Print Immutable Linked List in Reverse
366 Incremental Memory Leak
367 Reverse Words in a String
368 Simplify Path
369 Design Underground System
370 Sequential Digits
371 Shortest Path with Alternating Colors
372 Find K Pairs with Smallest Sums
373 Check if There is a Valid Path in a Grid
374 Ugly Number II
375 Find First and Last Position of Element in Sorted Array
376 Clone Binary Tree With Random Pointer
377 Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit
378 Super Ugly Number
379 Add Two Numbers II
380 Implement Rand10() Using Rand7()
381 Minimum Deletions to Make Character Frequencies Unique
382 Array Nesting
383 Valid Square
384 Course Schedule
385 The k Strongest Values in an Array
386 Path Sum II
387 Unique Paths
388 Replace Words
389 Rank Teams by Votes
390 Jump Game
391 Can Convert String in K Moves
392 Least Number of Unique Integers after K Removals
393 Sum of Absolute Differences in a Sorted Array
394 Linked List Random Node
395 Valid Tic-Tac-Toe State
396 Increasing Triplet Subsequence
397 Range Addition
398 Insert Into a Cyclic Sorted List
399 Count Submatrices With All Ones
400 Shuffle an Array
401 Battleships in a board
402 Shortest Path in Binary Matrix
403 Complex Number Multiplication
404 Queries on a Permutation With Key
405 Find Duplicate Subtrees
406 Maximum Ice Cream Bars
407 My Calendar I
408 Reorder Routes to Make All Paths Lead to the City Zero
409 Evaluate Reverse Polish Notation
410 Maximum Width Ramp
411 Counting Bits
412 Number of Sub-arrays of Size K and Average Greater than or Equal to Threshold
413 Range Sum of Sorted Subarray Sums
414 Find Center of Star Graph
415 Add Bold Tag in String
416 Reverse Linked List II
417 Permutation in String
418 Shortest Word Distance III
419 Serialize and Deserialize BST
420 Minimum Domino Rotations For Equal Row
421 132 Pattern
422 Remove All Adjacent Duplicates in String II
423 Insertion Sort List
424 Find the duplicate number
425 Design Twitter
426 Last Moment Before All Ants Fall Out of a Plank
427 Sentence Similarity II
428 Last Stone Weight II
429 Rectangle Area
430 My Calendar II
431 Search Suggestions System
432 Subrectangle Queries
433 Sort the Matrix Diagonally
434 Convert Sorted List to Binary Search Tree
435 Bulb Switcher
436 Verify Preorder Serialization of a Binary Tree
437 Inorder Successor in BST II
438 Add Minimum Number of Rungs
439 Find the City With the Smallest Number of Neighbors at a Threshold Distance
440 Output Contest Matches
441 H-Index
442 Best Time to Buy and Sell Stock with Cooldown
443 Rabbits in Forest
444 Count Univalue Subtrees
445 Find Elements in a Contaminated Binary Tree
446 Next Greater Node In Linked List
447 Find and Replace Pattern
448 Design File System
449 Determine if Two Strings Are Close
450 Maximum Absolute Sum of Any Subarray
451 Kth Largest Element in an Array
452 The Number of Full Rounds You Have Played
453 Snapshot Array
454 Top K Frequent Elements
455 Teemo Attacking
456 Smallest Subtree with all the Deepest Nodes
457 Maximal Network Rank
458 Kth Smallest Element in a Sorted Matrix
459 Minimum Score Triangulation of Polygon
460 Binary Tree Coloring Game
461 Maximum Difference Between Node and Ancestor
462 Combination Sum III
463 Find K Closest Elements
464 01 Matrix
465 Clone Graph
466 Longest Palindromic Substring
467 Robot Bounded In Circle
468 Koko Eating Bananas
469 Statistics from a Large Sample
470 Insert Delete GetRandom O(1)
471 Snakes and Ladders
472 Longest Palindromic Subsequence
473 Sort Transformed Array
474 Search in a Sorted Array of Unknown Size
475 Count Complete Tree Nodes
476 Minesweeper
477 String to Integer(atoi)
478 Online Election
479 Find K-Length Substrings With No Repeated Characters
480 Word Break
481 Find the Kth Largest Integer in the Array
482 Flatten Binary Tree to Linked List
483 Sort Colors
484 Longest Absolute File Path
485 Prison Cells After N Days
486 Insert into a Binary Search Tree
487 Course Schedule II
488 Remove Duplicates From Sorted Array II
489 Binary Search Tree Iterator
490 Find Duplicate File in System
491 Insufficient Nodes in Root to Leaf Paths
492 Divide Array in Sets of K Consecutive Numbers
493 Check Completeness of a Binary Tree
494 Two Sum BSTs
495 Count Sorted Vowel Strings
496 Check If a String Contains All Binary Codes of Size K
497 Contains Duplicate III
498 Spiral Matrix
499 Next Closest Time
500 Group Shifted Strings
501 Array Circular Loop
502 ZigZag Conversion
503 Number of Matching Subsequence
504 All Paths From Source to Target
505 Spiral Matrix II
506 Design Authentication Manager
507 People Whose List of Favorite Companies Is Not a Subset of Another List
508 Binary Tree Longest Consecutive Sequence
509 All Paths from Source Lead to Destination
510 Trim a Binary Search Tree
511 Rotate Array
512 Unique Word Abbrevation
513 Binary Tree Right Side View
514 All Nodes Distance K in Binary Tree
515 Queue Reconstruction By Height
516 Medium
517 Meeting Rooms II
518 Maximum Binary Tree II
519 Smallest String With A Given Numeric Value
520 Print Binary Tree
521 Restore IP Address
522 Water & Jug Problem
523 Maximum Width of Binary Tree
524 Target Sum
525 Top K Frequent Words
526 Maximize Distance to Closest Person
527 Design Tic-Tac-Toe
528 H-Index II
529 3Sum
530 Reorganize String
531 Reverse Substrings Between Each Pair of Parentheses
532 Maximum XOR of Two Numbers in an Array
533 Count Good Nodes in Binary Tree
534 Missing Element in Sorted Array
535 Even Odd Tree
536 Search for a range
537 Numbers With Same Consecutive Differences
538 Populating Next Right Pointers in Each Node II
539 Construct Binary Search Tree from Preorder Traversal
540 Shortest Completing Word
541 Search a 2D Matrix
542 Add One Row to Tree