Index | Question | Difficulty | Data Structure | Algorithm | Status |
278 | First Bad Version | Easy | Array | Binary Search | Done |
263 | Ugly Number | Easy | Math | Done | |
258 | Add Digits | Easy | Math | Done | |
257 | Binary Tree Paths | Easy | Tree | Done | |
237 | Delete Node in a Linked List | Easy | Linked List | Done | |
235 | Lowest Common Ancestor of a Binary Search Tree | Easy | Done | ||
234 | Palindrome Linked List | Easy | Done | ||
232 | Implement Queue using Stacks | Easy | Done | ||
231 | Power of Two | Easy | Done | ||
228 | Summary Ranges | Easy | Done | ||
226 | Invert Binary Tree | Easy | Done | ||
225 | Implement Stack using Queues | Easy | Done | ||
223 | Rectangle Area | Easy | Done | ||
219 | Contains Duplicate II | Easy | Done | ||
217 | Contains Duplicate | Easy | Done | ||
206 | Reverse Linked List | Easy | Done | ||
205 | Isomorphic Strings | Easy | Done | ||
204 | Count Primes | Easy | Done | ||
203 | Remove Linked List Elements | Easy | Done | ||
202 | Happy Number | Easy | Done | ||
198 | House Robber | Easy | Done | ||
191 | Number of 1 Bits | Easy | Done | ||
190 | Reverse Bits | Easy | Done | ||
189 | Rotate Array | Easy | Done | ||
172 | Factorial Trailing Zeroes | Easy | Done | ||
171 | Excel Sheet Column Number | Easy | Done | ||
170 | Two Sum III - Data structure design | Easy | ---- | ||
169 | Majority Element | Easy | Done | ||
168 | Excel Sheet Column Title | Easy | Done | ||
165 | Compare Version Numbers | Easy | Done | ||
160 | Intersection of Two Linked Lists | Easy | Done | ||
157 | Read N Characters Given Read4 | Easy | ---- | ||
155 | Min Stack | Easy | Done | ||
125 | Valid Palindrome | Easy | Done | ||
119 | Pascal's Triangle II | Easy | Done | ||
118 | Pascal's Triangle | Easy | Done | ||
112 | Path Sum | Easy | Done | ||
111 | Minimum Depth of Binary Tree | Easy | Done | ||
110 | Balanced Binary Tree | Easy | Done | ||
107 | Binary Tree Level Order Traversal II | Easy | Done | ||
104 | Maximum Depth of Binary Tree | Easy | Done | ||
102 | Binary Tree Level Order Traversal | Easy | Done | ||
101 | Symmetric Tree | Easy | Done | ||
100 | Same Tree | Easy | Done | ||
88 | Merge Sorted Array | Easy | Done | ||
83 | Remove Duplicates from Sorted List | Easy | Done | ||
70 | Climbing Stairs | Easy | Done | ||
67 | Add Binary | Easy | Done | ||
66 | Plus One | Easy | Done | ||
58 | Length of Last Word | Easy | Done | ||
38 | Count and Say | Easy | Done | ||
36 | Valid Sudoku | Easy | Done | ||
28 | Implement strStr() | Easy | Done | ||
27 | Remove Element | Easy | Done | ||
26 | Remove Duplicates from Sorted Array | Easy | Done | ||
21 | Merge Two Sorted Lists | Easy | Done | ||
20 | Valid Parentheses | Easy | Done | ||
19 | Remove Nth Node From End of List | Easy | Done | ||
14 | Longest Common Prefix | Easy | Done | ||
13 | Roman to Integer | Easy | Done | ||
9 | Palindrome Number | Easy | Done | ||
8 | String to Integer (atoi) | Easy | Done | ||
7 | Reverse Integer | Easy | Done | ||
6 | ZigZag Conversion | Easy | Done | ||
Index | Question | Difficulty | Data Structure | Algorithm | Status |
268 | Missing Number | Medium | Array | XOR | Done |
264 | Ugly Number II | Medium | Array | Done | |
260 | Single Number III | Medium | Array | XOR-mask-XOR | Done |
238 | Product of Array Except Self | Medium | Array | Done | |
236 | Lowest Common Ancestor of a Binary Tree | Medium | Done | ||
233 | Number of Digit One | Medium | Done | ||
230 | Kth Smallest Element in a BST | Medium | Done | ||
229 | Majority Element II | Medium | Done | ||
227 | Basic Calculator II | Medium | Done | ||
224 | Basic Calculator | Medium | Done | ||
222 | Count Complete Tree Nodes | Medium | Done | ||
221 | Maximal Square | Medium | Done | ||
220 | Contains Duplicate III | Medium | |||
216 | Combination Sum III | Medium | Done | ||
215 | Kth Largest Element in an Array | Medium | Done | ||
213 | House Robber II | Medium | Done | ||
211 | Add and Search Word - Data structure design | Medium | |||
210 | Course Schedule II | Medium | |||
209 | Minimum Size Subarray Sum | Medium | Done | ||
208 | Implement Trie (Prefix Tree) | Medium | |||
207 | Course Schedule | Medium | |||
201 | Bitwise AND of Numbers Range | Medium | Done | ||
200 | Number of Islands | Medium | DFS | Done | |
199 | Binary Tree Right Side View | Medium | Done | ||
187 | Repeated DNA Sequences | Medium | |||
186 | Reverse Words in a String II | Medium | ---- | ||
179 | Largest Number | Medium | Done | ||
173 | Binary Search Tree Iterator | Medium | |||
167 | Two Sum II - Input array is sorted | Medium | ---- | ||
166 | Fraction to Recurring Decimal | Medium | |||
163 | Missing Ranges | Medium | ---- | ||
162 | Find Peak Element | Medium | Done | ||
161 | One Edit Distance | Medium | ---- | ||
156 | Binary Tree Upside Down | Medium | ---- | ||
153 | Find Minimum in Rotated Sorted Array | Medium | Done | ||
152 | Maximum Product Subarray | Medium | Done | ||
151 | Reverse Words in a String | Medium | Done | ||
150 | Evaluate Reverse Polish Notation | Medium | Done | ||
148 | Sort List | Medium | Done | ||
147 | Insertion Sort List | Medium | Done | ||
144 | Binary Tree Preorder Traversal | Medium | Done | ||
143 | Reorder List | Medium | Done | ||
142 | Linked List Cycle II | Medium | Done | ||
141 | Linked List Cycle | Medium | Done | ||
139 | Word Break | Medium | String | 1d-DP, 2d-substring | Done |
137 | Single Number II | Medium | Done | ||
136 | Single Number | Medium | Done | ||
134 | Gas Station | Medium | Done | ||
133 | Clone Graph | Medium | |||
131 | Palindrome Partitioning | Medium | DFS | Done | |
130 | Surrounded Regions | Medium | Done | ||
129 | Sum Root to Leaf Numbers | Medium | Done | ||
127 | Word Ladder | Medium | |||
122 | Best Time to Buy and Sell Stock II | Medium | Done | ||
121 | Best Time to Buy and Sell Stock | Medium | Done | ||
120 | Triangle | Medium | Done | ||
116 | Populating Next Right Pointers in Each Node | Medium | Done | ||
114 | Flatten Binary Tree to Linked List | Medium | Done | ||
113 | Path Sum II | Medium | Done | ||
109 | Convert Sorted List to Binary Search Tree | Medium | Done | ||
108 | Convert Sorted Array to Binary Search Tree | Medium | Done | ||
106 | Construct Binary Tree from In/Post-order Traversal | Medium | Done | ||
105 | Construct Binary Tree from Pre/In-order Traversal | Medium | Done | ||
103 | Binary Tree Zigzag Level Order Traversal | Medium | |||
98 | Validate Binary Search Tree | Medium | Done | ||
96 | Unique Binary Search Trees | Medium | Done | ||
95 | Unique Binary Search Trees II | Medium | Done | ||
94 | Binary Tree Inorder Traversal | Medium | Done | ||
93 | Restore IP Addresses | Medium | Done | ||
92 | Reverse Linked List II | Medium | Done | ||
91 | Decode Ways | Medium | Done | ||
90 | Subsets II | Medium | Done | ||
89 | Gray Code | Medium | |||
86 | Partition List | Medium | Done | ||
82 | Remove Duplicates from Sorted List II | Medium | Done | ||
81 | Search in Rotated Sorted Array II | Medium | Done | ||
80 | Remove Duplicates from Sorted Array II | Medium | Done | ||
79 | Word Search | Medium | Done | ||
78 | Subsets | Medium | Done | ||
77 | Combinations | Medium | Done | ||
75 | Sort Colors | Medium | Done | ||
74 | Search a 2D Matrix | Medium | Done | ||
73 | Set Matrix Zeroes | Medium | Done | ||
71 | Simplify Path | Medium | Done | ||
69 | Sqrt(x) | Medium | Done | ||
64 | Minimum Path Sum | Medium | Done | ||
63 | Unique Paths II | Medium | Done | ||
62 | Unique Paths | Medium | Done | ||
61 | Rotate List | Medium | Done | ||
60 | Permutation Sequence | Medium | Done | ||
59 | Spiral Matrix II | Medium | Done | ||
55 | Jump Game | Medium | Done | ||
54 | Spiral Matrix | Medium | Done | ||
53 | Maximum Subarray | Medium | Done | ||
50 | Pow(x, n) | Medium | Done | ||
49 | Anagrams | Medium | Done | ||
48 | Rotate Image | Medium | Done | ||
46 | Permutations | Medium | Done | ||
43 | Multiply Strings | Medium | |||
40 | Combination Sum II | Medium | Done | ||
39 | Combination Sum | Medium | Done | ||
35 | Search Insert Position | Medium | Done | ||
34 | Search for a Range | Medium | Done | ||
31 | Next Permutation | Medium | Done | ||
29 | Divide Two Integers | Medium | Done | ||
24 | Swap Nodes in Pairs | Medium | Done | ||
22 | Generate Parentheses | Medium | Done | ||
18 | 4Sum | Medium | |||
17 | Letter Combinations of a Phone Number | Medium | Done | ||
16 | 3Sum Closest | Medium | Done | ||
15 | 3Sum | Medium | Half...... | ||
12 | Integer to Roman | Medium | |||
11 | Container With Most Water | Medium | Done | ||
5 | Longest Palindromic Substring | Medium | String | DP, scan, Manacher | Done |
3 | Longest Substring Without Repeating Characters | Medium | Done | ||
2 | Add Two Numbers | Medium | Done | ||
1 | Two Sum | Medium | Done | ||
Index | Question | Difficulty | Data Structure | Algorithm | Status |
287 | Find the Duplicate Number | Hard | Array -> link list | slow + fast idx | Done |
239 | Sliding Window Maximum | Hard | |||
218 | The Skyline Problem | Hard | Multiset | Done | |
214 | Shortest Palindrome | Hard | String | Manacher, KMP | Done |
212 | Word Search II | Hard | |||
188 | Best Time to Buy and Sell Stock IV | Hard | DP / Stack | Done | |
174 | Dungeon Game | Hard | DP from end | Done | |
164 | Maximum Gap | Hard | Done | ||
159 | Longest Substring with At Most Two Distinct Characters | Hard | ---- | ||
158 | Read N Characters Given Read4 II - Call multiple times | Hard | ---- | ||
154 | Find Minimum in Rotated Sorted Array II | Hard | Done | ||
149 | Max Points on a Line | Hard | |||
146 | LRU Cache | Hard | Done | ||
145 | Binary Tree Postorder Traversal | Hard | |||
140 | Word Break II | Hard | String | DP check --> dfs | Done |
138 | Copy List with Random Pointer | Hard | Done | ||
135 | Candy | Hard | Array | Scan --> & <-- | Done |
132 | Palindrome Partitioning II | Hard | String | 2d-DP + 1d-DP | Done |
128 | Longest Consecutive Sequence | Hard | Hash Set | Done | |
126 | Word Ladder II | Hard | |||
124 | Binary Tree Maximum Path Sum | Hard | Done | ||
123 | Best Time to Buy and Sell Stock III | Hard | D&C | Done | |
117 | Populating Next Right Pointers in Each Node II | Hard | Done | ||
115 | Distinct Subsequences | Hard | Done | ||
99 | Recover Binary Search Tree | Hard | |||
97 | Interleaving String | Hard | |||
87 | Scramble String | Hard | |||
85 | Maximal Rectangle | Hard | Done | ||
84 | Largest Rectangle in Histogram | Hard | Done | ||
76 | Minimum Window Substring | Hard | Shrinking | Done | |
72 | Edit Distance | Hard | Matrix | DP min(L/Up/LU) | Done |
68 | Text Justification | Hard | |||
65 | Valid Number | Hard | Done | ||
57 | Insert Interval | Hard | Done | ||
56 | Merge Intervals | Hard | Done | ||
52 | N-Queens II | Hard | Done | ||
51 | N-Queens | Hard | Done | ||
47 | Permutations II | Hard | Done | ||
45 | Jump Game II | Hard | Done | ||
44 | Wildcard Matching | Hard | String | DP, BackTrack | Done |
42 | Trapping Rain Water | Hard | Done | ||
41 | First Missing Positive | Hard | Done | ||
37 | Sudoku Solver | Hard | Done | ||
33 | Search in Rotated Sorted Array | Hard | Done | ||
32 | Longest Valid Parentheses | Hard | Done | ||
30 | Substring with Concatenation of All Words | Hard | |||
25 | Reverse Nodes in k-Group | Hard | Done | ||
23 | Merge k Sorted Lists | Hard | Done | ||
10 | Regular Expression Matching | Hard | String Stack | DP, Recursive | Done |
4 | Median of Two Sorted Arrays | Hard | Half...... | ||
Coding Questions
Subscribe to:
Posts (Atom)
c++ interview questions
ReplyDeletesalesforce interview questions