Skip to content

Harshsaini001/leetcode-algorithms

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

LeetCode Algorithms

problems-solved problems-solved-java problems-solved-python problems-solved-javascript PRs Welcome cp

πŸ”’ = Subscription Content

Problems

# Name Solution Youtube
1 Two Sum Java Python java-yt python-yt
2 Add Two Numbers Java js
3 Longest Substring Without Repeating Characters Java
5 Longest Palindromic Substring Java
6 Zigzag Conversion Java
7 Reverse Integer Java Python js java-yt python-yt
8 String to Integer (atoi) Java
9 Palindrome Number Java Python js
11 Container With Most Water Java
12 Integer to Roman Java
13 Roman To Integer Java Python java-yt python-yt
14 Longest Common Prefix Java Python
15 3Sum Java
16 3Sum Closest Java
17 Letter Combinations of a Phone Number Java
18 4Sum Java
19 Remove Nth Node From End of List Java
20 ValidParentheses Java Python
21 Merge 2 Sorted Lists Java Python
22 Generate Parentheses Java
24 Swap Nodes in Pairs Java
26 Remove Duplicates From Sorted Array Java Python js
27 Remove Element Java Python
28 Needle in Haystack Java Python
29 Divide Two Integers Java
31 Next Permutation Java
33 Search in Rotated Sorted Array Java
34 Find First and Last Position of Element in Sorted Array Java
35 Search Inserted Position Java Python
36 Valid Sudoku Java
37 Sudoku Solver Java
38 Count and Say Java Python
39 Combination Sum Java
40 Combination Sum II Java
42 Trapping Rain Water Java
43 Multiply Strings Java
45 Jump Game II Java
46 Permutations Java
47 Permutations II Java
48 Rotate Image Java
49 Group Anagrams Java
50 Pow(x,n) Java
53 Maximum SubArray Java Python
54 Spiral Matrix Java
55 Jump Game Java
56 Merge Intervals Java
57 Insert Interval Java
58 Length of Last Word Java Python
59 Spiral Matrix II Java
61 Rotate List Java
62 Unique Paths Java
63 Unique Paths II Java
64 Minimum Path Sum Java Python
66 Plus One Java Python
67 Add Binary Java Python
69 Sqrt(x) Java Python
70 Climbing Stairs Java Python
71 Simplify Path Java
73 Set Matrix Zeroes Java
74 Search a 2D Matrix Java
75 Sort Colors Java
77 Combinations Java
78 Subsets Java
79 Word Search Java
80 Remove Duplicates from Sorted Array II Java
81 Search in Rotated Sorted Array II Java
82 Remove Duplicates from Sorted List II Java
83 Remove Duplicates from Sorted List Java Python
86 Partition List Java
87 Scramble String Python
88 Merge Sorted Array Java Python
89 Gray Code Java
90 Subsets II Java
91 Decode Ways Java
92 Reverse Linked List II Java
93 Restore IP Addresses Java
94 Binary Tree Inorder Traversal Java Python
95 Unique Binary Search Trees II Java
96 Unique Binary Search Trees Java
97 Interleaving String Java
98 Validate Binary Search Tree Java
99 Recover Binary Search Tree Java
100 Same Tree Java Python
101 Symmetric Tree Java Python
102 Binary Tree Level Order Traversal Java
103 Binary Tree Zigzag Level Order Traversal Java
104 Maximum Depth of Binary Tree Java Python
105 Construct Binary Tree from Preorder and Inorder Traversal Java
106 Construct Binary Tree from Inorder and Postorder Traversal Java
107 Binary Tree Level Order Traversal II Java Python
108 Convert Sorted Array To Binary Search Tree Java Python
109 Convert Sorted List to Binary Search Tree Java
110 Balanced Binary Tree Java Python
111 Minimum Depth of Binary Tree Java Python
112 Path Sum Java Python
113 Path Sum II Java
114 Flatten Binary Tree to Linked List Java
116 Populating Next Right Pointers in Each Node Java
117 Populating Next Right Pointers in Each Node II Java
118 Pascal's Triangle Java Python
119 Pascal's Triangle II Java Python
120 Triangle Java
121 Best Time to Buy and Sell Stocks Java Python
122 Best Time to Buy and Sell Stocks II Java Python
125 Valid Palindrome Java Python
128 Longest Consecutive Sequence Java
129 Sum Root to Leaf Numbers Java
130 Surrounded Regions Java
131 Palindrome Partitioning Java
133 Clone Graph Java Python
134 Gas Station Java
136 Single Number Java Python
137 Single Number II Java
138 Copy List with Random Pointer Java
139 Word Break Java
141 Linked List Cycle Java Python
142 Linked List Cycle II Java
143 Reorder List Java
144 Binary Tree Preorder Traversal Java Python
145 Binary Tree Postorder Traversal Java Python
146 LRU Cache Java
147 Insertion Sort List Java
148 Sort List Java
150 Evaluate Reverse Polish Notation Java
151 Reverse Words in a String Java
152 Maximum Product Subarray Java
153 Find Minimum in Rotated Sorted Array Java
155 Min Stack Java Python
156 πŸ”’ Binary Tree Upside Down
157 Read N Characters Given Read4
159 πŸ”’ Longest Substring With At Most Two Distinct Characters
160 Intersection of Two Linked Lists Java Python
161 πŸ”’ One Edit Distance
162 Find Peak Element Java
165 Compare Version Numbers Java
166 Fraction to Recurring Decimal Java
167 Two Sum II - Input Array is Sorted Java Python
168 Excel Sheet Column Title Java Python
169 Majority Element Java Python
170 πŸ”’ Two Sum III - Data Structure Design
171 Excel Sheet Column Number Java Python
172 Factoring Trailing Zeroes Java Python
173 Binary Search Tree Iterator Java
179 Largest Number Java
187 Repeated DNA Sequences Java
189 Rotate Array Java Python
190 Reverse Bits Java Python
191 Number of One Bits Java Python
198 House Robber Java Python
199 Binary Tree Right Side View Java
200 Number of Islands Java Python
201 Bitwise AND of Numbers Range Java
202 Happy Number Java Python
203 Remove Linked List Elements Java Python
204 Count Primes Java Python
205 Isomorphic Strings Java Python
206 Reverse Linked List Java Python
207 Course Schedule Java
208 Implement Trie (Prefix Tree) Java Python
209 Minimum Size Subarray Sum Java
210 Course Schedule II Java
211 Design Add and Search Words Data Structure Java Python
213 House Robber II Java
215 Kth Largest Element in an Array Java
216 Combination Sum III Java
217 Contains Duplicate Java Python
218 The Skyline Problem Python
219 Contains Duplicate II Java Python
220 Contains Duplicate III Java
221 Maximal Square Java
222 Count Complete Tree Nodes Java
223 Rectangle Area Java
225 Implement Stack using Queues Java Python
226 Invert Binary Tree Java Python
227 Basic Calculator II Java
229 Majority Element II Java
230 Kth Smallest Element in a BST Java
231 Power of Two Java Python
232 Implement Queue Using Stacks Java Python
234 Palindrome Linked Lists Java Python
235 Lowest Common Ancestor of a Binary Search Tree Java Python
236 Lowest Common Ancestor of a Binary Tree Java
237 Delete a Node In A Linked List Java Python
238 Product of Array Except Self Java
240 Search a 2D Matrix II Java
241 Different Ways to Add Parentheses
242 Valid Anagram Java Python
243 πŸ”’ Shortest Word Distance
244 πŸ”’ Shortest Word Distance II
245 πŸ”’ Shortest Word Distance III
246 πŸ”’ Strobogramatic Number
247 πŸ”’ Strobogramatic Number II
249 πŸ”’ Group Shifted Strings
250 πŸ”’ Count Univalue Subtrees
251 πŸ”’ Flatten 2D Vector
252 πŸ”’ Meeting Rooms
253 πŸ”’ Meeting Rooms II
254 πŸ”’ Factor Combinations
255 πŸ”’ Verify Preorder Sequence In Binary Search Tree
256 πŸ”’ Paint House
257 Binary Tree Paths Java Python
258 Add Digits Java Python
259 πŸ”’ 3Sum Smaller
260 Single Number III Java
261 πŸ”’ Graph Valid Tree
263 Ugly Number Java Python
264 Ugly Number II Java
266 πŸ”’ Palindrome Permutation
267 πŸ”’ Palindrome Permutation II
268 Missing Number Java Python
270 πŸ”’ Closest Binary Search Tree Value
271 πŸ”’ Encode and Decode Strings
274 H-Index Java
275 H-Index II Java
276 πŸ”’ Paint Fence
277 πŸ”’ Find The Celebrity
278 First Bad Version Java Python
279 Perfect Squares Java
280 πŸ”’ Wiggle Sort
281 πŸ”’ Zigzag Iterator
283 Move Zeroes Java Python
284 Peeking Iterator Java
285 πŸ”’ Inorder Successor in BST
286 πŸ”’ Walls and Gates
287 Find the Duplicate Number Java
288 πŸ”’ Unique Word Abbreviation
289 Game of Life
290 Word Pattern Java Python
291 πŸ”’ Word Pattern II
292 Nim Game Java Python
293 πŸ”’ Flip Game
294 πŸ”’ Flip Game II
298 πŸ”’ Binary Tree Longest Consecutive Sequence
299 Bulls and Cows Java Python
300 Longest Increasing Subsequence
303 Range Sum Query - Immutable Java Python
304 Range Sum Query 2D - Immutable
306 Additive Number
307 Range Sum Query - Mutable
309 Best Time to Buy and Sell Stock with Cooldown
310 Minimum Height Trees
311 πŸ”’ Sparse Matrix Multiplication
313 Super Ugly Number
314 πŸ”’ Binary Tree Vertical Order Traversal
316 Remove Duplicate Letters
318 Maximum Product of Word Lengths
319 Bulb Switcher
320 πŸ”’ Generalized Abbreviation
322 Coin Change
323 πŸ”’ Number of Connected Components in Undirected Graph
324 Wiggle Sort II
325 πŸ”’ Maximum Size Subarray Sum Equals K
326 Power of Three Java Python
328 Odd Even Linked List
331 Verify Preorder Serialization of a Binary Tree
331 πŸ”’ Largest BST Subtree
334 Increasing Triplet Subsequence
337 House Robber III
338 Counting Bits Java Python
339 πŸ”’ Nested List Weight Sum
340 πŸ”’ Longest Substring with At Most K Distinct Characters
341 Flatten Nested List Iterator
342 Power of Four Java Python
343 Integer Break
344 Reverse A String Java Python
345 Reverse Vowels of A String Java Python
346 πŸ”’ Moving Average From Data Stream
347 Top K frequent Elements
348 πŸ”’ Design Tic-Tac-Toe
349 Intersection of 2 Arrays Java Python
350 Intersection of 2 Arrays II Java Python
351 πŸ”’ Android Unlock Patterns
355 Design Twitter
357 Count Numbers with Unique Digits
359 πŸ”’ Logger Rate Limiter
367 Valid Perfect Square Java Python
374 Guess Number Higher or Lower Java Python
383 Ransom Note Java Python
387 First Unique Character in String Java Python
389 Find the Difference Java Python
392 Is Subsequence Java Python
401 Binary Watch Java Python
404 Sum of Left Leaves Java Python
405 Convert a Number to Hexadecimal Java Python
408 πŸ”’ Valid Word Abbreviation
409 Longest Palindrome Java Python
412 Fizz Buzz Java Python
414 Third Maximum Number Java Python
415 Add Strings Java Python
422 πŸ”’ Valid Word Square
430 Flatten a Multilevel Doubly Linked List Java
434 Number of Segments in a String Java Python
441 Arranging Coins Java Python
443 String Compression Java Python
447 Number of Boomerangs Java Python
448 Find All Numbers Disappeared in an Array Java Python
453 Minimum Moves to Equal Array Elements Java Python
455 Assign Cookies Java Python
459 Repeated Substring Pattern Java Python
461 Hamming Distance Java Python
463 Island Perimeter Java Python
475 Heaters Java Python
476 Number Complement Java Python
482 License Key Formatting Java Python
485 Max Consecutive Ones Java Python
492 Construct the Rectangle Java Python
495 Teemo Attacking Java Python
496 Next Greater Element I Java Python
500 Keyboard Row Java Python
501 Find Mode in Binary Search Tree Java Python
504 Base 7 Java Python
506 Relative Ranks Java Python
507 Perfect Number Java Python
509 Fibonacci Number Java Python
520 Detect Capital Java Python
521 Longest Uncommon Subsequence I Java Python
530 Minimum Absolute Difference in BST Java Python
532 K - Diff Pairs in Array Java Python
538 Convert BST to Greater Tree Java Python
541 Reverse String II Java Python
543 Diameter of Binary Tree Java Python
551 Student Attendance Record I Java Python
557 Reverse Words in a String III Java Python
559 Maximum Depth of N-Ary Tree Java Python
561 Array Partition I Java Python
563 Binary Tree Tilt Java Python
566 Reshape The Matrix Java Python
572 Subtree of Another Tree Java Python
575 Distribute Candies Java Python
581 Shortest Unsorted Continuous Subarray Java Python
589 N-Ary Tree Preorder Traversal Java Python
590 N-Ary Tree Postorder Traversal Java Python
594 Longest Harmonious Subsequence Java Python
598 Range Addition II Java Python
599 Minimum Index Sum of 2 Lists Java Python
604 πŸ”’ Design Compressed String Iterator
605 Can Place Flowers Java Python
606 Construct String from Binary Tree Java Python
617 Merge Two Binary Trees Java Python
624 πŸ”’ Maximum Distance in Arrays
628 Maximum Product of Three Numbers Java Python
633 Sum Square Numbers Java Python
637 Average of Levels in Binary Tree Java Python
643 Maximum Average SubArray I Java Python
645 Set Mismatch Java Python
653 Two Sum IV - Input is a BST Java Python
657 Robot Return to Origin Java Python
661 Image Smoother Java Python
665 Non Deceasing Array Java Python
669 Trim a Binary Search Tree Java Python
671 Second Minimum Node in Binary Tree Java Python
674 Longest Continuous Increasing Subsequence Java Python
680 Valid Palindrome II Java Python
682 Baseball Game Java Python
686 Repeated String Match
687 Longest Univalue Path
688 Knight Probability in Chessboard Java
690 Employee Importance
693 Binary Number with Alternating Bits Java Python
696 Count Binary Substrings Java Python
697 Degree of an Array Java Python
700 Search in a Binary Search Tree Java Python
703 Kth Largest Element in a Stream Java Python
704 Binary Search Java Python
705 Design HashSet Java Python
706 Design HashMap Java Python
709 To Lower Case Java Python
716 πŸ”’ Max Stack
717 1-bit and 2-bit Characters Java Python
718 Maximum Length of Repeated Subarray Java
720 Longest Word in Dictionary
724 Find Pivot Index Java Python
728 Self Dividing Numbers Java Python
733 Flood Fill Java Python
743 Network Delay Time Java
734 Sentence Similarity
744 Find Smallest Letter Greater Than Target Java Python
746 Min Cost Climbing Stairs Java Python
747 Largest Number at least Twice of Others Java Python
748 Shortest Completing Word Java Python
758 Bold Words in String
760 Find Anagram Mappings
762 Prime Number of Set Bits in Primary Representation Java Python
766 Toeplitz Matrix Java Python
771 Jewels and Stones Java Python
783 Minimum Distance Between BST Nodes Java Python
788 Rotated Digits
796 Rotate String Java
800 Similar RGB Color
804 Unique Morse Code Words Java
806 Number of Lines to Write String Java
811 Subdomain Visit Count
812 Largest Triangle Area Java
819 Most Common Word Java
821 Shortest Distance to Character Java
824 Goat Latin Java
830 Positions of Large Groups Java
832 Flipping an Image Java
836 Rectangle Overlap Java
840 Magic Squares in Grid
844 Backspace String Compare Java
849 Maximize Distance to Closest Person
852 Peak Index in Mountain Array Java
859 Buddy Strings Java
860 Lemonade Change Java
867 Transpose Matrix Java
868 Binary Gap Java
872 Leaf-Similar Trees Java
874 Walking Robot Simulation
876 Middle of the Linked List Java
881 Boats to Save People Python
883 Projection Area of 3D Shapes Java
884 Uncommon Words from 2 Sentences Java
888 Fair Candy Swap Java
892 Surface Area of 3D Shapes Java
893 Groups of Special Equivalent Strings
896 Monotonic Array Java
897 Increasing Order Search Tree Java
905 Sort Array by Parity
908 Smallest Range I Java
914 X of a kind in a Deck of Cards Java
917 Reverse Only Letters Java
922 Sort Array by Parity II Java
925 Long Pressed Name Java
929 Unique Email Addresses Java
933 Number of Recent Calls Java
937 Reorder Data In Log Files Java
938 Range Sum of BST Java
941 Valid Mountain Array Java Python
942 DI String Match Java
944 Delete Columns to Make Sorted Java
949 Largest Time for Given Digits
953 Verifying an Alien Dictionary Java
961 N-Repeated Elements in Size 2N Array Java
965 Univalued Binary Tree Java
970 Powerful Integers
976 Largest Perimeter Triangle Java
977 Squares of a Sorted Array
983 Minimum Cost For Tickets Python
985 Sum of Even Numbers after Queries
989 Add to Array Form of Integer Java
993 Cousins in Binary Tree Java
994 Rotting Oranges Java
997 Find the Town Judge Java
999 Available Captures for Rook Java
1002 Find Common Characters Java
1005 Maximize Sum of Array After K Negations Java
1009 Complement of Base 10 Integer Java
1010 Pairs of Songs With Total Durations Divisible by 60 Java
1013 Partition Array into Three Parts with equal Sum
1018 Binary Prefix Divisible by 5 Java
1020 Number of Enclaves Python
1021 Remove Outermost Parenthesis Java
1022 Sum of Root to Leaf Binary Numbers Java
1025 Divisor Game Java
1029 Two City Scheduling
1030 Matrix Cells in Distance Order Java
1033 Moving Stones Until Consecutive
1037 Valid Boomerang Java
1042 Flower Planting with no Adjacent
1046 Last Stone Weight Java
1047 Remove All adjacent Duplicates in String Java
1051 Height Checker
1056 πŸ”’ Confusing Number
1064 πŸ”’ Fixed Point
1065 πŸ”’ Index Pairs of a String
1071 Greatest Common Divisors of Strings Java
1078 Occurrence After Bigram Java
1085 πŸ”’ Sum of Digits in Minimum Number
1086 πŸ”’ High Five
1089 Duplicate Zeroes Java
1099 πŸ”’ Two Sum Less Than K
1103 Distribute Candies to People Java
1108 Defanging an IP Address Java
1118 πŸ”’ Number of Days in a Month
1119 πŸ”’ Remove Vowels From String
1122 Relative Sort Array Java
1128 Number of Equivalent Domino Pairs Java
1133 πŸ”’ Largest Unique Number
1134 πŸ”’ Armstrong Number
1137 Nth Tribonacci Number Java
1143 Longest Common Subsequence Java
1150 Check if Number is Majority Element in Sorted Array
1154 Day of The Year Java
1160 Find Words That Can Be Formed By Characters
1165 Single Row Keyboard Java
1170 Compare Strings By Frequency of the Smallest Character
1175 Prime Arrangements Java
1176 πŸ”’ Diet Plan Performance
1180 πŸ”’ Count Substrings with only one Distinct Letter
1184 Distance Between Bus Stops Java
1185 Day of the Week Java
1189 Maximum Number of Balloons Java
1196 πŸ”’ How Many Apples Can You Put into the Basket
1200 Minimum Absolute Difference Java
1201 Ugly Number III Java
1207 Unique Number of Occurrences Java
1213 πŸ”’ Intersection of Three Sorted Arrays
1217 Minimum Cost to Move Chips to The Same Position Java
1221 Split A String In Balanced Strings Java
1228 πŸ”’ Missing A Number In Arithmetic Progression
1232 Check If It Is A Straight Line Java
1237 Find Positive Integer Solutions for a Given Equation
1243 πŸ”’ Array Transformation
1249 Minimum Remove to Make Valid Parentheses Java
1252 Cells With Odd Values In Matrix Java
1254 Number of Closed Islands Python
1260 Shift 2D Grid Java
1266 Minimum Time Visiting All Points Java
1271 πŸ”’ Hexspeak
1275 Find Winner On a Tic Tac Toe Game Java
1281 Subtract the Product and Sum of Digits of a Integer Java
1287 Element Appearing More Than 25% in Sorted Array Java
1290 Convert Binary Number In A Linked List to Integer Java
1295 Find Numbers With Even Numbers of Digits Java Python
1299 Replace Elements With Greatest Element on Right Side Java Python
1304 Find N Unique Integers Sum Up To Zero Java
1309 Decrypt String From Alphabet To Integer Mapping Java
1313 Decompress Run-Length Encoded Strings Java
1317 Convert Integer to Sum Of Two Non-Zero Integers Java
1319 Number of Operations to Make Network Connected Python
1323 Maximum 69 Number Java
1331 Rank Transform of An Array Java
1332 Remove Palindromic Subsequences Java
1337 The K Weakest Rows In A Matrix Java
1342 Number of Steps to Reduce a Number to Zero Java
1346 Check if N and It's Double Exist Java Python
1351 Count Negative Numbers In A Sorted Matrix Java
1356 Sort Integers by Number of 1 Bits Java
1360 Number of Days Between Two Dates Java
1365 How Many Numbers Are Smaller Than Current Number Java
1370 Increasing Decreasing String Java
1374 Generate A String With Characters That Have Odd Count Java
1376 Time Needed to Inform All Employees Java
1379 Find a Corresponding Node of a Binary Tree in a Clone of That Tree Java
1380 Lucky Numbers In A Matrix Java
1385 Find The Distance Value Between 2 Arrays Java
1389 Create Target Array in Given Order Java
1394 Find Lucky Integer In An Array Java
1399 Count Largest Group Java
1402 Reducing Dishes Python
1403 Minimum Subsequence in Non-Increasing Order Java
1408 String Matching In An Array Java
1413 Minimum Value To Get Positive Step By Step Sum Java
1417 Reformat The String Java
1422 Maximum Score After Splitting A String Java
1426 πŸ”’ Counting Elements
1427 πŸ”’ Performing String Shifts
1431 Kids With The Greatest Number Of Candies Java
1436 Destination City Java
1437 Check If All 1's Are at Least Length K Places Away Java
1441 Build An Array With Stack Operation Java
1444 Number of Ways of Cutting a Pizza Python
1446 Consecutive Characters Java
1450 Number of Students Doing Homework at Given Time Java
1455 Check If Word Occurs as Prefix of any Word in Sentence Java
1460 Make 2 Arrays Equal by Reversing Sub Arrays Java
1464 Maximum Product of 2 Elements in Array Java
1466 Reorder Routes to Make All Paths Lead to the City Zero Java
1469 πŸ”’ Find All Lonely Nodes Python
1470 Shuffle The Array Java
1472 Design Browser History Java Python
1474 Delete N Nodes After M Nodes In A Linked List
1475 Final Prices With Special Discount in a Shop Java
1480 Running Sum of 1D Array Java
1486 XOR Operations in An Array Java
1491 Average Salary Excluding the Minimum and Maximum Salary Java
1496 Path Crossing Java
1502 Can Make Arithmetic Progression From Sequence Java
1507 Reformat Date Java
1512 Number of Good Pairs Java
1518 Water Bottles Java
1523 Count Odd Numbers In Interval Range Java
1528 Shuffle Strings Java
1534 Count Good Triplets Java
1539 Kth Missing Positive Number Java
1544 Make The String Great Java
1550 Three Consecutive Odds Java
1556 Thousand Separator Java
1560 Most Visited Sector in a Circular Track Java
1566 Detect Pattern of Length M Repeated K or More Times Java
1572 Matrix Diagonal Sum Java
1576 Replace All ?'s to Avoid Consecutive Repeating Characters Java
1582 Special Positions in a Binary Matrix Java
1588 Sum of All Odd Length Subarrays Java
1592 Rearrange Spaces Between Words Java
1598 Crawler Log Folder Java
1600 Throne Inheritance Java
1603 Design Parking System Java
1608 Special Array With X Elements Greater Than or Equal X Java
1614 Maximum Nesting Depth of the Parentheses Java
1619 Mean of Array After Removing Some Elements Java
1624 Largest Substring Between Two Equal Characters Java
1629 Slowest Key Java
1636 Sort Array by Increasing Frequency Java
1640 Check Array Formation Through Concatenation Java
1646 Get Maximum in Generated Array Java
1652 Defuse the Bomb Java
1656 Design an Ordered Stream Java
1662 Check If Two String Arrays are Equivalent Java
1668 Maximum Repeating Substring Java
1672 Richest Customer Wealth Java
1678 Goal Parser Interpretation Java
1684 Count the Number of Consistent Strings Java
1688 Count of Matches in Tournament Java
1694 Reformat Phone Number Java
1700 Number of Students Unable to Eat Lunch Java
1704 Determine if String Halves Are Alike Java
1708 πŸ”’ Largest Subarray Length K
1710 Maximum Units on a Truck Java
1716 Calculate Money in Leetcode Bank Java
1720 Decode XORed Array Java
1725 Number Of Rectangles That Can Form The Largest Square Java
1732 Find the Highest Altitude Java
1736 Latest Time by Replacing Hidden Digits Java
1742 Maximum Number of Balls in a Box Java
1748 Sum of Unique Elements Java
1752 Check if Array Is Sorted and Rotated Java
1758 Minimum Changes To Make Alternating Binary String Java
1763 Longest Nice Substring Java
1768 Merge Strings Alternately Java
1773 Count Items Matching a Rule Java
1779 Find Nearest Point That Has the Same X or Y Coordinate Java
1784 Check if Binary String Has at Most One Segment of Ones Java
1790 Check if One String Swap Can Make Strings Equal Java
1791 Find Center of Star Graph Java
1796 Second Largest Digit in a String Java
1800 Maximum Ascending Subarray Sum Java
1805 Number of Different Integers in a String Java
1812 Determine Color of a Chessboard Square Java
1816 Truncate Sentence Java
1822 Sign of the Product of an Array Java
1826 πŸ”’ Faulty Sensor
1827 Minimum Operations to Make the Array Increasing Java
1832 Check if the Sentence Is Pangram Java
1837 Sum of Digits in Base K Java
1844 Replace All Digits with Characters Java
1848 Minimum Distance to the Target Element Java
1854 Maximum Population Year Java
1859 Sorting the Sentence Java
1863 Sum of All Subset XOR Totals Java
1869 Longer Contiguous Segments of Ones than Zeros Java
1876 Substrings of Size Three with Distinct Characters Java
1880 Check if Word Equals Summation of Two Words Java
1886 Determine Whether Matrix Can Be Obtained By Rotation Java
1893 Check if All the Integers in a Range Are Covered Java
1897 Redistribute Characters to Make All Strings Equal Java
1903 Largest Odd Number in String Java
1909 Remove One Element to Make the Array Strictly Increasing Java
1913 Maximum Product Difference Between Two Pairs Java
1920 Build Array from Permutation Java
1925 Count Square Sum Triples Java
1929 Concatenation of Array Java
1933 πŸ”’ Check If String Is Decomposable Into Value EqualSubstrings
1935 Maximum Number of Words You Can Type Java
1941 Check if All Characters Have Equal Number of Occurrences Java
1945 Sum of Digits of String After Convert Java
1952 Three Divisors Java
1957 Delete Characters to Make Fancy String Java
1961 Check If String Is a Prefix of Array Java
1967 Number of Strings That Appear as Substrings in Word Java
1971 Find if Path Exists in Graph Java
1974 Minimum Time to Type Word Using Special Typewriter Java
1979 Find Greatest Common Divisor of Array Java
1984 Minimum Difference Between Highest and Lowest of K Scores Java
1991 Find the Middle Index in Array Java
1995 Count Special Quadruplets Java
2000 Reverse Prefix of Word Java
2006 Count Number of Pairs With Absolute Difference K Java
2011 Final Value of Variable After Performing Operations Java
2016 Maximum Difference Between Increasing Elements Java
2022 Convert 1D Array Into 2D Array Java
2027 Minimum Moves to Convert String Java
2032 Two Out of Three Java
2037 Minimum Number of Moves to Seat Everyone Java
2042 Check if Numbers Are Ascending in a Sentence Java
2047 Number of Valid Words in a Sentence Java
2053 Kth Distinct String in an Array Java
2057 Smallest Index With Equal Value Java
2062 Count Vowel Substrings of a String Java
2068 Check Whether Two Strings are Almost Equivalent Java
2073 Time Needed to Buy Tickets Java
2078 Two Furthest Houses With Different Colors Java
2085 Count Common Words With One Occurrence Java
2089 Find Target Indices After Sorting Array Java
2094 Finding 3-Digit Even Numbers Java
2099 Find Subsequence of Length K With the Largest Sum Java
2103 Rings and Rods Java
2108 Find First Palindromic String in the Array Java
2114 Maximum Number of Words Found in Sentences Java
2119 A Number After a Double Reversal Java
2124 Check if All A's Appears Before All B's Java
2129 Capitalize the Title Java
2133 Check if Every Row and Column Contains All Numbers Java
2138 Divide a String Into Groups of Size k Java
2144 Minimum Cost of Buying Candies With Discount Java
2148 Count Elements With Strictly Smaller and Greater Elements Java
2154 Keep Multiplying Found Values by Two Java
2160 Minimum Sum of Four Digit Number After Splitting Digits Java
2164 Sort Even and Odd Indices Independently Java
2169 Count Operations to Obtain Zero Java
2176 Count Equal and Divisible Pairs in an Array Java
2180 Count Integers With Even Digit Sum Java
2185 Counting Words With a Given Prefix Java
2190 Most Frequent Number Following Key In an Array Java
2194 Cells in a Range on an Excel Sheet Java
2200 Find All K-Distant Indices in an Array Java
2206 Divide Array Into Equal Pairs Java
2210 Count Hills and Valleys in an Array Java
2215 Find the Difference of Two Arrays Java
2220 Minimum Bit Flips to Convert Number Java
2224 Minimum Number of Operations to Convert Time Java
2229 πŸ”’ Check if an array is consecutive
2231 Largest Number After Digit Swaps by Parity Java
2235 Add Two Integers Java
2236 Root Equals Sum of Children Java
2239 Find Closest Number to Zero Java
2243 Calculate Digit Sum of a String Java
2248 Intersection of Multiple Arrays Java
2255 Count Prefixes of a Given String Java
2259 Remove Digit From Number to Maximize Result Java
2264 Largest 3-Same-Digit Number in String Java
2269 Find the K-Beauty of a Number Java
2273 Find Resultant Array After Removing Anagrams Java
2278 Percentage of Letter in String Java
2283 Check if Number Has Equal Digit Count and Digit Value Java
2287 Rearrange Characters to Make Target String Java
2293 Min Max Game Java
2299 Strong Password Checker II Java
2300 Successful Pairs of Spells and Potions Python
2303 Calculate Amount Paid in Taxes Java
2309 Greatest English Letter in Upper and Lower Case Java
2315 Count Asterisks Java Python
2316 Count Unreachable Pairs of Nodes in an Undirected Graph Python
2319 Check if Matrix Is X-Matrix Java
2325 Decode the Message Java
2331 Evaluate Boolean Binary Tree Java
2335 Minimum Amount of Time to Fill Cups Java
2439 Minimize Maximum of Array Python
2341 Maximum Number of Pairs in Array Java
2347 Best Poker Hand Java
2348 Number of Zero-Filled Subarrays Python
2351 First Letter to Appear Twice Java
2357 Make Array Zero by Subtracting Equal Amounts Java
2360 Longest Cycle in a Graph Python
2363 Merge Similar Items Java
2367 Number of Arithmetic Triplets Java
2373 Largest Local Values in a Matrix Java
2379 Minimum Recolors to Get K Consecutive Black Blocks Java
2383 Minimum Hours of Training to Win a Competition Java
2389 Longest Subsequence With Limited Sum Java
2395 Find Subarrays With Equal Sum Java
2399 Check Distances Between Same Letters Java
2404 Most Frequent Even Element Java
2409 Count Days Spent Together Java
2413 Smallest Even Multiple Java
2418 Sort the People Java
2423 Remove Letter To Equalize Frequency Java
2427 Number of Common Factors Java
2432 The Employee That Worked on the Longest Task Java
2437 Number of Valid Clock Times Java
2441 Largest Positive Integer That Exists With Its Negative Java
2446 Determine if Two Events Have Conflict Java
2451 Odd String Difference Java
2455 Average Value of Even Numbers That Are Divisible by Three Java
2460 Apply Operations to an Array Java
2465 Number of Distinct Averages Java
2466 Count Ways To Build Good Strings
2469 Convert the Temperature Java
2475 Number of Unequal Triplets in Array Java
2481 Minimum Cuts to Divide a Circle Java
2485 Find the Pivot Integer Java
2490 Circular Sentence Java
2492 Minimum Score of a Path Between Two Cities Python
2496 Maximum Value of a String in an Array Java
2500 Delete Greatest Value in Each Row Java
2506 Count Pairs Of Similar Strings Java
2511 Maximum Enemy Forts That Can Be Captured Java
2515 Shortest Distance to Target String in a Circular Array Java
2520 Count the Digits That Divide a Number Java
2525 Categorize Box According to Criteria Java
2529 Maximum Count of Positive Integer and Negative Integer Java
2535 Difference Between Element Sum and Digit Sum of an Array Java
2540 Minimum Common Value Java
2544 Alternating Digit Sum Java
2549 Count Distinct Numbers on Board Java
2553 Separate the Digits in an Array Java
2558 Take Gifts From the Richest Pile Java
2562 Find the Array Concatenation Value Java
2566 Maximum Difference by Remapping a Digit Java
2570 Merge Two 2D Arrays by Summing Values Java
2574 Left and Right Sum Differences Java
2578 Split With Minimum Sum Java
2582 Pass the Pillow Java
2586 Count the Number of Vowel Strings in Range Java
2591 Distribute Money to Maximum Children Java
2595 Number of Even and Odd Bits Java
2600 K Items With the Maximum Sum Java
2605 Form Smallest Number From Two Digit Arrays Java
2605 Form Smallest Number From Two Digit Arrays
2609 Find the Longest Balanced Substring of a Binary String
2614 Prime In Diagonal
2639 Find the Width of Columns of a Grid
2643 Row With Maximum Ones
2644 Find the Maximum Divisibility Score
2651 Calculate Delayed Arrival Time
2652 Sum Multiples
2656 Maximum Sum With Exactly K Elements
2660 Determine the Winner of a Bowling Game
2670 Find the Distinct Difference Array
2678 Number of Senior Citizens

About

Solution to LeetCode πŸ’» Algorithms problems.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 82.9%
  • Python 16.8%
  • JavaScript 0.3%