Skip to content

Latest commit

 

History

History
197 lines (185 loc) · 30.5 KB

README.md

File metadata and controls

197 lines (185 loc) · 30.5 KB

LC-Solutions

These are my solutions to LeetCode problems.

Progress: Solved 485/1397.

Arrays

# Title Solution Difficulty
1 Two Sum Java Easy
7 Reverse Integer Java Easy
26 Remove Duplicates from Sorted Array Java Medium
36 Valid Sudoku Java Medium
46 Permutations Java Medium
56 Merge Intervals Java Medium
66 Plus One Java Easy
70 Climbing Stairs Java Easy
73 Set Matrix Zeroes Java Medium
75 Sort Colors Java Medium
77 Combinations Java Medium
78 Subsets Java Medium
80 Remove Duplicates from Sorted Array II Java Medium
88 Merge Sorted Array Java Easy
118 Pascals Triangle Java Easy
119 Pascals Triangle II Java Easy
121 Best Time to Buy and Sell Stock Java Easy
122 Best Time to Buy and Sell Stock II Java Easy
134 Gas Station Java Medium
136 Single Number Java Easy
169 Majority Element Java Easy
189 Rotate Array Java Easy
209 Minimum Size Subarray Sum Java Medium
217 Contains Duplicate Java Easy
229 Majority Element II Java Medium
238 Product Of Array Except Self Java Easy
268 Missing Number Java Easy
283 Move Zeros Java Easy
287 Find Dupliate Number Java Medium
349 Intersect Of Arrays Java Easy
350 Intersect Of Arrays II Java Easy
414 Third Max Java Easy
442 Find All Duplicates in Array Java Medium
485 Max Consecutive Ones Java Easy
496 Next Greater Element Java Easy
566 Reshap The Matrix Java Easy
665 Non Decreasing Array Java Easy
832 Flipping an Image Java Easy
852 Peak index in a mountain array Java Easy
896 Monotonic Array Java Easy
905 Sort Array by Parity Java Easy
922 Sort Array by Parity II Java Easy
931 Minimum Falling Path Java Medium
961 N Repeated Element in Size 2n Array Java Easy
969 Pancake Sorting Java Medium
985 Sum of Even Numbers After Queries Java Easy
986 Interval List Intersections Java Medium

Trees

# Title Solution Difficulty
94 Binary Tree Inorder Traversal Java Medium
98 Validate Binary Search Tree Java Medium
101 Symmetric Tree Java Easy
104 Maximum Depth of Binary Tree Java Easy
108 Convert Sorted Array to BST Java Easy
112 Path Sum Java Easy
129 Sum Root-to-Leaf Numbers Java Medium
226 Invert Binary Tree Java Easy
230 Kth Smallest Element in A BST Java Easy
429 N-ary Tree Level Order Traversal Java Easy
513 Find Bottom Left Tree Value Java Medium
515 Find Largest Value In Each Tree Row Java Medium
538 Convert BST To Greater Tree Java Easy
543 Diameter of Binary Tree Java Easy
559 Maximum Depth of N-ary Tree Java Easy
589 N-ary Tree Preorder Traversal Java Easy
590 N-ary Tree Postorder Traversal Java Easy
617 Merge Two Binary Trees Java Easy
637 Average of Levels in Binary Tree Java Easy
654 Maximum Binary Tree Java Medium
669 Trim a Binary Search Tree Java Easy
700 Search in a BST Java Easy
701 Insert into a BST Java Medium
872 Leaf Similar Trees Java Easy
897 Increasing Order Search Tree Java Easy
938 Range Sum of BST Java Medium
951 Flip Equivalent Binary Trees Java Medium
965 Univalued Binary Tree Java Easy

Strings

# Title Solution Difficulty
8 String to Integer(atoi) Java Medium
13 Roman to Integer Java Easy
14 Longest Common Prefix Java Easy
28 Implement strStr() Java Easy
49 Group Anagrams Java Medium
58 Length of Last Word Java Easy
76 Minimum Window Substring Java Hard
125 Valid Palindrome Java Easy
150 Evaluate Reverse Polish Notation Java Medium
242 Valid Anagram Java Easy
344 Reverse String Java Easy
383 Ransom Note Java Easy
387 First Unique Character in a String Java Easy
389 Find the Difference Java Easy
438 Find all Anagrams in a String Java Easy
520 Detect Capital Java Easy
521 Longest Uncommon Subsequence I Java Easy
537 Complex Number Multiplication Java Medium
557 Reverse Words in a String III Java Easy
609 Find Duplicate File in System Java Medium
657 Robot Return to Origin Java Easy
709 To Lower Case Java Easy
748 Shortest Completing Word Java Easy
763 Partition Labels Java Medium
771 Jewels and Stones Java Easy
784 Letter Case Permutation Java Easy
791 Custom Sort String Java Medium
796 Rotate String Java Easy
804 Unique Morse Code Words Java Easy
821 Shortest Distance To a Character Java Easy
824 Goat Latin Java Easy
884 Uncommon Words From Two Sentences Java Easy
890 Find and Replace Pattern Java Medium
893 Groups of Special-Equivalent Strings Java Easy
917 Reverse Only Letters Java Easy
929 Unique Email Addresses Java Easy
937 Reorder Log Files Java Easy
1002 Find Common Characters Java Easy
1016 Binary String with Substrings Representing 1 To N Java Medium

Linked List

# Title Solution Difficulty
19 Remove Nth Node From End of List Java Medium
21 Merge Two Sorted Lists Java Easy
24 Swap Nodes in Pairs Java Medium
61 Rotate List Java Medium
82 Remove Duplicates from Sorted List II Java Medium
83 Remove Duplicates from Sorted List Java Easy
86 Partition List Java Medium
92 Reverse Linked List II Java Medium
141 LinkedList Cycle Java Easy
142 LinkedList Cycle II Java Medium
143 Reorder List Java Medium
147 Insertion Sort Lists Java Medium
160 Insertion of Two Linked Lists Java Easy
203 Remove Linked List Elements Java Easy
206 Reverse Linked List Java Easy
234 Palindrome Linked List Java Easy
237 Delete Node In a Linked List Java Easy
328 Odd Even Linked List Java Medium
707 Design Linked List Java Easy
876 Middle Of the Linked List Java Easy

Stack & Queue

# Title Solution Difficulty
20 Valid Parentheses Java Easy
347 Top K Frequent Elements Java Medium
406 Queue Reconstruction By Height Java Medium
451 Sort Characters by Frequency Java Medium
739 Daily Temperatures Java Medium
946 Validate Stack Sequences Java Medium
973 K Closest Points To Origin Java Medium
1047 Remove All Adjacent Duplicates In String Java Easy

Math

# Title Solution Difficulty
69 Sqrt(x) Java Easy
89 Gray Code Java Medium
168 Excel Sheet Column Title Java Easy
171 Excel Sheet Column Number Java Easy
202 Happy Number Java Easy
258 Add Digits Java Easy
338 Counting Bits Java Medium
380 Insert Delete getRandom O(1) Java Medium
419 Battleships In a Board Java Medium
476 Number Complement Java Easy
509 Fibonacci Number Java Easy
575 Distribute Candies Java Easy
693 Binary Number with Alternating Bits Java Easy
728 Self Dividing Numbers Java Easy
868 Binary Gap Java Easy
942 DI String Match Java Easy