Skip to content

FFIB/leetcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Array

# Title Difficulty
565 Array Nesting Medium
561 Array Partition I Easy
605 Can Place Flowers Easy
11 Container With Most Water Medium
442 Find All Duplicates in an Array Medium
448 Find All Numbers Disappeared in an Array Easy
532 K-diff Pairs in an Array Easy
500 Keyboard Row Easy
485 Max Consecutive Ones Easy
643 Maximum Average Subarray I Easy
624 Maximum Distance in Arrays Easy
88 Merge Sorted Array Easy
283 Move Zeroes Easy
238 Product of Array Except Self Medium
26 Remove Duplicates from Sorted Array Easy
80 Remove Duplicates from Sorted Array II Medium
27 Remove Element Easy
566 Reshape the Matrix Easy
189 Rotate Array Easy
48 Rotate Image Medium
581 Shortest Unsorted Continuous Subarray Easy
228 Summary Ranges Medium
495 Teemo Attacking Medium
414 Third Maximum Number Easy
31 Next Permutation Medium
611 Valid Triangle Number Medium
15 3Sum Medium
73 Set Matrix Zeroes Medium
239 Sliding Window Maximum Hard
665 Non-decreasing Array Easy
674 Longest Continuous Increasing Subsequence Easy
661 Image Smoother Easy
697 Degree of an Array Easy
724 [Find Pivot Index](https://github.com/FFIB/leetcode/blob/master/leetcode/Array/Fin
ivotIndex.swift) Medium
717 1-bit and 2-bit Characters Medium
713 Subarray Product Less Than K Medium
118 Pascal's Triangle Easy
119 Pascal's Triangle II Easy
16 3Sum Closest Medium
747 Largest Number At Least Twice of Others Easy
769 Max Chunks To Make Sorted Medium
768 Max Chunks To Make Sorted II Hard
766 Toeplitz Matrix Easy
795 Number of Subarrays with Bounded Maximum Medium
822 Card Flipping Game Medium
832 Flipping an Image Easy
806 Number of Lines To Write String Easy

String

# Title Difficulty
165 Compare Version Numbers Medium
520 Detect Capital Easy
28 Implement strStr() Easy
58 Length of Last Word Easy
521 Longest Uncommon Subsequence I Easy
434 Number of Segments in a String Easy
567 Permutation in String Medium
383 Ransom Note Easy
459 Repeated Substring Pattern Easy
345 Reverse Vowels of a String Easy
557 Reverse Words in a String III Easy
551 Student Attendance Record I Easy
125 Valid Palindrome Easy
6 ZigZag Conversion Medium
468 Validate IP Address Medium
657 Judge Route Circle Easy
680 Valid Palindrome II Easy
678 Valid Parenthesis String Medium
670 Maximum Swap Medium
443 String Compression Easy
14 Longest Common Prefix Easy
696 Count Binary Substrings Easy
38 Count and Say Easy
539 Minimum Time Difference Medium
5 Longest Palindromic Substring Medium
556 Next Greater Element III Medium
522 Longest Uncommon Subsequence II Medium
763 Partition Labels Medium
241 Different Ways to Add Parentheses Medium
809 Expressive Words Medium
791 Custom Sort String Medium
804 Unique Morse Code Words Easy
821 Shortest Distance to a Character Easy
831 Masking Personal Information Easy
424 Longest Repeating Character Replacement Medium
819 Most Common Word Easy
833 Find And Replace in String Medium
824 Goat Latin Easy
820 Short Encoding of Words Medium
816 Ambiguous Coordinates Medium
796 Rotate String Easy

List

# Title Difficulty
2 Add Two Numbers Medium
445 Add Two Numbers II Medium
21 Merge Two Sorted Lists Easy
328 Odd Even Linked List Medium
234 Palindrome Linked List Easy
83 Remove Duplicates from Sorted List Easy
203 Remove Linked List Elements Easy
19 Remove Nth Node From End of List Medium
143 Reorder List Medium
206 Reverse Linked List Easy
61 Rotate List Medium
24 Swap Nodes in Pairs Medium
86 Partition List Medium
82 Remove Duplicates from Sorted List II Medium
725 Split Linked List in Parts Medium
817 Linked List Components Medium

Tree

# Title Difficulty
563 Binary Tree Tilt Easy
538 Convert BST to Greater Tree Easy
543 Diameter of Binary Tree Easy
501 Find Mode in Binary Search Tree Easy
226 Invert Binary Tree Easy
617 Merge Two Binary Trees Easy
437 Path Sum III Easy
572 Subtree of Another Tree Easy
530 Minimum Absolute Difference in BST Easy
404 Sum of Left Leaves Easy
654 Maximum Binary Tree Medium
653 Two Sum IV - Input is a BST Easy
637 Average of Levels in Binary Tree Easy
669 Trim a Binary Search Tree Easy
687 Longest Univalue Path Easy
606 Construct String from Binary Tree Easy
450 Delete Node in a BST Medium
337 House Robber III Medium
623 Add One Row to Tree Medium
652 Find Duplicate Subtrees Medium
655 Print Binary Tree Medium
230 Kth Smallest Element in a BST Medium
783 Minimum Distance Between BST Nodes Easy
814 Binary Tree Pruning Medium

Stack

# Title Difficulty
636 Exclusive Time of Functions Medium
735 Asteroid Collision Medium
682 Baseball Game Easy
224 Basic Calculator Hard
227 Basic CalculatorII Medium
150 Evaluate Reverse Polish Notation Medium
496 Next Greater Element I Easy
503 Next Greater Element II Medium
71 Simplify Path Medium
42 Trapping Rain Water Hard
20 Valid Parentheses Easy
402 Remove K Digits Medium
316 Remove Duplicate Letters Hard
739 Daily Temperatures Medium
385 Mini Parser Medium
144 Binary Tree Preorder Traversal Medium
94 Binary Tree Inorder Traversal Medium
145 Binary Tree Postorder Traversal Hard
199 Binary Tree Right Side View Medium

Queue

# Title Difficulty
621 Task Scheduler Medium
102 Binary Tree Level Order Traversal Medium
107 Binary Tree Level Order Traversal II Easy
103 Binary Tree Zigzag Level Order Traversal Medium
662 Maximum Width of Binary Tree Medium

Math

# Title Difficulty
65 Valid Number Hard
263 Ugly Number Easy
258 Add Digits Easy
319 Bulb Switcher Medium
168 Excel Sheet Column Title Easy
172 Factorial Trailing Zeroes Easy
12 Integer to Roman Medium
553 Optimal Division Medium
9 Palindrome Number Easy
507 Perfect Number Easy
400 Nth Digit Easy
326 Power of Three Easy
7 Reverse Integer Easy
54 Spiral Matrix Medium
59 Spiral Matrix II Medium
633 Sum of Square Numbers Easy
292 Nim Game Easy
204 Count Primes Easy
368 Largest Divisible Subset Medium
223 Rectangle Area Medium
372 Super Pow Medium
593 Valid Square Medium
667 Beautiful Arrangement II Medium
640 Solve the Equation Medium
672 Bulb Switcher II Medium
728 Self Dividing Numbers Easy
396 Rotate Function Medium
628 Maximum Product of Three Numbers Easy
453 Minimum Moves to Equal Array Elements Easy
462 Minimum Moves to Equal Array Elements II Medium
66 Plus One Easy
598 Range Addition II Easy
67 Add Binary Easy
415 Add Strings Easy
171 Excel Sheet Column Number Easy
423 Reconstruct Original Digits from English Medium
13 Roman to Integer Easy
8 String to Integer (atoi) Medium
592 Fraction Addition and Subtraction Medium
754 Reach a Number Medium
43 Multiply Strings Medium
313 Super Ugly Number Medium
812 Largest Triangle Area Easy
829 Consecutive Numbers Sum Medium
830 Positions of Large Groups Medium
789 Escape The Ghosts Medium

Sort

# Title Difficulty
75 Sort Colors Medium
324 Wiggle Sort II Medium
274 H-Index Medium
57 Insert Interval Hard
147 Insertion Sort List Medium
215 Kth Largest Element in an Array Medium
524 Longest Word in Dictionary through Deleting Medium
56 Merge Intervals Medium
825 Friends Of Appropriate Ages Medium
826 Most Profit Assigning Work Medium

DP

# Title Difficulty
62 Unique Paths Medium
63 Unique Paths II Medium
91 Decode Ways Medium
64 Minimum Path Sum Medium
494 Target Sum Medium
688 Knight Probability in Chessboard Medium
139 Word Break Medium
140 Word BreakII Medium
96 Unique Binary Search Trees Medium
95 Unique Binary Search Tree II Medium
300 Longest Increasing Subsequence Medium
467 Unique Substrings in Wraparound String Medium
650 2 Keys Keyboard Medium
123 Best Time to Buy and Sell Stock III Hard
312 Burst Balloons Hard
413 Arithmetic Slices Medium
121 Best Time to Buy and Sell Stock Easy
70 Climbing Stairs Easy
377 Combination Sum IV Medium
523 Continuous Subarray Sum Medium
357 Count Numbers with Unique Digits Medium
375 Guess Number Higher or Lower II Medium
198 House Robber Easy
213 House Robber II Medium
343 Integer Break Medium
629 K Inverse Pairs Array Hard
516 Longest Palindromic Subsequence Medium
221 Maximal Square Medium
646 Maximum Length of Pair Chain Medium
152 Maximum Product Subarray Medium
647 Palindromic Substrings Medium
416 Partition Equal Subset Sum Medium
120 Triangle Medium
264 Ugly Number II Medium
740 Delete and Earn Medium
718 Maximum Length of Repeated Subarray Medium
746 Min Cost Climbing Stairs Easy
583 Delete Operation for Two Strings Medium
712 Minimum ASCII Delete Sum for Two Strings Medium
698 Partition to K Equal Sum Subsets Medium
823 Binary Trees With Factors Medium
813 Largest Sum of Averages Medium
801 Minimum Swaps To Make Sequences Increasing Medium

BFS

# Title Difficulty
130 Surrounded Regions Medium
752 Open the Lock Medium

Backtracking

# Title Difficulty
526 Beautiful Arrangement Medium
77 Combinations Medium
39 Combination Sum Medium
40 Combination Sum II Medium
216 Combination Sum III Medium
22 Generate Parentheses Medium
17 Letter Combinations of a Phone Number Medium
46 Permutations Medium
47 Permutations II Medium
78 Subsets Medium
90 Subsets II Medium
79 Word Search Medium

Binary Search

# Title Difficulty
441 Arranging Coins Easy
153 Find Minimum in Rotated Sorted Array Medium
154 Find Minimum in Rotated Sorted Array II Hard
33 Search in Rotated Sorted Array Medium
81 Search in Rotated Sorted Array II Medium
162 Find Peak Element Medium
287 Find the Duplicate Number Medium
475 Heaters Easy
378 Kth Smallest Element in a Sorted Matrix Medium
4 Median of Two Sorted Arrays Hard
290 Minimum Size Subarray Sum Medium
50 Pow(x, n) Medium
74 Search a 2D Matrix Medium
35 Search Insert Position Easy
34 Search for a Range Medium
167 Two Sum II - Input array is sorted Easy
367 Valid Perfect Square Easy
658 Find K Closest Elements Medium
744 Find Smallest Letter Greater Than Target Medium

Bit Manipulation

# Title Difficulty
693 Binary Number with Alternating Bits Easy
405 Convert a Number to Hexadecimal Easy
338 Counting Bits Medium
461 Hamming Distance Easy
397 Integer Replacement Medium
268 Missing Number Easy
476 Number Complement Easy
231 Power of Two Easy
342 Power of Four Easy
136 Single Number Easy
137 Single Number II Medium
260 Single Number III Medium
371 Sum of Two Integers Easy
477 Total Hamming Distance Medium

DFS

# Title Difficulty
110 Balanced Binary Tree Easy
257 Binary Tree Paths Easy
108 Convert Sorted Array to Binary Search Tree Easy
394 Decode String Medium
513 Find Bottom Left Tree Value Medium
515 Find Largest Value in Each Tree Row Medium
695 Max Area of Island Easy
104 Maximum Depth of Binary Tree Easy
111 Minimum Depth of Binary Tree Easy
112 Path Sum Easy
113 Path Sum II Medium
100 Same Tree Easy
101 Symmetric Tree Easy
733 Flood Fill Easy
129 Sum Root to Leaf Numbers Medium
105 Construct Binary Tree from Preorder and Inorder Traversal Medium
106 Construct Binary Tree from Inorder and Postorder Traversal Medium
114 Flatten Binary Tree to Linked List Medium
98 Validate Binary Search Tree Medium
547 Friend Circles Medium
638 Shopping Offers Medium
464 Can I Win Medium
797 All Paths From Source to Target Medium

Divide and Conquer

# Title Difficulty
53 Maximum Subarray Easy
240 Search a 2D Matrix II Medium

Greedy

# Title Difficulty
455 Assign Cookies Easy
122 Best Time to Buy and Sell Stock II Easy
392 is Subsequence Medium
55 Jump Game Medium
452 Minimum Number of Arrows to Burst Balloons Medium
435 Non-overlapping Intervals Medium
406 Queue Reconstruction by Height Medium
376 Wiggle Subsequence Medium
738 Monotone Increasing Digits Medium
649 Dota2 Senate Medium
659 Split Array into Consecutive Subsequences Medium

Map

# Title Difficulty
560 Subarray Sum Equals K Medium

Hash Table

# Title Difficulty
554 Brick Wall Medium
299 Bulls and Cows Medium
217 Contains Duplicate Easy
219 Contains Duplicate II Easy
575 Distribute Candies Easy
438 Find All Anagrams in a String Easy
609 Find Duplicate File in System Medium
18 4Sum Medium
166 Fraction to Recurring Decimal Medium
49 Group Anagrams Medium
202 Happy Number Easy
349 Intersection of Two Arrays Easy
350 Intersection of Two Arrays II Easy
463 Island Perimeter Easy
594 Longest Harmonious Subsequence Easy
409 Longest Palindrome Easy
3 Longest Substring Without Repeating Characters Medium
169 Majority Element Easy
229 Majority Element II Medium
599 Minimum Index Sum of Two Lists Easy
76 Minimum Window Substring Hard
508 Most Frequent Subtree Sum Medium
506 Relative Ranks Easy
648 Replace Words Medium
645 Set Mismatch Easy
632 Smallest Range Hard
451 Sort Characters By Frequency Medium
30 Substring with Concatenation of All Words Hard
347 Top K Frequent Elements Medium
692 Top K Frequent Words Medium
1 Two Sum Easy
242 Valid Anagram Easy
290 Word Pattern Easy
454 4Sum II Medium
336 Palindrome Pairs Hard
720 Longest Word in Dictionary Easy
748 Shortest Completing Word Medium
525 Contiguous Array Medium
187 Repeated DNA Sequences Medium
781 Rabbits in Forest Medium
811 Subdomain Visit Count Easy

Unknown

# Title Difficulty
504 Base 7 Easy
419 Battleships in a Board Medium
492 Construct the Rectangle Easy
498 Diagonal Traverse Medium
390 Elimination Game Medium
387 First Unique Character in a String Easy
412 Fizz Buzz Easy
334 Increasing Triplet Subsequence Medium
479 Largest Palindrome Product Easy
482 License Key Formatting Medium
388 Longest Absolute File Path Medium
481 Magical String Medium
540 Single Element in a Sorted Array Medium

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages