| 385 |
1009. Complement of Base 10 Integer |
LeetCode |
385.py |
bitwise, string
|
$$O((\log n)^2)$$ |
| 384 |
1005. Maximize Sum Of Array After K Negations |
LeetCode |
384.py |
greedy, sort
|
$$O(n \log n)$$ |
| 383 |
1002. Find Common Characters |
LeetCode |
383.py |
hash-map, string
|
$$O(n \cdot m)$$ |
| 382 |
999. Available Captures for Rook |
LeetCode |
382.py |
simulation, matrix
|
$$O(1)$$ |
| 381 |
997. Find the Town Judge |
LeetCode |
381.py |
graph, matrix
|
$$O(n + m)$$ |
| 380 |
993. Cousins in Binary Tree |
LeetCode |
380.py |
dfs, tree
|
$$O(n)$$ |
| 379 |
989. Add to Array-Form of Integer |
LeetCode |
379.py |
array, math
|
$$O(n)$$ |
| 378 |
977. Squares of a Sorted Array |
LeetCode |
378.py |
sort |
$$O(n \log n)$$ |
| 377 ⭐ |
976. Largest Perimeter Triangle |
LeetCode |
377.py |
greedy, sort
|
$$O(n \log n)$$ |
| 376 |
965. Univalued Binary Tree |
LeetCode |
376.py |
dfs, tree
|
$$O(n)$$ |
| 375 |
961. N-Repeated Element in Size 2N Array |
LeetCode |
375.py |
hash-map |
$$O(n)$$ |
| 374 |
953. Verifying an Alien Dictionary |
LeetCode |
374.py |
hash-map, string
|
$$O(n \cdot m)$$ |
| 373 |
944. Delete Columns to Make Sorted |
LeetCode |
373.py |
string, array
|
$$O(n \cdot m)$$ |
| 372 ⭐ |
942. DI String Match |
LeetCode |
372.py |
greedy, two-pointers
|
$$O(n)$$ |
| 371 |
941. Valid Mountain Array |
LeetCode |
371.py |
two-pointers, array
|
$$O(n)$$ |
| 370 💜 |
938. Range Sum of BST |
LeetCode |
370.py |
dfs, tree
|
$$O(n)$$ |
| 369 |
933. Number of Recent Calls |
LeetCode |
369.py |
queue |
$$O(n)$$ |
| 368 |
929. Unique Email Addresses |
LeetCode |
368.py |
hash-set, string
|
$$O(n)$$ |
| 367 |
925. Long Pressed Name |
LeetCode |
367.py |
two-pointers, string
|
$$O(n)$$ |
| 366 |
922. Sort Array By Parity II |
LeetCode |
366.py |
two-pointers, array
|
$$O(n)$$ |
| 365 |
917. Reverse Only Letters |
LeetCode |
365.py |
two-pointers, string
|
$$O(n)$$ |
| 364 |
905. Sort Array By Parity |
LeetCode |
364.py |
array, two-pointers
|
$$O(n)$$ |
| 363 ⭐ |
914. X of a Kind in a Deck of Cards |
LeetCode |
363.py |
hash-map, math, gcd
|
$$O(n)$$ |
| 362 💜 |
908. Smallest Range I |
LeetCode |
362.py |
array, math
|
$$O(n)$$ |
| 361 ⭐ |
897. Increasing Order Search Tree |
LeetCode |
361.py |
dfs, tree
|
$$O(n)$$ |
| 360 |
896. Monotonic Array |
LeetCode |
360.py |
array |
$$O(n)$$ |
| 359 |
892. Surface Area of 3D Shapes |
LeetCode |
359.py |
math, geometry
|
$$O(n^2)$$ |
| 358 |
888. Fair Candy Swap |
LeetCode |
358.py |
hash-map |
$$O(n + m)$$ |
| 357 |
884. Uncommon Words from Two Sentences |
LeetCode |
357.py |
hash-map |
$$O(n + m)$$ |
| 356 |
883. Projection Area of 3D Shapes |
LeetCode |
356.py |
array, math
|
$$O(n^2)$$ |
| 355 |
872. Leaf-Similar Trees |
LeetCode |
355.py |
tree, dfs
|
$$O(n + m)$$ |
| 354 |
868. Binary Gap |
LeetCode |
354.py |
bitwise, logic
|
$$O(\log n)$$ |
| 353 |
867. Transpose Matrix |
LeetCode |
353.py |
array |
$$O(m * n)$$ |
| 352 |
860. Lemonade Change |
LeetCode |
352.py |
greedy |
$$O(n)$$ |
| 351 ⭐ |
859. Buddy Strings |
LeetCode |
351.py |
string, hash
|
$$O(n)$$ |
| 350 |
844. Backspace String Compare |
LeetCode |
350.py |
stack, 2-pointers
|
$$O(n)$$ |
| 349 |
836. Rectangle Overlap |
LeetCode |
349.py |
math, geometry
|
$$O(1)$$ |
| 348 |
832. Flipping an Image |
LeetCode |
348.py |
array |
$$O(m*n)$$ |
| 347 |
830. Positions of Large Groups |
LeetCode |
347.py |
2-pointers |
$$O(n)$$ |
| 346 |
824. Goat Latin |
LeetCode |
346.py |
string |
$$O(n)$$ |
| 345 |
821. Shortest Distance to a Character |
LeetCode |
345.py |
2-pointers |
$$O(n)$$ |
| 344 |
819. Most Common Word |
LeetCode |
344.py |
hash, regex
|
$$O(n)$$ |
| 343 |
812. Largest Triangle Area |
LeetCode |
343.py |
geometry |
$$O(n^3)$$ |
| 342 |
806. Number of Lines To Write String |
LeetCode |
342.py |
string |
$$O(n)$$ |
| 341 |
804. Unique Morse Code Words |
LeetCode |
341.py |
hash-set |
$$O(n * m)$$ |
| 340 💜 |
796. Rotate String |
LeetCode |
340.py |
string |
$$O(n)$$ |
| 339 💜 |
783. Minimum Distance Between BST Nodes |
LeetCode |
339.py |
bst |
$$O(n)$$ |
| 338 |
771. Jewels and Stones |
LeetCode |
338.py |
hash |
$$O(n)$$ |
| 337 |
766. Toeplitz Matrix |
LeetCode |
337.py |
matrix |
$$O(m*n)$$ |
| 336 |
762. Prime Number of Set Bits in Binary |
LeetCode |
336.py |
bitwise |
$$O(n)$$ |
| 335 |
748. Shortest Completing Word |
LeetCode |
335.py |
hash |
$$O(m * n)$$ |
| 334 |
747. Largest Number At Least Twice of Others |
LeetCode |
334.py |
array |
$$O(n)$$ |
| 333 |
746. Min Cost Climbing Stairs |
LeetCode |
333.py |
greedy |
$$O(n)$$ |
| 332 |
744. Find Smallest Letter Greater Than Target |
LeetCode |
332.py |
binary-search |
$$O(\log n)$$ |
| 331 |
733. Flood Fill |
LeetCode |
331.py |
bfs |
$$O(n)$$ |
| 330 |
728. Self Dividing Numbers |
LeetCode |
330.py |
array |
$$O(n^2)$$ |
| 329 |
724. Find Pivot Index |
LeetCode |
329.py |
array |
$$O(n)$$ |
| 328 |
717. 1-bit and 2-bit Characters |
LeetCode |
328.py |
heap |
$$O(n)$$ |
| 327 |
709. To Lower Case |
LeetCode |
327.py |
heap |
$$O(n)$$ |
| 326 |
706. Design HashMap |
LeetCode |
326.py |
heap |
$$O(n \log n)$$ |
| 325 |
705. Design HashSet |
LeetCode |
325.py |
heap |
$$O(n \log n)$$ |
| 324 |
704. Binary Search |
LeetCode |
324.py |
binary-search |
$$O(\log n)$$ |
| 323 |
703. Kth Largest Element in a Stream |
LeetCode |
323.py |
heap |
$$O(\log k)$$ |
| 322 |
700. Search in a Binary Search Tree |
LeetCode |
322.py |
tree |
$$O(n)$$ |
| 321 |
697. Degree of an Array |
LeetCode |
321.py |
hash |
$$O(n)$$ |
| 320 |
696. Count Binary Substrings |
LeetCode |
320.py |
array |
$$O(n)$$ |
| 319 |
693. Binary Number with Alternating Bits |
LeetCode |
319.py |
bitwise |
$$O(n)$$ |
| 318 |
682. Baseball Game |
LeetCode |
318.py |
heap |
$$O(n)$$ |
| 317 💜 |
680. Valid Palindrome II |
LeetCode |
317.py |
recursion |
$$O(n^2)$$ |
| 316 |
674. Longest Continuous Increasing Subsequence |
LeetCode |
316.py |
2-pointers |
$$O(n)$$ |
| 315 |
671. Second Minimum Node In a Binary Tree |
LeetCode |
315.py |
dfs, hash
|
$$O(n)$$ |
| 314 |
661. Image Smoother |
LeetCode |
314.py |
array |
$$O(m * n)$$ |
| 313 |
657. Robot Return to Origin |
LeetCode |
313.py |
array |
$$O(n)$$ |
| 312 |
653. Two Sum IV - Input is a BST |
LeetCode |
312.py |
dfs |
$$O(n)$$ |
| 311 |
645. Set Mismatch |
LeetCode |
311.py |
array |
$$O(n)$$ |
| 310 |
643. Maximum Average Subarray I |
LeetCode |
310.py |
array |
$$O(n)$$ |
| 309 💜 |
637. Average of Levels in Binary Tree |
LeetCode |
309.py |
bfs |
$$O(n)$$ |
| 308 |
628. Maximum Product of Three Numbers |
LeetCode |
308.py |
sorting |
$$O(n \log n)$$ |
| 307 |
627. Swap Sex of Employees |
LeetCode |
307.sql |
sql, mysql
|
|
| 306 |
620. Not Boring Movies |
LeetCode |
306.sql |
sql, mysql
|
|
| 305 |
619. Biggest Single Number |
LeetCode |
305.sql |
sql, mysql
|
|
| 304 💜 |
617. Merge Two Binary Trees |
LeetCode |
304.py |
tree |
$$O(n + m)$$ |
| 303 |
610. Triangle Judgement |
LeetCode |
303.sql |
sql, postgresql
|
|
| 302 |
607. Sales Person |
LeetCode |
302.sql |
sql |
|
| 301 💜 |
605. Can Place Flowers |
LeetCode |
301.py |
array |
$$O(n)$$ |
| 300 |
599. Minimum Index Sum of Two Lists |
LeetCode |
300.py |
hash |
$$O(n)$$ |
| 299 |
598. Range Addition II |
LeetCode |
299.py |
array |
$$O(n * m)$$ |
| 298 |
596. Classes With at Least 5 Students |
LeetCode |
298.sql |
sql |
|
| 297 |
595. Big Countries |
LeetCode |
297.sql |
sql |
|
| 296 💜 |
594. Longest Harmonious Subsequence |
LeetCode |
296.py |
2-pointers, sorting
|
$$O(n^2)$$ |
| 295 |
590. N-ary Tree Postorder Traversal |
LeetCode |
295.py |
dfs |
$$O(n)$$ |
| 294 |
589. N-ary Tree Preorder Traversal |
LeetCode |
294.py |
dfs |
$$O(n)$$ |
| 293 |
586. Customer Placing the Largest Number of Orders |
LeetCode |
293.sql |
sql |
|
| 292 |
584. Find Customer Referee |
LeetCode |
292.sql |
sql |
|
| 291 |
577. Employee Bonus |
LeetCode |
291.sql |
sql |
|
| 290 |
575. Distribute Candies |
LeetCode |
290.py |
hash |
$$O(n)$$ |
| 289 ⭐ |
572. Subtree of Another Tree |
LeetCode |
289.py |
tree |
$$O(n^2)$$ |
| 288 💜 |
566. Reshape the Matrix |
LeetCode |
288.py |
array |
$$O(n * m)$$ |
| 287 💜 |
563. Binary Tree Tilt |
LeetCode |
287.py |
tree |
$$O(n)$$ |
| 286 |
561. Array Partition |
LeetCode |
286.py |
sorting |
$$O(n \log n)$$ |
| 285 |
559. Maximum Depth of N-ary Tree |
LeetCode |
285.py |
dfs |
$$O(n)$$ |
| 284 |
557. Reverse Words in a String III |
LeetCode |
284.py |
2-pointers |
$$O(n)$$ |
| 283 |
551. Student Attendance Record I |
LeetCode |
283.py |
array |
$$O(n)$$ |
| 282 ⭐ |
543. Diameter of Binary Tree |
LeetCode |
282.py |
dfs |
$$O(n)$$ |
| 281 |
541. Reverse String II |
LeetCode |
281.py |
string |
$$O(n)$$ |
| 280 |
530. Minimum Absolute Difference in BST |
LeetCode |
280.py |
dfs |
$$O(n)$$ |
| 279 |
521. Longest Uncommon Subsequence I |
LeetCode |
279.py |
string |
$$O(n)$$ |
| 278 |
520. Detect Capital |
LeetCode |
278.py |
string |
$$O(n)$$ |
| 277 |
511. Game Play Analysis I |
LeetCode |
277.sql |
sql |
|
| 276 |
509. Fibonacci Number |
LeetCode |
276.py |
recursion |
$$O(n)$$ |
| 275 |
507. Perfect Number |
LeetCode |
275.py |
math |
$$O(n)$$ |
| 274 |
506. Relative Ranks |
LeetCode |
274.py |
sorting |
$$O(n \log n)$$ |
| 273 |
504. Base 7 |
LeetCode |
273.py |
math |
$$O(n)$$ |
| 272 ⭐ |
501. Find Mode in Binary Search Tree |
LeetCode |
272.py |
dfs |
$$O(n)$$ |
| 271 |
500. Keyboard Row |
LeetCode |
271.py |
array |
$$O(n)$$ |
| 270 ⭐ |
496. Next Greater Element I |
LeetCode |
270.py |
array |
$$O(n + m)$$ |
| 269 |
495. Teemo Attacking |
LeetCode |
269.py |
array |
$$O(n)$$ |
| 268 💜 |
492. Construct the Rectangle |
LeetCode |
268.py |
math |
$$O(n)$$ |
| 267 |
485. Max Consecutive Ones |
LeetCode |
267.py |
2-pointers |
$$O(n)$$ |
| 266 |
482. License Key Formatting |
LeetCode |
266.py |
array |
$$O(n)$$ |
| 265 |
476. Number Complement |
LeetCode |
265.py |
bitwise |
$$O(1)$$ |
| 264 |
463. Island Perimeter |
LeetCode |
264.py |
array |
$$O(n^2)$$ |
| 263 |
461. Hamming Distance |
LeetCode |
263.py |
bitwise |
$$O(1)$$ |
| 262 ⭐ |
459. Repeated Substring Pattern |
LeetCode |
262.py |
array |
$$O(n)$$ |
| 261 |
455. Assign Cookies |
LeetCode |
261.py |
sorting, 2-pointers
|
$$O(n \log n)$$ |
| 260 💜 |
448. Find All Numbers Disappeared in an Array |
LeetCode |
260.py |
array |
$$O(n)$$ |
| 259 💜 |
441. Arranging Coins |
LeetCode |
259.py |
binary-search or math
|
$$O(\log n) \text{ or } O(1)$$ |
| 258 |
434. Number of Segments in a String |
LeetCode |
258.py |
2-pointers |
$$O(n)$$ |
| 257 |
415. Add Strings |
LeetCode |
257.py |
array |
$$O(n)$$ |
| 256 |
414. Third Maximum Number |
LeetCode |
256.py |
sorting |
$$O(n \log n)$$ |
| 255 |
412. Fizz Buzz |
LeetCode |
255.py |
math |
$$O(n)$$ |
| 254 |
409. Longest Palindrome |
LeetCode |
254.py |
array |
$$O(n)$$ |
| 253 |
405. Convert a Number to Hexadecimal |
LeetCode |
253.py |
math |
$$O(n)$$ |
| 252 💜 |
404. Sum of Left Leaves |
LeetCode |
252.py |
tree |
$$O(n)$$ |
| 251 💜 |
401. Binary Watch |
LeetCode |
251.py |
bitwise |
$$O(1)$$ |
| 250 |
392. Is Subsequence |
LeetCode |
250.py |
array |
$$O(n)$$ |
| 249 |
389. Find the Difference |
LeetCode |
249.py |
array |
$$O(n)$$ |
| 248 |
387. First Unique Character in a String |
LeetCode |
248.py |
array |
$$O(n)$$ |
| 247 |
383. Ransom Note |
LeetCode |
247.py |
array |
$$O(n)$$ |
| 246 |
374. Guess Number Higher or Lower |
LeetCode |
246.py |
binary-search |
$$O(\log n)$$ |
| 245 |
367. Valid Perfect Square |
LeetCode |
245.py |
binary-search |
$$O(\log n)$$ |
| 244 |
350. Intersection of Two Arrays II |
LeetCode |
244.py |
sort |
$$O(n)$$ |
| 243 |
349. Intersection of Two Arrays |
LeetCode |
243.py |
array |
$$O(n)$$ |
| 242 |
345. Reverse Vowels of a String |
LeetCode |
242.py |
2-pointers |
$$O(n)$$ |
| 241 |
344. Reverse String |
LeetCode |
241.ts |
string |
$$O(n)$$ |
| 240 💜 |
342. Power of Four |
LeetCode |
240.py |
math, bitwise
|
$$O(1)$$ |
| 239 💜 |
338. Counting Bits |
LeetCode |
239.py |
dp |
$$O(n)$$ |
| 238 |
326. Power of Three |
LeetCode |
238.go |
math |
$$O(n)$$ |
| 237 |
303. Range Sum Query - Immutable |
LeetCode |
237.ts |
array |
$$O(n)$$ |
| 236 ⭐ |
292. Nim Game |
LeetCode |
236.rs |
math, number-theory
|
$$O(1)$$ |
| 235 |
290. Word Pattern |
LeetCode |
235.js |
hash |
$$O(n)$$ |
| 234 💜 |
283. Move Zeroes |
LeetCode |
234.py |
2-pointers |
$$O(n)$$ |
| 233 |
278. First Bad Version |
LeetCode |
233.js |
binary-search |
$$O(\log n)$$ |
| 232 |
268. Missing Number |
LeetCode |
232.py |
math, number-theory
|
$$O(n)$$ |
| 231 |
263. Ugly Number |
LeetCode |
231.py |
math, number-theory
|
$$O(1)$$ |
| 230 ⭐ |
258. Add Digits |
LeetCode |
230.js |
math, number-theory
|
$$O(1)$$ |
| 229 |
257. Binary Tree Paths |
LeetCode |
229.py |
bfs |
$$O(n)$$ |
| 228 ⭐ |
242. Valid Anagram |
LeetCode |
228.py |
sorting |
$$O(n \log n)$$ |
| 227 |
234. Palindrome Linked List |
LeetCode |
227.py |
linked-list |
$$O(n)$$ |
| 226 |
232. Implement Queue using Stacks |
LeetCode |
226.py |
stack |
$$O(n)$$ |
| 225 |
228. Summary Ranges |
LeetCode |
225.py |
array |
$$O(n)$$ |
| 224 |
231. Power of Two |
LeetCode |
224.py |
math |
$$O(1)$$ |
| 223 |
226. Invert Binary Tree |
LeetCode |
223.py |
tree |
$$O(n)$$ |
| 222 |
225. Implement Stack using Queues |
LeetCode |
222.py |
queue |
$$O(n)$$ |
| 221 |
222. Count Complete Tree Nodes |
LeetCode |
221.ts |
tree |
$$O(n)$$ |
| 220 |
219. Contains Duplicate II |
LeetCode |
220.py |
hash-map |
$$O(n)$$ |
| 219 |
217. Contains Duplicate |
LeetCode |
219.py |
sorting |
$$O(n \log n)$$ |
| 218 |
206. Reverse Linked List |
LeetCode |
218.py |
linked-list |
$$O(n)$$ |
| 217 💜 |
205. Isomorphic Strings |
LeetCode |
217.py |
string |
$$O(n)$$ |
| 216 |
203. Remove Linked List Elements |
LeetCode |
216.py |
linked-list |
$$O(n)$$ |
| 215 |
202. Happy Number |
LeetCode |
215.py |
math |
$$O(1)$$ |
| 214 |
197. Rising Temperature |
LeetCode |
214.sql |
sql |
$$O(n)$$ |
| 213 |
196. Delete Duplicate Emails |
LeetCode |
213.sql |
sql |
$$O(n)$$ |
| 212 |
195. Tenth Line |
LeetCode |
212.sh |
shell |
$$O(n)$$ |
| 211 |
193. Valid Phone Numbers |
LeetCode |
211.sh |
shell |
$$O(n)$$ |
| 210 |
191. Number of 1 Bits |
LeetCode |
210.py |
bitwise |
$$O(\log n)$$ |
| 209 💜 |
190. Reverse Bits |
LeetCode |
209.go |
bitwise |
$$O(1)$$ |
| 208 |
183. Customers Who Never Order |
LeetCode |
208.sql |
sql |
$$O(n)$$ |
| 207 |
182. Duplicate Emails |
LeetCode |
207.sql |
sql |
$$O(n)$$ |
| 206 |
181. Employees Earning More Than Their Managers |
LeetCode |
206.sql |
sql |
$$O(n)$$ |
| 205 |
175. Combine Two Tables |
LeetCode |
205.sql |
sql |
$$O(n)$$ |
| 204 💜 |
171. Excel Sheet Column Number |
LeetCode |
204.py |
math |
$$O(n)$$ |
| 203 |
169. Majority Element |
LeetCode |
203.py |
sorting |
$$O(n \log n)$$ |
| 202 💜 |
168. Excel Sheet Column Title |
LeetCode |
202.py |
math |
$$O(\log n)$$ |
| 201 |
160. Intersection of Two Linked Lists |
LeetCode |
201.py |
linked-list |
$$O(n + m)$$ |
| 200 |
145. Binary Tree Postorder Traversal |
LeetCode |
200.go |
tree |
$$O(n)$$ |
| 199 |
144. Binary Tree Preorder Traversal |
LeetCode |
199.py |
tree |
$$O(n)$$ |
| 198 ⭐ |
141. Linked List Cycle |
LeetCode |
198.py |
linked-list |
$$O(n)$$ |
| 197 ⭐ |
136. Single Number |
LeetCode |
197.ts |
bitwise |
$$O(n)$$ |
| 196 |
125. Valid Palindrome |
LeetCode |
196.js |
string |
$$O(n)$$ |
| 195 💜 |
121. Best Time to Buy and Sell Stock |
LeetCode |
195.go |
array |
$$O(n)$$ |
| 194 |
119. Pascal's Triangle II |
LeetCode |
194.py |
array |
$$O(2^n)$$ |
| 193 |
118. Pascal's Triangle |
LeetCode |
193.py |
array |
$$O(2^n)$$ |
| 192 |
112. Path Sum |
LeetCode |
192.py |
tree |
$$O(n)$$ |
| 191 |
111. Minimum Depth of Binary Tree |
LeetCode |
191.py |
tree |
$$O(n)$$ |
| 190 ⭐ |
110. Balanced Binary Tree |
LeetCode |
190.py |
tree |
$$O(n)$$ |
| 189 |
108. Convert Sorted Array to Binary Search Tree |
LeetCode |
189.py |
tree |
$$O(n)$$ |
| 188 |
104. Maximum Depth of Binary Tree |
LeetCode |
188.py |
tree |
$$O(n)$$ |
| 187 |
101. Symmetric Tree |
LeetCode |
187.py |
tree |
$$O(n)$$ |
| 186 |
100. Same Tree |
LeetCode |
186.py |
tree |
$$O(n)$$ |
| 185 |
94. Binary Tree Inorder Traversal |
LeetCode |
185.py |
tree |
$$O(n)$$ |
| 184 |
83. Remove Duplicates from Sorted List |
LeetCode |
184.py |
linked-list |
$$O(n)$$ |
| 183 |
70. Climbing Stairs |
LeetCode |
183.py |
dp |
$$O(n)$$ |
| 182 |
69. Sqrt(x) |
LeetCode |
182.py |
binary-search |
$$O(\log n)$$ |
| 181 |
67. Add Binary |
LeetCode |
181.py |
string |
$$O(n)$$ |
| 180 |
66. Plus One |
LeetCode |
180.py |
array |
$$O(n)$$ |
| 179 |
58. Length of Last Word |
LeetCode |
179.py |
array |
$$O(n)$$ |
| 178 |
28. Find the Index of the First Occurrence in a String |
LeetCode |
178.py |
string |
$$O(n \cdot m)$$ |
| 177 |
27. Remove Element |
LeetCode |
177.py |
2-pointers |
$$O(n)$$ |
| 176 |
26. Remove Duplicates from Sorted Array |
LeetCode |
176.py |
array |
$$O(n)$$ |
| 175 |
2131. Longest Palindrome by Concatenating Two Letter Words |
LeetCode |
175.py |
math |
$$O(n)$$ |
| 174 |
2942. Find Words Containing Character |
LeetCode |
174.py |
math |
$$O(n \cdot max(length(word)))$$ |
| 173 |
3024. Type of Triangle |
LeetCode |
173.py |
math |
$$O(1)$$ |
| 172 |
75. Sort Colors |
LeetCode |
172.py |
array |
$$O(n)$$ |
| 171 |
3335. Total Characters in String After Transformations I |
LeetCode |
171.ts |
array |
$$O(max(n, t))$$ |
| 170 |
2094. Finding 3-Digit Even Numbers |
LeetCode |
170.ts |
array |
$$O(n^3)$$ |
| 169 |
1550. Three Consecutive Odds |
LeetCode |
169.ts |
array |
$$O(n)$$ |
| 168 |
3341. Find Minimum Time to Reach Last Room I |
LeetCode |
168.py |
dijsktra |
$$O(mn \cdot \log{mn})$$ |
| 167 ⭐ |
790. Domino and Tromino Tiling |
LeetCode |
167.py |
dp |
$$O(n)$$ |
| 166 |
1920. Build Array from Permutation |
LeetCode |
166.ts |
logic |
$$O(n)$$ |
| 165 |
1128. Number of Equivalent Domino Pairs |
LeetCode |
165.ts |
logic |
$$O(n)$$ |
| 164 |
1007. Minimum Domino Rotations For Equal Row |
LeetCode |
164.ts |
logic |
$$O(n)$$ |
| 163 |
838. Push Dominoes |
LeetCode |
163.py |
logic |
$$O(n)$$ |
| 162 ⭐ |
2071. Maximum Number of Tasks You Can Assign |
LeetCode |
162.py |
binary-search |
$$O(\max(nlogn, mlogm) + \min(m, n) \cdot \log_{2}{min(m, n)})$$ |
| 161 |
1399. Count Largest Group |
LeetCode |
161.ts |
hash-map |
$$O(n \cdot \log_{10}{n})$$ |
| 160 |
2799. Count Complete Subarrays in an Array |
LeetCode |
160.ts |
sliding-window |
$$O(n)$$ |
| 159 |
2845. Count of Interesting Subarrays |
LeetCode |
159.ts |
prefix-sum |
$$O(n)$$ |
| 158 |
1534. Count Good Triplets |
LeetCode |
158.ts |
logic |
$$O(n^3)$$ |
| 157 |
1295. Find Numbers with Even Number of Digits |
LeetCode |
157.ts |
recursive |
$$O(n \cdot \log_{10}{m})$$ with $m$ is the maximum value in the given array $nums$
|
| 156 ⭐ |
2962. Count Subarrays Where Max Element Appears at Least K Times |
LeetCode |
156.py |
sliding-window |
$$O(n)$$ |
| 155 |
2302. Count Subarrays With Score Less Than K |
LeetCode |
155.py |
sliding-window |
$$O(n)$$ |
| 154 |
3392. Count Subarrays of Length Three With a Condition |
LeetCode |
154.py |
sliding-window |
$$O(n)$$ |
| 153 |
1399. Count Largest Group |
LeetCode |
153.py |
hashmap |
$$O(nlogn)$$ |
| 152 |
38. Count and Say |
LeetCode |
152.py |
backtracking |
$$O(2^n)$$ |
| 151 ⭐ |
1922. Count Good Numbers |
LeetCode |
151.py |
fast-exponentiation |
$$O(logn)$$ |
| 150 |
3396. Minimum Number of Operations to Make Elements in Array Distinct |
LeetCode |
150.java |
logic |
$$O(n)$$ |
| 149 |
2843. Count Symmetric Integers |
LeetCode |
149.py |
logic |
$$O(n)$$ |
| 148 |
416. Partition Equal Subset Sum |
LeetCode |
148.py |
dp |
$$O(n^2)$$ |
| 147 |
368. Largest Divisible Subset |
LeetCode |
147.py |
dp |
$$O(n^2)$$ |
| 146 |
198. House Robber |
LeetCode |
146.py |
dp |
$$O(n)$$ |
| 145 |
1863. Sum of All Subset XOR Totals |
LeetCode |
145.py |
backtracking |
$$O(2^n)$$ |
| 144 |
1123. Lowest Common Ancestor of Deepest Leaves |
LeetCode |
144.py |
dfs, backtracking
|
$$O(n)$$ |
| 143 |
2874. Maximum Value of an Ordered Triplet II |
LeetCode |
143.py |
greedy |
$$O(n)$$ |
| 142 ⭐ |
2140. Solving Questions With Brainpower |
LeetCode |
142.py |
dp |
$$O(n)$$ |
| 141 ⭐ |
763. Partition Labels |
LeetCode |
141.py |
2-pointers |
$$O(n)$$ |
| 140 |
2401. Longest Nice Subarray |
LeetCode |
140.py |
sliding-window |
$$O(n)$$ |
| 139 |
3191. Minimum Operations to Make Binary Array Elements Equal to One I |
LeetCode |
139.py |
sliding-window |
$$O(n)$$ |
| 138 |
3169. Count Days Without Meetings |
LeetCode |
138.py |
sort |
$$O(log(n))$$ |
| 137 |
2780. Minimum Index of a Valid Split |
LeetCode |
137.py |
logic |
$$O(n)$$ |
| 136 |
2033. Minimum Operations to Make a Uni-Value Grid |
LeetCode |
136.py |
sort, math
|
$$O(n \cdot logn)$$ |
| 135 |
2685. Count the Number of Complete Components |
LeetCode |
135.py |
dfs |
$$O(n+mlogn) \text{ and } O(n+m)$$ |
| 134 |
1976. Number of Ways to Arrive at Destination |
LeetCode |
134.py |
dijkstra |
$$O((N + E)log(N))$$ |
| 133 |
2206. Divide Array Into Equal Pairs |
LeetCode |
133.java |
logic |
$$O(max(n, 500))$$ |
| 132 ⭐ |
2594. Minimum Time to Repair Cars |
LeetCode |
132.java |
binary-search |
$$O(n log(n))$$ |
| 131 ⭐ |
2560. House Robber IV |
LeetCode |
131.py |
binary-search |
$$O(n log(n))$$ |
| 130 ⭐ |
3356. Zero Array Transformation II |
LeetCode |
130.py |
binary-search |
$$O(n log(n))$$ |
| 129 |
2226. Maximum Candies Allocated to K Children |
LeetCode |
129.py |
binary-search |
$$O(n log(m))$$ with $m$ is the maximum value in the array $candies$, and $n$ is the length of $candies$
|
| 128 |
88. Merge Sorted Array |
LeetCode |
128.py |
sort |
$$O(log(n))$$ |
| 127 |
3306. Count of Substrings Containing Every Vowel and K Consonants II |
LeetCode |
127.py |
slide-window |
$$O(n)$$ |
| 126 |
2529. Maximum Count of Positive Integer and Negative Integer |
LeetCode |
126.py |
logic |
$$O(n)$$ |
| 125 |
1358. Number of Substrings Containing All Three Characters |
LeetCode |
125.py |
slide-window |
$$O(n)$$ |
| 124 |
3208. Alternating Groups II |
LeetCode |
124.js |
2-pointers |
$$O(n + k)$$ |
| 123 |
876. Middle of the Linked List |
LeetCode |
123.go |
logic |
$$O(n)$$ |
| 122 |
2379. Minimum Recolors to Get K Consecutive Black Blocks |
LeetCode |
122.go |
logic |
$$O(n)$$ |
| 121 |
2523. Closest Prime Numbers in Range |
LeetCode |
121.go |
logic |
$$O(n\cdot log(log(n)))$$ |
| 120 |
2965. Find Missing and Repeated Values |
LeetCode |
120.py |
logic |
$$O(n^2)$$ |
| 119 |
2579. Count Total Number of Colored Cells |
LeetCode |
119.go |
logic |
$$O(n / 2)$$ |
| 118 |
1780. Check if Number is a Sum of Powers of Three |
LeetCode |
118.js |
logic |
$$O(16)$$ |
| 117 |
2161. Partition Array According to Given Pivot |
LeetCode |
117.ts |
logic |
$$O(n)$$ |
| 116 |
2570. Merge Two 2D Arrays by Summing Values |
LeetCode |
116.js |
logic |
$$O(m + n)$$ |
| 115 |
2460. Apply Operations to an Array |
LeetCode |
115.go |
logic |
$$O(n)$$ |
| 114 ⭐ |
1092. Shortest Common Supersequence |
LeetCode |
114.py |
dp |
$$O(n \cdot m)$$ |
| 113 ⭐ |
873. Length of Longest Fibonacci Subsequence |
LeetCode |
113.go |
dp |
$$O(n^2)$$ |
| 112 ⭐ |
1749. Maximum Absolute Sum of Any Subarray |
LeetCode |
112.py |
greedy |
$$O(n)$$ |
| 111 ⭐ |
1524. Number of Sub-arrays With Odd Sum |
LeetCode |
111.py |
dp |
$$O(n)$$ |
| 110 |
35. Search Insert Position |
LeetCode |
110.js |
binary-search |
$$O(log(n))$$ |
| 109 |
21. Merge Two Sorted Lists |
LeetCode |
109.java |
logic |
$$O(n)$$ |
| 108 ⭐ |
2467. Most Profitable Path in a Tree |
LeetCode |
108.py |
dfs |
$$O(n)$$ |
| 107 ⭐ |
889. Construct Binary Tree from Preorder and Postorder Traversal |
LeetCode |
107.py |
bin-tree, back-tracking
|
$$O(n^2)$$ |
| 106 ⭐ |
1028. Recover a Tree From Preorder Traversal |
LeetCode |
106.py |
bin-tree, back-tracking
|
$$O(n)$$ |
| 105 |
3325. Count Substrings With K-Frequency Characters I |
LeetCode |
105.py |
logic |
$$O(n)$$ |
| 104 |
1261. Find Elements in a Contaminated Binary Tree |
LeetCode |
104.py |
back-tracking |
$$O(n)$$ |
| 103 |
1980. Find Unique Binary String |
LeetCode |
103.py |
back-tracking |
$$O(n!)$$ |
| 102 |
1415. The k-th Lexicographical String of All Happy Strings of Length n |
LeetCode |
102.py |
back-tracking, set, sort
|
$$O(n!)$$ |
| 101 |
2375. Construct Smallest Number From DI String |
LeetCode |
101.py |
back-tracking, set
|
$$O(n \cdot n!)$$ |
| 100 |
1079. Letter Tile Possibilities |
LeetCode |
100.py |
back-tracking, set
|
$$O(n \cdot n!)$$ |
| 99 |
1718. Construct the Lexicographically Largest Valid Sequence |
LeetCode |
99.py |
recursive |
|
| 98 |
2698. Find the Punishment Number of an Integer |
LeetCode |
98.py |
recursive |
|
| 97 |
1352. Product of the Last K Numbers |
LeetCode |
97.py |
logic |
|
| 96 |
3066. Minimum Operations to Exceed Threshold Value II |
LeetCode |
96.py |
heap |
|
| 95 |
2342. Max Sum of a Pair With Equal Sum of Digits |
LeetCode |
95.py |
logic |
|
| 94 |
2816. Double a Number Represented as a Linked List |
LeetCode |
94.py |
linked-list |
|
| 93 |
1910. Remove All Occurrences of a Substring |
LeetCode |
93.py |
stack |
|
| 92 |
2739. Total Distance Traveled |
LeetCode |
92.py |
logic |
|
| 91 |
3289. The Two Sneaky Numbers of Digitville |
LeetCode |
91.py |
logic |
|
| 90 |
3174. Clear Digits |
LeetCode |
90.py |
stack |
|
| 89 |
2364. Count Number of Bad Pairs |
LeetCode |
89.py |
logic, math
|
|
| 88 |
2349. Design a Number Container System |
LeetCode |
88.py |
heap |
|
| 87 |
10246 - Asterix and Obelix |
UVA |
87.py |
floy-warshall |
|
| 86 |
10171 - Meeting Prof. Miguel... |
UVA |
86.py |
floy-warshall |
|
| 85 |
278. First Bad Version |
LeetCode |
85.py |
binary-search |
|
| 84 |
ARBITRAG - Arbitrage |
SPOJ |
84.py |
floy-warshall |
|
| 83 |
515. Find Largest Value in Each Tree Row |
LeetCode |
83.py |
sort, binary-tree
|
|
| 82 |
Monk's Business Day |
HackerRank |
82.py |
bellman |
|
| 81 |
UCV2013B - Alice in Amsterdam, I mean Wonderland |
SPOJ |
81.cpp |
bellman |
|
| 80 |
Extended Traffic |
LightOJ |
80.cpp |
bellman |
|
| 79 |
558 - Wormholes |
UVA |
79.py |
bellman |
|
| 78 |
TRAFFICN - Traffic Network |
SPOJ |
78.cpp |
dijkstra |
|
| 77 |
Commandos |
LightOJ |
77.cpp |
dijkstra |
|
| 76 |
10986 - Sending email |
UVA |
76.py |
dijkstra |
|
| 75 |
SHPATH - The Shortest Path |
SPOJ |
75.cpp |
dijkstra |
|
| 74 |
MICEMAZE - Mice and Maze |
SPOJ |
74.py |
dijkstra |
|
| 73 |
TRVCOST - Travelling cost |
SPOJ |
73.py |
dijkstra |
|
| 72 |
3043. Find the Length of the Longest Common Prefix |
LeetCode |
72.py |
trie |
|
| 71 |
3160. Find the Number of Distinct Colors Among the Balls |
LeetCode |
71.py |
queue, dict
|
|
| 70 |
2239. Find Closest Number to Zero |
LeetCode |
70.py |
logic |
|
| 69 |
966. Vowel Spellchecker |
LeetCode |
69.py |
logic |
|
| 68 |
2576. Find the Maximum Number of Marked Indices |
LeetCode |
68.py |
2-pointers, sort
|
|
| 67 |
3. Longest Substring Without Repeating Characters |
LeetCode |
67.py |
2-pointers |
|
| 66 |
4. Median of Two Sorted Arrays |
LeetCode |
66.py |
sort |
|
| 65 |
2. Add Two Numbers |
LeetCode |
65.py |
linked-list |
|
| 64 |
1726. Tuple with Same Product |
LeetCode |
64.py |
sorting, 2-pointers, math
|
|
| 63 |
ALLIZWEL - ALL IZZ WELL |
SPOJ |
63.py |
dfs |
|
| 62 |
Bishu and his Girlfriend |
HackerEarth |
62.cpp |
dfs |
|
| 61 |
Maximum Level Sum of a Binary Tree |
LeetCode |
61.py |
dfs |
|
| 60 |
Minimum Absolute Difference in BST |
LeetCode |
60.py |
dfs |
|
| 59 |
Equal Row and Column Pairs |
LeetCode |
59.py |
hash |
|
| 58 |
Summary Ranges |
LeetCode |
58.py |
logic |
|
| 57 |
Longest Common Prefix |
LeetCode |
57.py |
sort |
|
| 56 |
Roman to Integer |
LeetCode |
56.py |
logic |
|
| 55 |
Palindrome Number |
LeetCode |
55.py |
logic |
|
| 54 |
Best Time to Buy and Sell Stock II |
LeetCode |
54.py |
logic |
|
| 53 |
Ransom Note |
LeetCode |
53.py |
logic |
|
| 52 |
Two Sum |
LeetCode |
52.py |
logic |
|
| 51 |
Roy and Trending Topics |
HackerEarth |
51.py |
heap |
|
| 50 |
Restaurant Rating |
CodeChef |
50.py |
heap |
|
| 49 |
QHEAP1 |
HackerRank |
49.py |
heap |
|
| 48 |
Monk and Multiplication |
HackerEarth |
48.py |
heap |
|
| 47 |
11995 - I Can Guess the Data Structure! |
UVA |
47.py |
heap, stack,queue
|
|
| 46 |
10954 - Add All |
UVA |
46.py |
heap |
|
| 45 |
LASTSHOT - THE LAST SHOT |
SPOJ |
45.go |
dfs |
|
| 44 |
BENEFACT - The Benefactor |
SPOJ |
44.py |
dfs |
|
| 43 |
CAM5 - prayatna PR |
SPOJ |
43.cpp |
dfs |
|
| 42 |
D. Lakes in Berland |
Codeforces |
42.py |
dfs |
|
| 41 |
1610 - Dudu Service Maker |
UVA |
41.py |
dfs |
|
| 40 |
C. Kefa and Park |
Codeforces |
40.py |
bfs |
|
| 39 |
Valid Parentheses |
LeetCode |
39.py |
logic |
|
| 38 |
C. Ice Cave |
Codeforces |
38.py |
bfs |
|
| 37 |
Breadth First Search: Shortest Reach |
HackerRank |
37.py |
bfs |
|
| 36 |
Dhoom 4 |
HackerEarth |
36.py |
bfs |
|
| 35 |
Guilty Prince |
LightOJ |
35.py |
bfs |
|
| 34 |
MAKEMAZE - VALIDATE THE MAZE |
SPOJ |
34.py |
bfs |
|
| 33 |
UCV2013H - Slick |
SPOJ |
33.py |
bfs |
|
| 32 |
10901 - Ferry Loading III |
UVA |
32.cpp |
queue |
|
| 31 |
12207 - That is Your Queue |
UVA |
31.cpp |
queue |
|
| 30 |
10935 - Throwing cards away I |
UVA |
30.cpp |
queue |
|
| 29 |
ONP - Transform the Expression |
SPOJ |
29.cpp |
stack |
|
| 28 |
STPAR - Street Parade |
SPOJ |
28.cpp |
stack |
|
| 27 |
MMASS - Mass of Molecule |
SPOJ |
27.cpp |
stack |
|
| 26 |
Compilers and parsers |
Codechef |
26.cpp |
greedy |
|
| 25 |
B. Sort the Array |
Codeforces |
25.cpp |
sort, logic, 2-pointers
|
|
| 24 |
B. Pasha and Tea |
Codeforces |
24.cpp |
sort, logic
|
|
| 23 |
B. Eight Point Sets |
Codeforces |
23.cpp |
sort, logic
|
|
| 22 |
B. Devu, the Dumb Guy |
Codeforces |
22.cpp |
sort |
|
| 21 |
A. Towers |
Codeforces |
21.cpp |
logic |
|
| 20 |
A. GukiZ and Contest |
Codeforces |
20.cpp |
sort |
|
| 19 |
A. Chores |
Codeforces |
19.cpp |
sort |
|
| 18 |
A. Business trip |
Codeforces |
18.cpp |
sort |
|
| 17 |
C. Alice, Bob and Chocolate |
Codeforces |
17.cpp |
2-pointers |
|
| 16 |
B. George and Round |
Codeforces |
16.cpp |
2-pointers |
|
| 15 |
B. Books |
Codeforces |
15.cpp |
2-pointers |
|
| 14 |
B. Balls Game |
Codeforces |
14.cpp |
2-pointers |
|
| 13 |
B. Array |
Codeforces |
13.cpp |
2-pointers |
|
| 12 |
B. Approximating a Constant Range |
Codeforces |
12.cpp |
2-pointers |
|
| 11 |
A. Sereja and Dima |
Codeforces |
11.cpp |
logic |
|
| 10 |
A. Dress'em in Vests! |
Codeforces |
10.cpp |
logic |
|
| 9 |
B. Passwords |
Codeforces |
9.cpp |
math |
|
| 8 |
B. Big Segment |
Codeforces |
8.cpp |
logic |
|
| 7 |
B. African Crossword |
Codeforces |
7.cpp |
logic |
|
| 6 |
A. Vitaly and Strings |
Codeforces |
6.cpp |
logic |
|
| 5 |
A. Arrays |
Codeforces |
5.cpp |
sort |
|
| 4 |
A. Bear and Game |
Codeforces |
4.cpp |
logic |
|
| 3 |
A. Night at the Museum |
Codeforces |
3.cpp |
logic |
|
| 2 |
A. Fashion in Berland |
Codeforces |
2.cpp |
logic |
|
| 1 |
A. Numbers |
Codeforces |
1.cpp |
math |
|