Skip to content

Latest commit

 

History

History
99 lines (94 loc) · 13.6 KB

Leetcode Top 150.md

File metadata and controls

99 lines (94 loc) · 13.6 KB

Important DSA Questions

Leetcode Top 150 - Easy + Medium

Number Problem Name Solution
1 Two Sum Two Sum
2 Valid Palindrome Valid Palindrome
3 3sum 3sum
4 Remove Element Remove Element
5 Remove Duplicates from Sorted Array Remove Duplicates
6 Remove Duplicates from Sorted Array II Remove Duplicates II
7 Majority Element Majority Element
8 Merge Sorted Array Merge Sorted Array
9 Best Time to Buy and Sell Stock Stock I
10
11 Is Subsequence Is Subsequence
12 Valid Parentheses Valid Parentheses
13 Valid Anagram Valid Anagram
14 Plus One Plus One
15 Palindrome Number Palindrome Number
16 Single Number Single Number
17 Ransom Note Ransom Note
18 Longest Common Prefix Longest Common Prefix
19 Length of Last Word Length of Last Word
20 Isomorphic Strings Isomorphic Strings
21 Happy Number Happy Number
22 Word Pattern Word Pattern
23 Contains Duplicate II Contains Duplicate II
24 Sqrt(x) Sqrt(x)
25 Number of 1 Bits Number of 1 Bits
26 Find the Index of the First Occurrence in a String Find the Index of the First Occurrence in a String
27 Reverse Bits Reverse Bits
28 Add Binary Add Binary
29 Search Insert Position Search Insert Position
30 Group Anagrams Group Anagrams
31 Summary Ranges Summary Ranges
32 Longest Consecutive Sequence Longest Consecutive Sequence
33 Evaluate Reverse Polish Notation Evaluate Reverse Polish Notation
34 Min Stack Min Stack
35 Simplify Path Simplify Path
36 Basic Calculator Basic Calculator
37 Container With Most Water Container With Most Water
38 Two Sum II - Input Array Is Sorted Two Sum II - Input Array Is Sorted
39 Pow(x, n) Pow(x, n)
40 Factorial Trailing Zeroes Factorial Trailing Zeroes
41 Best Time to Buy and Sell Stock II Best Time to Buy and Sell Stock II
42 Product of Array Except Self Product of Array Except Self
43 Maximum Subarray Maximum Subarray
44 Maximum Sum Circular Subarray Maximum Sum Circular Subarray
45 Reverse Words in a String Reverse Words in a String
46 Linked List Cycle Linked List Cycle
47 Add Two Numbers Add Two Numbers
48 Insert Delete GetRandom O(1) Insert Delete GetRandom O(1)
49 Rotate Array Rotate Array
50 Jump Game Jump Game
51 Jump Game II Jump Game II
52 LRU Cache LRU Cache
53 Top K Frequent Elements Top K Frequent Elements
54 String Encode and Decode String Encode and Decode
55 Valid Sudoku Valid Sudoku
56 Merge Two Sorted Lists Merge Two Sorted Lists
57 Remove Duplicates from Sorted List II Remove Duplicates from Sorted List II
58 Validate Binary Search Tree Validate Binary Search Tree
59 Binary Tree Level Order Traversal Binary Tree Level Order Traversal
60 Symmetric Tree Symmetric Tree
61 Invert Binary Tree Invert Binary Tree
62 Maximum Depth of Binary Tree Maximum Depth of Binary Tree
63 Same Tree Same Tree
64 Longest Substring Without Repeating Characters Longest Substring Without Repeating Characters
65 Minimum Size Subarray Sum Minimum Size Subarray Sum
66 House Robber House Robber
67 Word Break Word Break
68 Merge Intervals Merge Intervals
69 Rotate List Rotate List
70 Copy List with Random Pointer Copy List with Random Pointer
71 Reverse Linked List Reverse Linked List
72 Remove Nth Node From End of List Remove Nth Node From End of List
73 Counting Bits Counting Bits
74 Minimum Number of Arrows to Burst Balloons Minimum Number of Arrows to Burst Balloons
75 Insert Interval Insert Interval
76 Reverse Linked List II Reverse Linked List II
77 Partition List Partition List
78 Zigzag Conversion Zigzag Conversion
79 Roman to Integer Roman to Integer
80 Integer to Roman Integer to Roman
81 Gas Station Gas Station
82 H-Index H-Index
83
84

Leetcode Top 150 - Hard

Number Problem Name Solution
1 Max Points on a Line Max Points on a Line
2 Trapping Rain Water Trapping Rain Water
3 Reverse Nodes in k-Group Reverse Nodes in k-Group