/LeetCode_solutions

111 efficient solutions to LeetCode problems


111 efficient solutions to LeetCode problems

# Question Solution Difficulty
1 Two Sum Solution Easy
2 Add Two Numbers Solution Medium
4 Median of Two Sorted Arrays Solution Hard
5 Longest Palindromic Substring Solution Medium
15 3sum Solution Medium
16 3sum Closest Solution Medium
17 Letter Combinations of a Phone Number Solution Medium
19 Remove Nth Node From End of List Solution Medium
20 Valid Parentheses Solution Easy
21 Merge Two Sorted Lists Solution Easy
22 Generate Parentheses Solution Medium
23 Merge k Sorted Lists Solution Hard
28 Implement strStr() Solution Easy
33 Search in Rotated Sorted Array Solution Medium
42 Trapping Rain Water Solution Hard
46 Permutations Solution Medium
47 Permutations II Solution Medium
48 Rotate Image Solution Medium
49 Group Anagrams Solution Medium
51 N-Queens Solution Hard
52 N-Queens II Solution Hard
53 Maximum Subarray Solution Easy
55 Jump Game Solution Medium
62 Unique Paths Solution Medium
63 Unique Paths II Solution Medium
70 Climbing Stairs Solution Easy
73 Set Matrix Zeroes Solution Medium
78 Subsets Solution Medium
81 Search in Rotated Sorted Array II Solution Medium
90 Subsets II Solution Medium
92 Reverse Linked List II Solution Medium
94 Binary Tree Inorder Traversal Solution Medium
98 Validate Binary Search Tree Solution Medium
102 Binary Tree Level Order Traversal Solution Medium
104 Maximum Depth of Binary Tree Solution Easy
108 Convert Sorted Array to Binary Search Tree Solution Easy
110 Balanced Binary Tree Solution Easy
127 Word Ladder Solution Medium
136 Single Number Solution Easy
139 Word Break Solution Medium
141 Linked List Cycle Solution Easy
142 Linked List Cycle II Solution Medium
143 Reorder List Solution Medium
144 Binary Tree Preorder Traversal Solution Medium
145 Binary Tree Postorder Traversal Solution Hard
146 LRU Cache Solution Medium
148 Sort List Solution Medium
149 Max Points on a Line Solution Hard
151 Reverse Words in a String Solution Medium
155 Min Stack Solution Easy
160 Intersection of Two linked Lists Solution Easy
162 Find Peak Element Solution Medium
169 Majority Element Solution Easy
172 Factorial Trailing Zeroes Solution Easy
189 Rotate Array Solution Easy
200 Number of Islands Solution Medium
206 Reverse Linked List Solution Easy
207 Course Schedule Solution Medium
208 Implement Trie (Prefix Tree) Solution Medium
210 Course Schedule II Solution Medium
231 Power of Two Solution Easy
232 Implement Queue using Stacks Solution Easy
234 Palindrome Linked List Solution Easy
235 Lowest Common Ancestor of a Binary Search Tree Solution Easy
236 Lowest Common Ancestor of a Binary Tree Solution Medium
237 Delete Node in a Linked List Solution Easy
239 Sliding Window Maximum Solution Hard
240 Search a 2D Matrix II Solution Medium
242 Valid Anagram Solution Easy
264 Ugly Number II Solution Medium
268 Missing Number Solution Easy
273 Integer to English Words Solution Hard
290 Word Pattern Solution Easy
295 Find Median from Data Stream Solution Hard
300 Longest Increasing Subsequence Solution Medium
347 Top K Frequent Elements Solution Medium
354 Russian Doll Envelopes Solution Hard
371 Sum of Two Integers Solution Easy
380 Insert Delete GetRandom O(1) Solution Medium
381 Insert Delete GetRandom O(1) - Duplicates allowed Solution Hard
383 Ransom Note Solution Easy
384 Shuffle an Array Solution Medium
429 N-ary Tree Level Order Traversal Solution Easy
437 Path Sum III Solution Easy
443 String Compression Solution Easy
445 Add Two Numbers II Solution Medium
454 4Sum II Solution Medium
470 Implement Rand10() Using Rand7() Solution Medium
509 Fibonacci Number Solution Easy
516 Longest Palindromic Subsequence Solution Medium
518 Coin Change 2 Solution Medium
525 Contiguous Array Solution Medium
559 Maximum Depth of N-ary Tree Solution Easy
560 Subarray Sum Equals K Solution Medium
572 Subtree of Another Tree Solution Easy
581 Shortest Unsorted Continuous Subarray Solution Easy
589 N-ary Tree Preorder Traversal Solution Easy
590 N-ary Tree Postorder Traversal Solution Easy
692 Top K Frequent Words Solution Medium
695 Max Area of Island Solution Medium
703 Kth Largest Element in a Stream Solution Easy
704 Binary Search Solution Easy
706 Design HashMap Solution Easy
707 Design Linked List Solution Easy
733 Flood Fill Solution Easy
912 Sort an Array Solution Medium
976 Largest Perimeter Triangle Solution Easy
1010 Pairs of Songs With Total Durations Divisible by 60 Solution Easy
1092 Shortest Common Supersequence Solution Hard
1114 Print in Order Solution Easy
1139 Largest 1-Bordered Square Solution Medium