Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Solutions to all LeetCode problems: Algorithms/Ruby, Database/MySQL, Shell/Bash

License

NotificationsYou must be signed in to change notification settings

Lz4Code/leetcode_ruby

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#TitleSolutionDifficulty
526Beautiful ArrangementMedium
525Contiguous ArrayMedium
524
523
522
521
520Detect CapitalRubyEasy
519
518
517Super Washing MachinesHard
516Longest Palindromic SubsequenceMedium
515Find Largest Value in Each Tree RowMedium
514
513Find Bottom Left Tree ValueMedium
512
511
510
509
508Most Frequent Subtree SumMedium
507
506Relative RanksRubyEasy
505The Maze II🔒Medium
504Base 7RubyEasy
503Next Greater Element IIMedium
502IPOHard
501Find Mode in Binary Search TreeRubyEasy
500Keyboard RowRubyEasy
499The Maze IIIHard
498Diagonal TraverseMedium
497
496Next Greater Element IEasy
495Teemo AttackingMedium
494Target SumMedium
493Reverse PairsHard
492Construct the RectangleEasy
491Increasing SubsequencesMedium
490The Maze🔒Medium
489
488Zuma GameHard
487Max Consecutive Ones II🔒Medium
486Predict the WinnerMedium
485Max Consecutive OnesEasy
484Find Permutation🔒Medium
483Smallest Good BaseHard
482License Key FormattingMedium
481Magical StringMedium
480Sliding Window MedianHard
479
478
477Total Hamming DistanceMedium
476Number ComplementEasy
475HeatersEasy
474Ones and ZeroesMedium
473Matchsticks to SquareMedium
472Concatenated WordsHard
471Encode String with Shortest Length🔒Hard
470
469Convex Polygon🔒Medium
468Validate IP AddressRubyMedium
467Unique Substrings in Wraparound StringMedium
466Count The RepetitionsHard
465Optimal Account Balancing🔒Hard
464Can I WinMedium
463Island PerimeterEasy
462Minimum Moves to Equal Array Elements IIMedium
461Hamming DistanceEasy
460LFU CacheHard
459Repeated Substring PatternEasy
458
457
456132 PatternMedium
455Assign CookiesRubyEasy
4544Sum IIMedium
453Minimum Moves to Equal Array ElementsRubyEasy
452Minimum Number of Arrows to Burst BalloonsMedium
451Sort Characters By FrequencyRubyMedium
450Delete Node in a BSTMedium
449Serialize and Deserialize BSTRubyMedium
448Find All Numbers Disappeared in an ArrayRubyEasy
447Number of BoomerangsEasy
446Arithmetic Slices II - SubsequenceHard
445Add Two Numbers IIMedium
444Sequence Reconstruction🔒Medium
443
442Find All Duplicates in an ArrayMedium
441Arranging CoinsEasy
440K-th Smallest in Lexicographical OrderHard
439Ternary Expression Parser🔒Medium
438Find All Anagrams in a StringEasy
437Path Sum IIIEasy
436Find Right IntervalMedium
435Non-overlapping IntervalsMedium
434Number of Segments in a StringEasy
433
432All O(1) Data StructureHard
431
430
429
428
427
426
425Word Squares🔒Hard
424Longest Repeating Character ReplacementMedium
423Reconstruct Original Digits from EnglishMedium
422Valid Word Square🔒Easy
421Maximum XOR of Two Numbers in an ArrayMedium
420Strong Password CheckerHard
419Battleships in a BoardMedium
418Sentence Screen Fitting🔒Medium
417Pacific Atlantic Water FlowMedium
416Partition Equal Subset SumMedium
415Add StringsEasy
414Third Maximum NumberEasy
413Arithmetic SlicesMedium
412Fizz BuzzRubyEasy
411Minimum Unique Word Abbreviation🔒Hard
410Split Array Largest SumHard
409Longest PalindromeRubyEasy
408Valid Word Abbreviation🔒Easy
407Trapping Rain Water IIHard
406Queue Reconstruction by HeightMedium
405Convert a Number to HexadecimalRubyEasy
404Sum of Left LeavesRubyEasy
403Frog JumpHard
402Remove K DigitsMedium
401Binary WatchEasy
400Nth DigitEasy
399Evaluate DivisionMedium
398Random Pick Index🔜Medium
397Integer ReplacementMedium
396Rotate FunctionRubyEasy
395Longest Substring with At Least K Repeating CharactersMedium
394Decode StringRubyMedium
393UTF-8 ValidationRubyMedium
392Is SubsequenceMedium
391Perfect RectangleHard
390Elimination GameMedium
389Find the DifferenceRubyEasy
388Longest Absolute File PathMedium
387First Unique Character in a StringRubyEasy
386Lexicographical Numbers🔜Medium
385Mini ParserRubyMedium
384Shuffle an Array🔜Medium
383Ransom NoteRubyEasy
382Linked List Random Node🔜Medium
381Insert Delete GetRandom O(1) - Duplicates allowed🔜Hard
380Insert Delete GetRandom O(1)🔜Hard
379Design Phone Directory🔒Medium
378Kth Smallest Element in a Sorted MatrixMedium
377Combination Sum IVMedium
376Wiggle SubsequenceMedium
375Guess Number Higher or Lower IIMedium
374Guess Number Higher or Lower🔜Easy
373Find K Pairs with Smallest SumsMedium
372Super PowMedium
371Sum of Two IntegersRubyEasy
370Range Addition🔒Medium
369Plus One Linked List🔒Medium
368Largest Divisible SubsetMedium
367Valid Perfect SquareRubyEasy
366Find Leaves of Binary Tree🔒Medium
365Water and Jug ProblemMedium
364Nested List Weight Sum II🔒Medium
363Max Sum of Rectangle No Larger Than KHard
362Design Hit Counter🔒Medium
361Bomb Enemy🔒Medium
360Sort Transformed Array🔒Medium
359Logger Rate Limiter🔒Easy
358Rearrange String k Distance Apart🔒Hard
357Count Numbers with Unique DigitsMedium
356Line Reflection🔒Medium
355Design Twitter🔜Medium
354Russian Doll EnvelopesHard
353Design Snake Game🔒Medium
352Data Stream as Disjoint Intervals🔜Hard
351Android Unlock Patterns🔒Medium
350Intersection of Two Arrays IIRubyEasy
349Intersection of Two ArraysRubyEasy
348Design Tic-Tac-Toe🔒Medium
347Top K Frequent ElementsRubyMedium
346Moving Average from Data Stream🔒Easy
345Reverse Vowels of a StringRubyEasy
344Reverse StringRubyEasy
343Integer BreakRubyMedium
342Power of FourRubyEasy
341Flatten Nested List Iterator🔒Medium
340Longest Substring with At Most K Distinct Characters🔒Hard
339Nested List Weight Sum🔒Easy
338Counting BitsRubyMedium
337House Robber IIIRubyMedium
336Palindrome PairsRubyHard
335Self CrossingRubyMedium
334Increasing Triplet SubsequenceRubyMedium
333Largest BST Subtree🔒Medium
332Reconstruct ItineraryRubyMedium
331Verify Preorder Serialization of a Binary TreeRubyMedium
330Patching ArrayRubyMedium
329Longest Increasing Path in a MatrixRubyMedium
328Odd Even Linked ListRubyEasy
327Count of Range SumRubyHard
326Power of ThreeRubyEasy
325Maximum Size Subarray Sum Equals k🔒Easy
324Wiggle Sort IIRubyMedium
323Number of Connected Components in an Undirected Graph🔒Easy
322Coin ChangeRubyMedium
321Create Maximum NumberRubyHard
320Generalized Abbreviation🔒Medium
319Bulb SwitcherRubyMedium
318Maximum Product of Word LengthsRubyMedium
317Shortest Distance from All Buildings🔒Hard
316Remove Duplicate LettersRubyMedium
315Count of Smaller Numbers After SelfRubyHard
314Binary Tree Vertical Order Traversal🔒Medium
313Super Ugly NumberRubyMedium
312Burst BalloonsRubyMedium
311Sparse Matrix Multiplication🔒Medium
310Minimum Height TreesRubyMedium
309Best Time to Buy and Sell Stock with CooldownRubyMedium
308Range Sum Query 2D - Mutable🔒Hard
307Range Sum Query - MutableRubyMedium
306Additive NumberRubyMedium
305Number of Islands II🔒Hard
304Range Sum Query 2D - ImmutableRubyMedium
303Range Sum Query - ImmutableRubyEasy
302Smallest Rectangle Enclosing Black Pixels🔒Medium
301Remove Invalid ParenthesesRubyMedium
300Longest Increasing SubsequenceRubyMedium
299Bulls and CowsRubyEasy
298Binary Tree Longest Consecutive Sequence🔒Medium
297Serialize and Deserialize Binary TreeRubyMedium
296Best Meeting Point🔒Medium
295Find Median from Data StreamRubyHard
294Flip Game II🔒Medium
293Flip Game🔒Easy
292Nim GameRubyEasy
291Word Pattern II🔒Hard
290Word PatternRubyEasy
289Game of LifeRubyMedium
288Unique Word Abbreviation🔒Easy
287Find the Duplicate NumberRubyHard
286Walls and Gates🔒Medium
285Inorder Successor in BST🔒Medium
284Peeking Iterator🔜Medium
283Move ZeroesRubyEasy
282Expression Add OperatorsRubyHard
281Zigzag Iterator🔒Medium
280Wiggle Sort🔒Medium
279Perfect SquaresRubyMedium
278First Bad VersionRubyEasy
277Find the Celebrity🔒Medium
276Paint Fence🔒Easy
275H-Index IIRubyMedium
274H-IndexRubyMedium
273Integer to English WordsRubyMedium
272Closest Binary Search Tree Value II🔒Hard
271Encode and Decode Strings🔒Medium
270Closest Binary Search Tree Value🔒Easy
269Alien Dictionary🔒Hard
268Missing NumberRubyMedium
267Palindrome Permutation II🔒Medium
266Palindrome Permutation🔒Easy
265Paint House II🔒Hard
264Ugly Number IIRubyMedium
263Ugly NumberRubyEasy
262Trips and UsersMySQLHard
261Graph Valid Tree🔒Medium
260Single Number IIIRubyMedium
2593Sum Smaller🔒Medium
258Add DigitsRubyEasy
257Binary Tree PathsRubyEasy
256Paint House🔒Medium
255Verify Preorder Sequence in Binary Search Tree🔒Medium
254Factor Combinations🔒Medium
253Meeting Rooms II🔒Medium
252Meeting Rooms🔒Easy
251Flatten 2D Vector🔒Medium
250Count Univalue Subtrees🔒Medium
249Group Shifted Strings🔒Easy
248Strobogrammatic Number III🔒Hard
247Strobogrammatic Number II🔒Medium
246Strobogrammatic Number🔒Easy
245Shortest Word Distance III🔒Medium
244Shortest Word Distance II🔒Medium
243Shortest Word Distance🔒Easy
242Valid AnagramRubyEasy
241Different Ways to Add ParenthesesRubyMedium
240Search a 2D Matrix IIRubyMedium
239Sliding Window MaximumRubyHard
238Product of Array Except SelfRubyMedium
237Delete Node in a Linked ListRubyEasy
236Lowest Common Ancestor of a Binary TreeRubyMedium
235Lowest Common Ancestor of a Binary Search TreeRubyEasy
234Palindrome Linked ListRubyEasy
233Number of Digit OneRubyMedium
232Implement Queue using StacksRubyEasy
231Power of TwoRubyEasy
230Kth Smallest Element in a BSTRubyMedium
229Majority Element IIRubyMedium
228Summary RangesRubyEasy
227Basic Calculator IIRubyMedium
226Invert Binary TreeRubyEasy
225Implement Stack using QueuesRubyEasy
224Basic CalculatorRubyMedium
223Rectangle AreaRubyEasy
222Count Complete Tree NodesRubyMedium
221Maximal SquareRubyMedium
220Contains Duplicate IIIRubyMedium
219Contains Duplicate IIRubyEasy
218The Skyline ProblemRubyHard
217Contains DuplicateRubyEasy
216Combination Sum IIIRubyMedium
215Kth Largest Element in an ArrayRubyMedium
214Shortest PalindromeRubyHard
213House Robber IIRubyMedium
212Word Search IIRubyHard
211Add and Search Word - Data structure designRubyMedium
210Course Schedule IIRubyMedium
209Minimum Size Subarray SumRubyMedium
208Implement Trie (Prefix Tree)RubyMedium
207Course ScheduleRubyMedium
206Reverse Linked ListRubyEasy
205Isomorphic StringsRubyEasy
204Count PrimesRubyEasy
203Remove Linked List ElementsRubyEasy
202Happy NumberRubyEasy
201Bitwise AND of Numbers RangeRubyMedium
200Number of IslandsRubyMedium
199Binary Tree Right Side ViewRubyMedium
198House RobberRubyEasy
197Rising TemperatureMySQLEasy
196Delete Duplicate EmailsMySQLEasy
195Tenth LineBashEasy
194Transpose FileBashMedium
193Valid Phone NumbersBashEasy
192Word FrequencyBashMedium
191Number of 1 BitsRubyEasy
190Reverse BitsRubyEasy
189Rotate ArrayRubyEasy
188Best Time to Buy and Sell Stock IVRubyHard
187Repeated DNA SequencesRubyMedium
186Reverse Words in a String II🔒Medium
185Department Top Three SalariesMySQLHard
184Department Highest SalaryMySQLMedium
183Customers Who Never OrderMySQLEasy
182Duplicate EmailsMySQLEasy
181Employees Earning More Than Their ManagersMySQLEasy
180Consecutive NumbersMySQLMedium
179Largest NumberRubyMedium
178Rank ScoresMySQLMedium
177Nth Highest SalaryMySQLMedium
176Second Highest SalaryMySQLEasy
175Combine Two TablesMySQLEasy
174Dungeon GameRubyHard
173Binary Search Tree IteratorRubyMedium
172Factorial Trailing ZeroesRubyEasy
171Excel Sheet Column NumberRubyEasy
170Two Sum III - Data structure design🔒Easy
169Majority ElementRubyEasy
168Excel Sheet Column TitleRubyEasy
167Two Sum II - Input array is sorted🔒Medium
166Fraction to Recurring DecimalRubyMedium
165Compare Version NumbersRubyEasy
164Maximum GapRubyHard
163Missing Ranges🔒Medium
162Find Peak ElementRubyMedium
161One Edit Distance🔒Medium
160Intersection of Two Linked Lists🔜Easy
159Longest Substring with At Most Two Distinct Characters🔒Hard
158Read N Characters Given Read4 II - Call multiple times🔒Hard
157Read N Characters Given Read4🔒Easy
156Binary Tree Upside Down🔒Medium
155Min StackRubyEasy
154Find Minimum in Rotated Sorted Array IIRubyHard
153Find Minimum in Rotated Sorted ArrayRubyMedium
152Maximum Product SubarrayRubyMedium
151Reverse Words in a String🔜Medium
150Evaluate Reverse Polish NotationRubyMedium
149Max Points on a LineRubyHard
148Sort ListRubyMedium
147Insertion Sort ListRubyMedium
146LRU CacheRubyHard
145Binary Tree Postorder TraversalRubyHard
144Binary Tree Preorder TraversalRubyMedium
143Reorder ListRubyMedium
142Linked List Cycle II🔜Medium
141Linked List Cycle🔜Medium
140Word Break IIRubyHard
139Word BreakRubyMedium
138Copy List with Random Pointer🔜Hard
137Single Number IIRubyMedium
136Single NumberRubyMedium
135CandyRubyHard
134Gas StationRubyMedium
133Clone Graph🔜Medium
132Palindrome Partitioning IIRubyHard
131Palindrome PartitioningRubyMedium
130Surrounded RegionsRubyMedium
129Sum Root to Leaf NumbersRubyMedium
128Longest Consecutive SequenceRubyHard
127Word LadderRubyMedium
126Word Ladder II🔜Hard
125Valid PalindromeRubyEasy
124Binary Tree Maximum Path SumRubyHard
123Best Time to Buy and Sell Stock IIIRubyHard
122Best Time to Buy and Sell Stock IIRubyMedium
121Best Time to Buy and Sell StockRubyMedium
120TriangleRubyMedium
119Pascal's Triangle IIRubyEasy
118Pascal's TriangleRubyEasy
117Populating Next Right Pointers in Each Node II🔜Hard
116Populating Next Right Pointers in Each Node🔜Medium
115Distinct SubsequencesRubyHard
114Flatten Binary Tree to Linked ListRubyMedium
113Path Sum IIRubyMedium
112Path SumRubyEasy
111Minimum Depth of Binary TreeRubyEasy
110Balanced Binary TreeRubyEasy
109Convert Sorted List to Binary Search TreeRubyMedium
108Convert Sorted Array to Binary Search TreeRubyMedium
107Binary Tree Level Order Traversal IIRubyEasy
106Construct Binary Tree from Inorder and Postorder TraversalRubyMedium
105Construct Binary Tree from Preorder and Inorder TraversalRubyMedium
104Maximum Depth of Binary TreeRubyEasy
103Binary Tree Zigzag Level Order TraversalRubyMedium
102Binary Tree Level Order TraversalRubyEasy
101Symmetric TreeRubyEasy
100Same TreeRubyEasy
99Recover Binary Search TreeRubyHard
98Validate Binary Search TreeRubyMedium
97Interleaving StringRubyHard
96Unique Binary Search TreesRubyMedium
95Unique Binary Search Trees IIRubyMedium
94Binary Tree Inorder TraversalRubyMedium
93Restore IP AddressesRubyMedium
92Reverse Linked List IIRubyMedium
91Decode WaysRubyMedium
90Subsets IIRubyMedium
89Gray CodeRubyMedium
88Merge Sorted ArrayRubyEasy
87Scramble StringRubyHard
86Partition ListRubyMedium
85Maximal RectangleRubyHard
84Largest Rectangle in HistogramRubyHard
83Remove Duplicates from Sorted ListRubyEasy
82Remove Duplicates from Sorted List IIRubyMedium
81Search in Rotated Sorted Array IIRubyMedium
80Remove Duplicates from Sorted Array IIRubyMedium
79Word SearchRubyMedium
78SubsetsRubyMedium
77CombinationsRubyMedium
76Minimum Window SubstringRubyHard
75Sort ColorsRubyMedium
74Search a 2D MatrixRubyMedium
73Set Matrix ZeroesRubyMedium
72Edit DistanceRubyHard
71Simplify PathRubyMedium
70Climbing StairsRubyEasy
69Sqrt()RubyMedium
68Text JustificationRubyHard
67Add BinaryRubyEasy
66Plus OneRubyEasy
65Valid NumberRubyHard
64Minimum Path SumRubyMedium
63Unique Paths IIRubyMedium
62Unique PathsRubyMedium
61Rotate ListRubyMedium
60Permutation SequenceRubyMedium
59Spiral Matrix IIRubyMedium
58Length of Last WordRubyEasy
57Insert IntervalRubyHard
56Merge IntervalsRubyHard
55Jump GameRubyMedium
54Spiral MatrixRubyMedium
53Maximum SubarrayRubyMedium
52N-Queens IIRubyHard
51N-QueensRubyHard
50Pow(x, n)RubyMedium
49Group AnagramsRubyMedium
48Rotate ImageRubyMedium
47Permutations IIRubyMedium
46PermutationsRubyMedium
45Jump Game IIRubyHard
44Wildcard MatchingRubyHard
43Multiply StringsRubyMedium
42Trapping Rain WaterRubyHard
41First Missing PositiveRubyHard
40Combination Sum IIRubyMedium
39Combination SumRubyMedium
38Count and SayRubyEasy
37Sudoku SolverRubyHard
36Valid SudokuRubyEasy
35Search Insert PositionRubyMedium
34Search for a RangeRubyMedium
33Search in Rotated Sorted ArrayRubyHard
32Longest Valid ParenthesesRubyHard
31Next PermutationRubyMedium
30Substring with Concatenation of All WordsRubyHard
29Divide Two IntegersRubyMedium
28Implement strStr()RubyEasy
27Remove ElementRubyEasy
26Remove Duplicates from Sorted ArrayRubyEasy
25Reverse Nodes in k-GroupRubyHard
24Swap Nodes in PairsRubyMedium
23Merge k Sorted ListsRubyHard
22Generate ParenthesesRubyMedium
21Merge Two Sorted ListsRubyEasy
20Valid ParenthesesRubyEasy
19Remove Nth Node From End of ListRubyEasy
184SumRubyMedium
17Letter Combinations of a Phone NumberRubyMedium
163Sum ClosestRubyMedium
153SumRubyMedium
14Longest Common PrefixRubyEasy
13Roman to IntegerRubyEasy
12Integer to RomanRubyMedium
11Container With Most WaterRubyMedium
10Regular Expression MatchingRubyHard
9Palindrome NumberRubyEasy
8String to Integer (atoi)RubyEasy
7Reverse IntegerRubyEasy
6ZigZag ConversionRubyEasy
5Longest Palindromic SubstringRubyMedium
4Median of Two Sorted ArraysRubyHard
3Longest Substring Without Repeating CharactersRubyMedium
2Add Two NumbersRubyMedium
1Two SumRubyMedium

About

Solutions to all LeetCode problems: Algorithms/Ruby, Database/MySQL, Shell/Bash

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby98.8%
  • Other1.2%

[8]ページ先頭

©2009-2025 Movatter.jp