├── .gitignore ├── 0001-0100 ├── 001. Two Sum.pdf ├── 002. Add Two Numbers.txt ├── 003. Longest Substring Without Repeating Characters.txt ├── 004. Median of Two Sorted Arrays.pdf ├── 005. Longest Palindromic Substring.txt ├── 006. ZigZag Conversion.trivial ├── 007. Reverse Integer.pdf ├── 008. String to Integer (atoi).trivial ├── 009. Palindrome Number.txt ├── 010. Regular Expression Matching.pdf ├── 011. Container With Most Water.txt ├── 012. Integer to Roman.trivial ├── 013. Roman to Integer.trivial ├── 014. Longest Common Prefix.txt ├── 015. 3Sum.pdf ├── 016. 3Sum Closest.pdf ├── 017. Letter Combinations of a Phone Number.txt ├── 018. 4Sum.pdf ├── 019. Remove Nth Node From End of List.txt ├── 020. Valid Parentheses.txt ├── 021. Merge Two Sorted Lists.pdf ├── 022. Generate Parentheses.txt ├── 023. Merge k Sorted Lists.pdf ├── 024. Swap Nodes in Pairs.trivial ├── 025. Reverse Nodes in k-Group.txt ├── 026. Remove Duplicates from Sorted Array.txt ├── 027. Remove Element.trivial ├── 028. Implement strStr().txt ├── 029. Divide Two Integers.txt ├── 030. Substring with Concatenation of All Words.txt ├── 031. Next Permutation.txt ├── 032. Longest Valid Parentheses.txt ├── 033. Search in Rotated Sorted Array.txt ├── 034. Find First and Last Position of Element in Sorted Array.txt ├── 035. Search Insert Position.txt ├── 036. Valid Sudoku.trivial ├── 037. Sudoku Solver.txt ├── 038. Count and Say.txt ├── 039. Combination Sum.txt ├── 040. Combination Sum II.txt ├── 041. First Missing Positive.txt ├── 042. Trapping Rain Water.txt ├── 043. Multiply Strings.txt ├── 044. Wildcard Matching.txt ├── 045. Jump Game II.txt ├── 046. Permutations.trivial ├── 047. Permutations II.trivial ├── 048. Rotate Image.trivial ├── 049. Group Anagrams.txt ├── 050. Pow(x, n).txt ├── 051. N-Queens.txt ├── 052. N-Queens II.txt ├── 053. Maximum Subarray.txt ├── 054. Spiral Matrix.trivial ├── 055. Jump Game.txt ├── 056. Merge Intervals.txt ├── 057. Insert Interval.txt ├── 058. Length of Last Word.trivial ├── 059. Spiral Matrix II.trivial ├── 060. Permutation Sequence.txt ├── 061. Rotate List.trivial ├── 062. Unique Paths.txt ├── 063. Unique Paths II.txt ├── 064. Minimum Path Sum.txt ├── 065. Valid Number.txt ├── 066. Plus One.txt ├── 067. Add Binary.txt ├── 068. Text Justification.txt ├── 069. Sqrt(x).txt ├── 070. Climbing Stairs.txt ├── 071. Simplify Path.txt ├── 072. Edit Distance.pdf ├── 073. Set Matrix Zeroes.txt ├── 074. Search a 2D Matrix.txt ├── 075. Sort Colors.txt ├── 076. Minimum Window Substring.txt ├── 077. Combinations.txt ├── 078. Subsets.txt ├── 079. Word Search.txt ├── 080. Remove Duplicates from Sorted Array II.txt ├── 081. Search in Rotated Sorted Array II.txt ├── 082. Remove Duplicates from Sorted List II.txt ├── 083. Remove Duplicates from Sorted List.trivial ├── 084. Largest Rectangle in Histogram.txt ├── 085. Maximal Rectangle.txt ├── 086. Partition List.txt ├── 087. Scramble String.pdf ├── 088. Merge Sorted Array.txt ├── 089. Gray Code.txt ├── 090. Subsets II.txt ├── 091. Decode Ways.txt ├── 092. Reverse Linked List II.trivial ├── 093. Restore IP Addresses.trivial ├── 094. Binary Tree Inorder Traversal.txt ├── 095. Unique Binary Search Trees II.txt ├── 096. Unique Binary Search Trees.txt ├── 097. Interleaving String.pdf ├── 098. Validate Binary Search Tree.txt ├── 099. Recover Binary Search Tree.txt ├── 1. Two Sum_define_hack.cpp └── 100. Same Tree.txt ├── 0101-0200 ├── 101. Symmetric Tree.txt ├── 102. Binary Tree Level Order Traversal.txt ├── 103. Binary Tree Zigzag Level Order Traversal.txt ├── 104. Maximum Depth of Binary Tree.txt ├── 105. Construct Binary Tree from Preorder and Inorder Traversal.txt ├── 106. Construct Binary Tree from Inorder and Postorder Traversal.txt ├── 107. Binary Tree Level Order Traversal II.txt ├── 108. Convert Sorted Array to Binary Search Tree.txt ├── 109. Convert Sorted List to Binary Search Tree.txt ├── 110. Balanced Binary Tree.txt ├── 111. Minimum Depth of Binary Tree.txt ├── 112. Path Sum.txt ├── 113. Path Sum II.txt ├── 114. Flatten Binary Tree to Linked List.txt ├── 115. Distinct Subsequences.txt ├── 116. Populating Next Right Pointers in Each Node.pdf ├── 117. Populating Next Right Pointers in Each Node II.txt ├── 118. Pascal's Triangle.txt ├── 119. Pascal's Triangle II.txt ├── 120. Triangle.txt ├── 121. Best Time to Buy and Sell Stock.txt ├── 122. Best Time to Buy and Sell Stock II.txt ├── 123. Best Time to Buy and Sell Stock III.txt ├── 124. Binary Tree Maximum Path Sum.txt ├── 125. Valid Palindrome.trivial ├── 126. Word Ladder II.txt ├── 127. Word Ladder 16ms.cpp ├── 127. Word Ladder.pdf ├── 128. Longest Consecutive Sequence.txt ├── 129. Sum Root to Leaf Numbers.trivial ├── 130. Surrounded Regions.txt ├── 131. Palindrome Partitioning.txt ├── 132. Palindrome Partitioning II.pdf ├── 133. Clone Graph.txt ├── 134. Gas Station.txt ├── 135. Candy.txt ├── 136. Single Number.txt ├── 137. Single Number II.txt ├── 138. Copy List with Random Pointer.txt ├── 139. Word Break.pdf ├── 140. Word Break II.txt ├── 141. Linked List Cycle.txt ├── 142. Linked List Cycle II.txt ├── 143. Reorder List.txt ├── 144. Binary Tree Preorder Traversal.txt ├── 145. Binary Tree Postorder Traversal.txt ├── 146. LRU Cache.txt ├── 147. Insertion Sort List 16ms.cpp ├── 147. Insertion Sort List.txt ├── 148. Sort List.txt ├── 149. Max Points on a Line.pdf ├── 150. Evaluate Reverse Polish Notation.txt ├── 151. Reverse Words in a String.trivial ├── 152. Maximum Product Subarray.txt ├── 153. Find Minimum in Rotated Sorted Array.txt ├── 154. Find Minimum in Rotated Sorted Array II.txt ├── 155. Min Stack.txt ├── 156. Binary Tree Upside Down.trivial ├── 157. Read N Characters Given Read4.trivial ├── 158. Read N Characters Given Read4 II - Call multiple times.trivial ├── 159. Longest Substring with At Most Two Distinct Characters.txt ├── 160. Intersection of Two Linked Lists.txt ├── 161. One Edit Distance.txt ├── 162. Find Peak Element.txt ├── 163. Missing Ranges.txt ├── 164. Maximum Gap 122ms.cpp ├── 164. Maximum Gap.pdf ├── 165. Compare Version Numbers.trivial ├── 166. Fraction to Recurring Decimal.txt ├── 167. Two Sum II - Input array is sorted.txt ├── 168. Excel Sheet Column Title.trivial ├── 169. Majority Element.txt ├── 170. Two Sum III - Data structure design 120ms.cpp ├── 170. Two Sum III - Data structure design 24ms.cpp ├── 170. Two Sum III - Data structure design.pdf ├── 171. Excel Sheet Column Number.trivial ├── 172. Factorial Trailing Zeroes.txt ├── 173. Binary Search Tree Iterator.trivial ├── 174. Dungeon Game.txt ├── 179. Largest Number.txt ├── 186. Reverse Words in a String II.trivial ├── 187. Repeated DNA Sequences.txt ├── 188. Best Time to Buy and Sell Stock IV.pdf ├── 189. Rotate Array.txt ├── 190. Reverse Bits.txt ├── 191. Number of 1 Bits 4ms.cpp ├── 191. Number of 1 Bits.txt ├── 198. House Robber.txt ├── 199. Binary Tree Right Side View.txt └── 200. Number of Islands.txt ├── 0201-0300 ├── 201. Bitwise AND of Numbers Range.txt ├── 202. Happy Number.txt ├── 203. Remove Linked List Elements.trivial ├── 204. Count Primes 3ms.cpp ├── 204. Count Primes.pdf ├── 205. Isomorphic Strings.trivial ├── 206. Reverse Linked List.txt ├── 207. Course Schedule.txt ├── 208. Implement Trie (Prefix Tree).txt ├── 209. Minimum Size Subarray Sum.txt ├── 210. Course Schedule II.txt ├── 211. Add and Search Word - Data structure design.pdf ├── 211. Design Add and Search Words Data Structure 40ms.cpp ├── 212. Word Search II.txt ├── 213. House Robber II.txt ├── 214. Shortest Palindrome.txt ├── 215. Kth Largest Element in an Array.txt ├── 216. Combination Sum III.txt ├── 217. Contains Duplicate.pdf ├── 218. The Skyline Problem.txt ├── 219. Contains Duplicate II.txt ├── 220. Contains Duplicate III.txt ├── 221. Maximal Square.txt ├── 222. Count Complete Tree Nodes.txt ├── 223. Rectangle Area.txt ├── 224. Basic Calculator.txt ├── 225. Implement Stack using Queues.txt ├── 226. Invert Binary Tree 36ms.py ├── 226. Invert Binary Tree.txt ├── 227. Basic Calculator II.txt ├── 228. Summary Ranges.txt ├── 229. Majority Element II.pdf ├── 230. Kth Smallest Element in a BST.txt ├── 231. Power of Two.txt ├── 232. Implement Queue using Stacks.txt ├── 233. Number of Digit One.txt ├── 234. Palindrome Linked List.pdf ├── 235. Lowest Common Ancestor of a Binary Search Tree.txt ├── 236. Lowest Common Ancestor of a Binary Tree.txt ├── 237. Delete Node in a Linked List.trivial ├── 238. Product of Array Except Self.txt ├── 239. Sliding Window Maximum.txt ├── 240. Search a 2D Matrix II.pdf ├── 240. Search a 2D Matrix II.txt ├── 241. Different Ways to Add Parentheses.txt ├── 242. Valid Anagram.txt ├── 243. Shortest Word Distance.trivial ├── 244. Shortest Word Distance II.txt ├── 245. Shortest Word Distance III.txt ├── 246. Strobogrammatic Number.txt ├── 247. Strobogrammatic Number II.txt ├── 248. Strobogrammatic Number III.txt ├── 249. Group Shifted Strings.txt ├── 250. Count Univalue Subtrees.txt ├── 251. Flatten 2D Vector.txt ├── 252. Meeting Rooms.txt ├── 253. Meeting Rooms II.txt ├── 254. Factor Combinations.txt ├── 255. Verify Preorder Sequence in Binary Search Tree.txt ├── 256. Paint House.txt ├── 257. Binary Tree Paths.trivial ├── 258. Add Digits.txt ├── 259. 3Sum Smaller.txt ├── 260. Single Number III.txt ├── 261. Graph Valid Tree.txt ├── 263. Ugly Number.txt ├── 264. Ugly Number II.pdf ├── 265. Paint House II.txt ├── 266. Palindrome Permutation.txt ├── 267. Palindrome Permutation II.txt ├── 268. Missing Number.txt ├── 269. Alien Dictionary.txt ├── 270. Closest Binary Search Tree Value.txt ├── 271. Encode and Decode Strings.txt ├── 272. Closest Binary Search Tree Value II.txt ├── 273. Integer to English Words.txt ├── 274. H-Index.txt ├── 275. H-Index II.txt ├── 276. Paint Fence.txt ├── 277. Find the Celebrity.txt ├── 278. First Bad Version 0ms_hack.cpp ├── 278. First Bad Version.txt ├── 279. Perfect Squares.pdf ├── 280. Wiggle Sort.txt ├── 281. Zigzag Iterator.trivial ├── 282. Expression Add Operators.pdf ├── 283. Move Zeroes.trivial ├── 284. Peeking Iterator.trivial ├── 285. Inorder Successor in BST.txt ├── 286. Walls and Gates.txt ├── 287. Find the Duplicate Number.txt ├── 288. Unique Word Abbreviation.txt ├── 289. Game of Life.txt ├── 290. Word Pattern.txt ├── 291. Word Pattern II.pdf ├── 292. Nim Game.txt ├── 293. Flip Game.trivial ├── 294. Flip Game II 0ms.cpp ├── 294. Flip Game II 0ms_O(n).cpp ├── 294. Flip Game II.txt ├── 295. Find Median from Data Stream.txt ├── 296. Best Meeting Point.txt ├── 297. Serialize and Deserialize Binary Tree 155ms.py ├── 297. Serialize and Deserialize Binary Tree.txt ├── 298. Binary Tree Longest Consecutive Sequence.txt ├── 299. Bulls and Cows.trivial └── 300. Longest Increasing Subsequence.pdf ├── 0301-0400 ├── 301. Remove Invalid Parentheses.txt ├── 302. Smallest Rectangle Enclosing Black Pixels.txt ├── 303. Range Sum Query - Immutable.txt ├── 304. Range Sum Query 2D - Immutable.txt ├── 305. Number of Islands II 128ms.cpp ├── 305. Number of Islands II.pdf ├── 306. Additive Number.pdf ├── 307. Range Sum Query - Mutable 0ms_hack.cpp ├── 307. Range Sum Query - Mutable 20ms.cpp ├── 307. Range Sum Query - Mutable.pdf ├── 308. Range Sum Query 2D - Mutable.pdf ├── 309. Best Time to Buy and Sell Stock with Cooldown.txt ├── 310. Minimum Height Trees.txt ├── 311. Sparse Matrix Multiplication.pdf ├── 312. Burst Balloons.txt ├── 313. Super Ugly Number.txt ├── 314. Binary Tree Vertical Order Traversal.txt ├── 315. Count of Smaller Numbers After Self.pdf ├── 316. Remove Duplicate Letters.txt ├── 317. Shortest Distance from All Buildings.txt ├── 318. Maximum Product of Word Lengths 20ms.cpp ├── 318. Maximum Product of Word Lengths 292ms_threads.cpp ├── 318. Maximum Product of Word Lengths.pdf ├── 319. Bulb Switcher.txt ├── 320. Generalized Abbreviation.txt ├── 322. Coin Change 88ms.cpp ├── 322. Coin Change.pdf ├── 323. Number of Connected Components in an Undirected Graph.txt ├── 324. Wiggle Sort II.txt ├── 325. Maximum Size Subarray Sum Equals k 12ms.cpp ├── 325. Maximum Size Subarray Sum Equals k.pdf ├── 326. Power of Three.txt ├── 327. Count of Range Sum.txt ├── 328. Odd Even Linked List.trivial ├── 329. Longest Increasing Path in a Matrix.txt ├── 330. Patching Array.txt ├── 331. Verify Preorder Serialization of a Binary Tree.trivial ├── 332. Reconstruct Itinerary.txt ├── 333. Largest BST Subtree.txt ├── 334. Increasing Triplet Subsequence.txt ├── 335. Self Crossing.txt ├── 336. Palindrome Pairs.txt ├── 337. House Robber III.txt ├── 338. Counting Bits 0ms_hack.cpp ├── 338. Counting Bits 60ms.cpp ├── 338. Counting Bits.txt ├── 339. Nested List Weight Sum.txt ├── 340. Longest Substring with At Most K Distinct Characters.txt ├── 341. Flatten Nested List Iterator.txt ├── 342. Power of Four.txt ├── 343. Integer Break.txt ├── 344. Reverse String.txt ├── 345. Reverse Vowels of a String.txt ├── 346. Moving Average from Data Stream.txt ├── 347. Top K Frequent Elements.txt ├── 348. Design Tic-Tac-Toe.trivial ├── 349. Intersection of Two Arrays.txt ├── 350. Intersection of Two Arrays II.txt ├── 351. Android Unlock Patterns.txt ├── 352. Data Stream as Disjoint Intervals.txt ├── 353. Design Snake Game.txt ├── 354. Russian Doll Envelopes.pdf ├── 355. Design Twitter.txt ├── 356. Line Reflection.txt ├── 357. Count Numbers with Unique Digits.txt ├── 358. Rearrange String k Distance Apart.txt ├── 359. Logger Rate Limiter.txt ├── 360. Sort Transformed Array.txt ├── 361. Bomb Enemy.txt ├── 362. Design Hit Counter.txt ├── 363. Max Sum of Rectangle No Larger Than K 8ms.cpp ├── 363. Max Sum of Rectangle No Larger Than K.pdf ├── 364. Nested List Weight Sum II.txt ├── 365. Water and Jug Problem.txt ├── 366. Find Leaves of Binary Tree.txt ├── 367. Valid Perfect Square.txt ├── 368. Largest Divisible Subset.pdf ├── 369. Plus One Linked List.trivial ├── 370. Range Addition.txt ├── 371. Sum of Two Integers 4ms.cpp ├── 371. Sum of Two Integers.pdf ├── 372. Super Pow.txt ├── 373. Find K Pairs with Smallest Sums 44ms.cpp ├── 373. Find K Pairs with Smallest Sums.pdf ├── 374. Guess Number Higher or Lower.txt ├── 375. Guess Number Higher or Lower II.txt ├── 376. Wiggle Subsequence.txt ├── 377. Combination Sum IV.pdf ├── 378. Kth Smallest Element in a Sorted Matrix 27ms.cpp ├── 378. Kth Smallest Element in a Sorted Matrix.pdf ├── 379. Design Phone Directory.txt ├── 380. Insert Delete GetRandom O(1).txt ├── 381. Insert Delete GetRandom O(1) - Duplicates allowed.txt ├── 382. Linked List Random Node.txt ├── 383. Ransom Note.trivial ├── 384. Shuffle an Array.txt ├── 385. Mini Parser.txt ├── 386. Lexicographical Numbers.txt ├── 387. First Unique Character in a String.trivial ├── 388. Longest Absolute File Path.txt ├── 389. Find the Difference.txt ├── 390. Elimination Game.txt ├── 391. Perfect Rectangle 44ms.cpp ├── 391. Perfect Rectangle.pdf ├── 392. Is Subsequence.txt ├── 393. UTF-8 Validation.txt ├── 394. Decode String.txt ├── 395. Longest Substring with At Least K Repeating Characters.pdf ├── 396. Rotate Function.txt ├── 397. Integer Replacement.txt ├── 398. Random Pick Index.txt ├── 399. Evaluate Division.txt └── 400. Nth Digit.txt ├── 0401-0500 ├── 401. Binary Watch.trivial ├── 402. Remove K Digits.txt ├── 403. Frog Jump.txt ├── 404. Sum of Left Leaves.trivial ├── 405. Convert a Number to Hexadecimal.trivial ├── 406. Queue Reconstruction by Height 28ms.cpp ├── 406. Queue Reconstruction by Height.pdf ├── 407. Trapping Rain Water II.pdf ├── 408. Valid Word Abbreviation.trivial ├── 409. Longest Palindrome.trivial ├── 410. Split Array Largest Sum.pdf ├── 411. Minimum Unique Word Abbreviation.txt ├── 412. Fizz Buzz.trivial ├── 413. Arithmetic Slices.txt ├── 414. Third Maximum Number.txt ├── 415. Add Strings.txt ├── 416. Partition Equal Subset Sum.txt ├── 417. Pacific Atlantic Water Flow.txt ├── 418. Sentence Screen Fitting.txt ├── 419. Battleships in a Board.txt ├── 420. Strong Password Checker.txt ├── 421. Maximum XOR of Two Numbers in an Array 12ms.cpp ├── 421. Maximum XOR of Two Numbers in an Array.pdf ├── 422. Valid Word Square.trivial ├── 423. Reconstruct Original Digits from English.txt ├── 424. Longest Repeating Character Replacement.txt ├── 425. Word Squares.txt ├── 426. Convert Binary Search Tree to Sorted Doubly Linked List.txt ├── 427. Construct Quad Tree.txt ├── 428. Serialize and Deserialize N-ary Tree.txt ├── 429. N-ary Tree Level Order Traversal.txt ├── 430. Flatten a Multilevel Doubly Linked List.txt ├── 431. Encode N-ary Tree to Binary Tree.txt ├── 432. All O`one Data Structure.txt ├── 433. Minimum Genetic Mutation.txt ├── 434. Number of Segments in a String.trivial ├── 435. Non-overlapping Intervals.txt ├── 436. Find Right Interval.txt ├── 437. Path Sum III.txt ├── 438. Find All Anagrams in a String.txt ├── 439. Ternary Expression Parser.txt ├── 440. K-th Smallest in Lexicographical Order.txt ├── 441. Arranging Coins.txt ├── 442. Find All Duplicates in an Array.txt ├── 443. String Compression.trivial ├── 444. Sequence Reconstruction.txt ├── 445. Add Two Numbers II.txt ├── 446. Arithmetic Slices II - Subsequence.txt ├── 447. Number of Boomerangs.txt ├── 448. Find All Numbers Disappeared in an Array.txt ├── 449. Serialize and Deserialize BST.txt ├── 450. Delete Node in a BST.txt ├── 451. Sort Characters By Frequency.txt ├── 452. Minimum Number of Arrows to Burst Balloons.txt ├── 453. Minimum Moves to Equal Array Elements.txt ├── 454. 4Sum II.txt ├── 455. Assign Cookies.txt ├── 456. 132 Pattern.txt ├── 457. Circular Array Loop.txt ├── 458. Poor Pigs.txt ├── 459. Repeated Substring Pattern.txt ├── 460. LFU Cache.txt ├── 461. Hamming Distance.txt ├── 462. Minimum Moves to Equal Array Elements II.txt ├── 463. Island Perimeter.txt ├── 464. Can I Win.txt ├── 465. Optimal Account Balancing.pdf ├── 466. Count The Repetitions.txt ├── 467. Unique Substrings in Wraparound String.txt ├── 468. Validate IP Address.txt ├── 469. Convex Polygon.txt ├── 470. Implement Rand10() Using Rand7().txt ├── 471. Encode String with Shortest Length.txt ├── 472. Concatenated Words 88ms.cpp ├── 472. Concatenated Words.pdf ├── 473. Matchsticks to Square.txt ├── 474. Ones and Zeroes.txt ├── 475. Heaters.txt ├── 476. Number Complement.txt ├── 477. Total Hamming Distance 12ms.cpp ├── 477. Total Hamming Distance.pdf ├── 478. Generate Random Point in a Circle.txt ├── 479. Largest Palindrome Product.txt ├── 480. Sliding Window Median.txt ├── 481. Magical String.txt ├── 482. License Key Formatting.trivial ├── 483. Smallest Good Base.pdf ├── 484. Find Permutation.txt ├── 485. Max Consecutive Ones.trivial ├── 486. Predict the Winner.pdf ├── 487. Max Consecutive Ones II.txt ├── 488. Zuma Game.txt ├── 489. Robot Room Cleaner.txt ├── 490. The Maze.txt ├── 491. Increasing Subsequences.txt ├── 492. Construct the Rectangle.pdf ├── 493. Reverse Pairs.txt ├── 494. Target Sum.pdf ├── 495. Teemo Attacking.txt ├── 496. Next Greater Element I.txt ├── 497. Random Point in Non-overlapping Rectangles 130ms.cpp ├── 497. Random Point in Non-overlapping Rectangles.txt ├── 498. Diagonal Traverse.trivial ├── 499. The Maze III.txt └── 500. Keyboard Row.trivial ├── 0501-0600 ├── 501. Find Mode in Binary Search Tree.txt ├── 502. IPO.pdf ├── 503. Next Greater Element II.txt ├── 504. Base 7.trivial ├── 505. The Maze II.txt ├── 506. Relative Ranks.trivial ├── 507. Perfect Number.txt ├── 508. Most Frequent Subtree Sum.txt ├── 509. Fibonacci Number.txt ├── 510. Inorder Successor in BST II.txt ├── 513. Find Bottom Left Tree Value.trivial ├── 514. Freedom Trail.txt ├── 515. Find Largest Value in Each Tree Row.txt ├── 516. Longest Palindromic Subsequence 8ms.cpp ├── 516. Longest Palindromic Subsequence.pdf ├── 517. Super Washing Machines.txt ├── 518. Coin Change 2.txt ├── 519. Random Flip Matrix.txt ├── 520. Detect Capital.trivial ├── 521. Longest Uncommon Subsequence I.txt ├── 522. Longest Uncommon Subsequence II.txt ├── 523. Continuous Subarray Sum.txt ├── 524. Longest Word in Dictionary through Deleting 16ms.cpp ├── 524. Longest Word in Dictionary through Deleting.pdf ├── 525. Contiguous Array.txt ├── 526. Beautiful Arrangement.txt ├── 527. Word Abbreviation 32ms.cpp ├── 527. Word Abbreviation.pdf ├── 528. Random Pick with Weight.pdf ├── 529. Minesweeper.txt ├── 530. Minimum Absolute Difference in BST.txt ├── 531. Lonely Pixel I.txt ├── 532. K-diff Pairs in an Array.txt ├── 533. Lonely Pixel II.txt ├── 535. Encode and Decode TinyURL.txt ├── 536. Construct Binary Tree from String.txt ├── 537. Complex Number Multiplication.trivial ├── 538. Convert BST to Greater Tree.txt ├── 539. Minimum Time Difference.txt ├── 540. Single Element in a Sorted Array.txt ├── 541. Reverse String II.trivial ├── 542. 01 Matrix.txt ├── 543. Diameter of Binary Tree.txt ├── 544. Output Contest Matches.txt ├── 545. Boundary of Binary Tree.txt ├── 546. Remove Boxes 12ms.cpp ├── 546. Remove Boxes.pdf ├── 547. Friend Circles.txt ├── 548. Split Array with Equal Sum 8ms.cpp ├── 548. Split Array with Equal Sum.pdf ├── 549. Binary Tree Longest Consecutive Sequence II.txt ├── 551. Student Attendance Record I.trivial ├── 552. Student Attendance Record II.txt ├── 553. Optimal Division.txt ├── 554. Brick Wall.txt ├── 555. Split Concatenated Strings 24ms.cpp ├── 555. Split Concatenated Strings.pdf ├── 556. Next Greater Element III.txt ├── 557. Reverse Words in a String III.trivial ├── 558. Quad Tree Intersection.txt ├── 559. Maximum Depth of N-ary Tree.txt ├── 560. Subarray Sum Equals K.txt ├── 561. Array Partition I.txt ├── 562. Longest Line of Consecutive One in Matrix.txt ├── 563. Binary Tree Tilt.txt ├── 564. Find the Closest Palindrome.txt ├── 565. Array Nesting.txt ├── 566. Reshape the Matrix.trivial ├── 567. Permutation in String.txt ├── 568. Maximum Vacation Days.txt ├── 572. Subtree of Another Tree 421ms.py ├── 572. Subtree of Another Tree.txt ├── 573. Squirrel Simulation.txt ├── 575. Distribute Candies.txt ├── 576. Out of Boundary Paths.txt ├── 581. Shortest Unsorted Continuous Subarray.txt ├── 582. Kill Process.txt ├── 583. Delete Operation for Two Strings 24ms.cpp ├── 583. Delete Operation for Two Strings.txt ├── 587. Erect the Fence.txt ├── 588. Design In-Memory File System.txt ├── 589. N-ary Tree Preorder Traversal.trivial ├── 590. N-ary Tree Postorder Traversal.trivial ├── 591. Tag Validator.txt ├── 592. Fraction Addition and Subtraction.trivial ├── 593. Valid Square.trivial ├── 594. Longest Harmonious Subsequence.txt ├── 598. Range Addition II.txt ├── 599. Minimum Index Sum of Two Lists.txt └── 600. Non-negative Integers without Consecutive Ones.txt ├── 0601-0700 ├── 604. Design Compressed String Iterator.trivial ├── 605. Can Place Flowers.txt ├── 606. Construct String from Binary Tree.trivial ├── 609. Find Duplicate File in System.txt ├── 611. Valid Triangle Number 36ms.cpp ├── 611. Valid Triangle Number.txt ├── 616. Add Bold Tag in String.txt ├── 617. Merge Two Binary Trees.txt ├── 621. Task Scheduler.txt ├── 622. Design Circular Queue.txt ├── 623. Add One Row to Tree.trivial ├── 624. Maximum Distance in Arrays.txt ├── 625. Minimum Factorization.txt ├── 628. Maximum Product of Three Numbers.txt ├── 629. K Inverse Pairs Array.pdf ├── 630. Course Schedule III.txt ├── 631. Design Excel Sum Formula.txt ├── 632. Smallest Range Covering Elements from K Lists 24ms.cpp ├── 632. Smallest Range Covering Elements from K Lists.pdf ├── 633. Sum of Square Numbers.txt ├── 634. Find the Derangement of An Array.txt ├── 635. Design Log Storage System.txt ├── 636. Exclusive Time of Functions.txt ├── 637. Average of Levels in Binary Tree.trivial ├── 638. Shopping Offers.txt ├── 639. Decode Ways II.txt ├── 640. Solve the Equation.txt ├── 641. Design Circular Deque.txt ├── 642. Design Search Autocomplete System.txt ├── 643. Maximum Average Subarray I.txt ├── 644. Maximum Average Subarray II 80ms.cpp ├── 644. Maximum Average Subarray II.pdf ├── 645. Set Mismatch.txt ├── 646. Maximum Length of Pair Chain.txt ├── 647. Palindromic Substrings.txt ├── 648. Replace Words.txt ├── 649. Dota2 Senate.txt ├── 650. 2 Keys Keyboard.txt ├── 651. 4 Keys Keyboard.pdf ├── 652. Find Duplicate Subtrees 8ms.cpp ├── 652. Find Duplicate Subtrees.pdf ├── 653. Two Sum IV - Input is a BST.txt ├── 654. Maximum Binary Tree.txt ├── 655. Print Binary Tree.trivial ├── 656. Coin Path.txt ├── 657. Robot Return to Origin.txt ├── 658. Find K Closest Elements.txt ├── 659. Split Array into Consecutive Subsequences.txt ├── 660. Remove 9.txt ├── 661. Image Smoother.txt ├── 662. Maximum Width of Binary Tree.txt ├── 663. Equal Tree Partition.txt ├── 664. Strange Printer.txt ├── 665. Non-decreasing Array.txt ├── 666. Path Sum IV.txt ├── 667. Beautiful Arrangement II.txt ├── 668. Kth Smallest Number in Multiplication Table 3ms.cpp ├── 668. Kth Smallest Number in Multiplication Table.pdf ├── 669. Trim a Binary Search Tree.txt ├── 670. Maximum Swap.txt ├── 671. Second Minimum Node In a Binary Tree.txt ├── 672. Bulb Switcher II.txt ├── 673. Number of Longest Increasing Subsequence.txt ├── 674. Longest Continuous Increasing Subsequence.txt ├── 675. Cut Off Trees for Golf Event 52ms.cpp ├── 675. Cut Off Trees for Golf Event.pdf ├── 676. Implement Magic Dictionary.txt ├── 677. Map Sum Pairs.txt ├── 678. Valid Parenthesis String.txt ├── 679. 24 Game.txt ├── 680. Valid Palindrome II.txt ├── 681. Next Closest Time.txt ├── 682. Baseball Game.txt ├── 683. K Empty Slots.txt ├── 684. Redundant Connection.txt ├── 685. Redundant Connection II.txt ├── 686. Repeated String Match.txt ├── 687. Longest Univalue Path.txt ├── 688. Knight Probability in Chessboard.txt ├── 689. Maximum Sum of 3 Non-Overlapping Subarrays.txt ├── 690. Employee Importance.txt ├── 691. Stickers to Spell Word.txt ├── 692. Top K Frequent Words.txt ├── 693. Binary Number with Alternating Bits.txt ├── 694. Number of Distinct Islands.txt ├── 695. Max Area of Island.txt ├── 696. Count Binary Substrings.txt ├── 697. Degree of an Array.txt ├── 698. Partition to K Equal Sum Subsets.txt ├── 699. Falling Squares.txt └── 700. Search in a Binary Search Tree.txt ├── 0701-0800 ├── 701. Insert into a Binary Search Tree.txt ├── 702. Search in a Sorted Array of Unknown Size.txt ├── 703. Kth Largest Element in a Stream.txt ├── 704. Binary Search.cpp ├── 704. Binary Search.txt ├── 705. Design HashSet.txt ├── 706. Design HashMap 60ms.cpp ├── 706. Design HashMap.pdf ├── 707. Design Linked List.txt ├── 708. Insert into a Sorted Circular Linked List.txt ├── 709. To Lower Case.trivial ├── 710. Random Pick with Blacklist.txt ├── 711. Number of Distinct Islands II 40ms.cpp ├── 711. Number of Distinct Islands II.pdf ├── 712. Minimum ASCII Delete Sum for Two Strings.txt ├── 713. Subarray Product Less Than K.txt ├── 714. Best Time to Buy and Sell Stock with Transaction Fee.txt ├── 715. Range Module 112ms_RBtree.cpp ├── 715. Range Module 124ms_treap.cpp ├── 715. Range Module.pdf ├── 716. Max Stack.txt ├── 717. 1-bit and 2-bit Characters.txt ├── 718. Maximum Length of Repeated Subarray.pdf ├── 719. Find K-th Smallest Pair Distance.txt ├── 720. Longest Word in Dictionary 12ms.cpp ├── 720. Longest Word in Dictionary 12ms_trie.cpp ├── 720. Longest Word in Dictionary.pdf ├── 721. Accounts Merge.txt ├── 722. Remove Comments.txt ├── 723. Candy Crush.txt ├── 724. Find Pivot Index.txt ├── 725. Split Linked List in Parts.txt ├── 726. Number of Atoms.txt ├── 727. Minimum Window Subsequence.pdf ├── 728. Self Dividing Numbers.txt ├── 729. My Calendar I 56ms_RBtree.cpp ├── 729. My Calendar I.pdf ├── 730. Count Different Palindromic Subsequences.txt ├── 731. My Calendar II 44ms_BST.cpp ├── 731. My Calendar II 52ms_RBtree.cpp ├── 731. My Calendar II.pdf ├── 732. My Calendar III.txt ├── 733. Flood Fill.txt ├── 734. Sentence Similarity.txt ├── 735. Asteroid Collision.txt ├── 736. Parse Lisp Expression.txt ├── 737. Sentence Similarity II.txt ├── 738. Monotone Increasing Digits.txt ├── 739. Daily Temperatures.txt ├── 740. Delete and Earn.txt ├── 741. Cherry Pickup.pdf ├── 742. Closest Leaf in a Binary Tree.txt ├── 743. Network Delay Time.txt ├── 744. Find Smallest Letter Greater Than Target.txt ├── 745. Prefix and Suffix Search.txt ├── 746. Min Cost Climbing Stairs.txt ├── 747. Largest Number At Least Twice of Others.txt ├── 748. Shortest Completing Word.txt ├── 749. Contain Virus.pdf ├── 750. Number Of Corner Rectangles.pdf ├── 751. IP to CIDR.txt ├── 752. Open the Lock.txt ├── 753. Cracking the Safe.txt ├── 754. Reach a Number.txt ├── 755. Pour Water.txt ├── 756. Pyramid Transition Matrix.txt ├── 757. Set Intersection Size At Least Two.txt ├── 758. Bold Words in String.txt ├── 759. Employee Free Time.txt ├── 760. Find Anagram Mappings.txt ├── 761. Special Binary String.txt ├── 762. Prime Number of Set Bits in Binary Representation.txt ├── 763. Partition Labels.txt ├── 764. Largest Plus Sign 51ms.cpp ├── 764. Largest Plus Sign.pdf ├── 765. Couples Holding Hands.txt ├── 766. Toeplitz Matrix.txt ├── 767. Reorganize String.txt ├── 768. Max Chunks To Make Sorted II.txt ├── 769. Max Chunks To Make Sorted.txt ├── 770. Basic Calculator IV.txt ├── 771. Jewels and Stones.txt ├── 772. Basic Calculator III.txt ├── 773. Sliding Puzzle.txt ├── 774. Minimize Max Distance to Gas Station.txt ├── 775. Global and Local Inversions.txt ├── 776. Split BST.txt ├── 777. Swap Adjacent in LR String.txt ├── 778. Swim in Rising Water.txt ├── 779. K-th Symbol in Grammar.txt ├── 780. Reaching Points.txt ├── 781. Rabbits in Forest.txt ├── 782. Transform to Chessboard.txt ├── 783. Minimum Distance Between BST Nodes.txt ├── 784. Letter Case Permutation.trivial ├── 785. Is Graph Bipartite.txt ├── 786. K-th Smallest Prime Fraction.txt ├── 787. Cheapest Flights Within K Stops.txt ├── 788. Rotated Digits.txt ├── 789. Escape The Ghosts.txt ├── 790. Domino and Tromino Tiling.txt ├── 791. Custom Sort String.txt ├── 792. Number of Matching Subsequences 44ms.cpp ├── 792. Number of Matching Subsequences.pdf ├── 793. Preimage Size of Factorial Zeroes Function.txt ├── 794. Valid Tic-Tac-Toe State.txt ├── 795. Number of Subarrays with Bounded Maximum.txt ├── 796. Rotate String.txt ├── 797. All Paths From Source to Target.txt ├── 798. Smallest Rotation with Highest Score.txt └── 800. Similar RGB Color.txt ├── 0801-0900 ├── 801. Minimum Swaps To Make Sequences Increasing.txt ├── 802. Find Eventual Safe States.txt ├── 803. Bricks Falling When Hit.txt ├── 804. Unique Morse Code Words.txt ├── 805. Split Array With Same Average.txt ├── 806. Number of Lines To Write String.txt ├── 807. Max Increase to Keep City Skyline.txt ├── 808. Soup Servings.txt ├── 809. Expressive Words.txt ├── 810. Chalkboard XOR Game.txt ├── 811. Subdomain Visit Count.txt ├── 812. Largest Triangle Area.pdf ├── 813. Largest Sum of Averages.pdf ├── 814. Binary Tree Pruning.txt ├── 815. Bus Routes.txt ├── 816. Ambiguous Coordinates.txt ├── 817. Linked List Components.txt ├── 818. Race Car.txt ├── 819. Most Common Word.txt ├── 820. Short Encoding of Words 12ms.cpp ├── 820. Short Encoding of Words.pdf ├── 821. Shortest Distance to a Character.txt ├── 822. Card Flipping Game.txt ├── 823. Binary Trees With Factors 8ms.cpp ├── 823. Binary Trees With Factors.pdf ├── 824. Goat Latin.txt ├── 825. Friends Of Appropriate Ages.txt ├── 826. Most Profit Assigning Work.txt ├── 827. Making A Large Island.txt ├── 828. Count Unique Characters of All Substrings of a Given String.txt ├── 829. Consecutive Numbers Sum.pdf ├── 830. Positions of Large Groups.txt ├── 831. Masking Personal Information.txt ├── 832. Flipping an Image.trivial ├── 833. Find And Replace in String.txt ├── 834. Sum of Distances in Tree.txt ├── 835. Image Overlap.txt ├── 836. Rectangle Overlap.txt ├── 837. New 21 Game.txt ├── 838. Push Dominoes.txt ├── 839. Similar String Groups.txt ├── 840. Magic Squares In Grid.txt ├── 841. Keys and Rooms.txt ├── 842. Split Array into Fibonacci Sequence.txt ├── 843. Guess the Word.txt ├── 844. Backspace String Compare.txt ├── 845. Longest Mountain in Array.txt ├── 846. Hand of Straights 20ms.cpp ├── 846. Hand of Straights.pdf ├── 847. Shortest Path Visiting All Nodes.txt ├── 848. Shifting Letters.txt ├── 849. Maximize Distance to Closest Person.txt ├── 850. Rectangle Area II.pdf ├── 851. Loud and Rich.txt ├── 852. Peak Index in a Mountain Array.txt ├── 853. Car Fleet.txt ├── 854. K-Similar Strings.txt ├── 856. Score of Parentheses.txt ├── 857. Minimum Cost to Hire K Workers.txt ├── 858. Mirror Reflection.txt ├── 859. Buddy Strings.txt ├── 860. Lemonade Change.txt ├── 861. Score After Flipping Matrix.txt ├── 862. Shortest Subarray with Sum at Least K.txt ├── 863. All Nodes Distance K in Binary Tree.txt ├── 864. Shortest Path to Get All Keys.txt ├── 865. Smallest Subtree with all the Deepest Nodes.txt ├── 866. Prime Palindrome.txt ├── 867. Transpose Matrix.trivial ├── 868. Binary Gap 0ms.cpp ├── 868. Binary Gap.txt ├── 869. Reordered Power of 2.txt ├── 870. Advantage Shuffle 28ms.cpp ├── 870. Advantage Shuffle.pdf ├── 871. Minimum Number of Refueling Stops.txt ├── 872. Leaf-Similar Trees.txt ├── 873. Length of Longest Fibonacci Subsequence.pdf ├── 874. Walking Robot Simulation.txt ├── 875. Koko Eating Bananas 8ms.cpp ├── 875. Koko Eating Bananas.pdf ├── 876. Middle of the Linked List.txt ├── 877. Stone Game.txt ├── 878. Nth Magical Number.txt ├── 879. Profitable Schemes.txt ├── 880. Decoded String at Index.txt ├── 881. Boats to Save People.txt ├── 882. Reachable Nodes In Subdivided Graph.txt ├── 883. Projection Area of 3D Shapes.txt ├── 884. Uncommon Words from Two Sentences.txt ├── 885. Spiral Matrix III.txt ├── 886. Possible Bipartition.txt ├── 887. Super Egg Drop.pdf ├── 888. Fair Candy Swap.txt ├── 889. Construct Binary Tree from Preorder and Postorder Traversal.txt ├── 890. Find and Replace Pattern.txt ├── 891. Sum of Subsequence Widths.txt ├── 892. Surface Area of 3D Shapes.txt ├── 893. Groups of Special-Equivalent Strings.txt ├── 894. All Possible Full Binary Trees 28ms_hack.cpp ├── 894. All Possible Full Binary Trees 84ms.cpp ├── 894. All Possible Full Binary Trees.txt ├── 895. Maximum Frequency Stack 120ms.cpp ├── 895. Maximum Frequency Stack.pdf ├── 896. Monotonic Array.txt ├── 897. Increasing Order Search Tree.txt ├── 898. Bitwise ORs of Subarrays 52ms.cpp ├── 898. Bitwise ORs of Subarrays.pdf ├── 899. Orderly Queue.txt └── 900. RLE Iterator.trivial ├── 0901-1000 ├── 901. Online Stock Span.txt ├── 902. Numbers At Most N Given Digit Set.txt ├── 903. Valid Permutations for DI Sequence.txt ├── 904. Fruit Into Baskets.txt ├── 905. Sort Array By Parity.txt ├── 906. Super Palindromes.txt ├── 907. Sum of Subarray Minimums.txt ├── 908. Smallest Range I.txt ├── 909. Snakes and Ladders.txt ├── 910. Smallest Range II.txt ├── 911. Online Election 172ms.cpp ├── 911. Online Election.pdf ├── 912. Sort an Array 20ms.cpp ├── 912. Sort an Array.pdf ├── 913. Cat and Mouse.txt ├── 914. X of a Kind in a Deck of Cards.txt ├── 915. Partition Array into Disjoint Intervals.txt ├── 916. Word Subsets.txt ├── 917. Reverse Only Letters.txt ├── 918. Maximum Sum Circular Subarray.txt ├── 919. Complete Binary Tree Inserter.txt ├── 920. Number of Music Playlists.txt ├── 921. Minimum Add to Make Parentheses Valid.txt ├── 922. Sort Array By Parity II.txt ├── 923. 3Sum With Multiplicity.txt ├── 924. Minimize Malware Spread.txt ├── 925. Long Pressed Name.txt ├── 926. Flip String to Monotone Increasing.txt ├── 927. Three Equal Parts.txt ├── 928. Minimize Malware Spread II.txt ├── 929. Unique Email Addresses.txt ├── 930. Binary Subarrays With Sum.txt ├── 931. Minimum Falling Path Sum.txt ├── 932. Beautiful Array.txt ├── 933. Number of Recent Calls.txt ├── 934. Shortest Bridge.txt ├── 935. Knight Dialer.txt ├── 936. Stamping The Sequence.txt ├── 937. Reorder Data in Log Files.txt ├── 938. Range Sum of BST.txt ├── 939. Minimum Area Rectangle.pdf ├── 940. Distinct Subsequences II.txt ├── 941. Valid Mountain Array.txt ├── 942. DI String Match.txt ├── 943. Find the Shortest Superstring.txt ├── 944. Delete Columns to Make Sorted.txt ├── 945. Minimum Increment to Make Array Unique 48ms.cpp ├── 945. Minimum Increment to Make Array Unique.pdf ├── 946. Validate Stack Sequences.txt ├── 947. Most Stones Removed with Same Row or Column.txt ├── 948. Bag of Tokens.txt ├── 949. Largest Time for Given Digits.txt ├── 950. Reveal Cards In Increasing Order.txt ├── 951. Flip Equivalent Binary Trees.txt ├── 952. Largest Component Size by Common Factor 60ms.cpp ├── 952. Largest Component Size by Common Factor.pdf ├── 953. Verifying an Alien Dictionary.txt ├── 954. Array of Doubled Pairs 52ms.cpp ├── 954. Array of Doubled Pairs.pdf ├── 955. Delete Columns to Make Sorted II.txt ├── 956. Tallest Billboard.txt ├── 957. Prison Cells After N Days.txt ├── 958. Check Completeness of a Binary Tree.txt ├── 959. Regions Cut By Slashes.txt ├── 960. Delete Columns to Make Sorted III.txt ├── 961. N-Repeated Element in Size 2N Array.txt ├── 962. Maximum Width Ramp.txt ├── 963. Minimum Area Rectangle II 0ms.cpp ├── 963. Minimum Area Rectangle II.pdf ├── 963. Minimum Area Rectangle II.txt ├── 964. Least Operators to Express Number.txt ├── 965. Univalued Binary Tree.txt ├── 966. Vowel Spellchecker.txt ├── 967. Numbers With Same Consecutive Differences.txt ├── 968. Binary Tree Cameras.txt ├── 969. Pancake Sorting.txt ├── 970. Powerful Integers.txt ├── 971. Flip Binary Tree To Match Preorder Traversal.txt ├── 972. Equal Rational Numbers.txt ├── 973. K Closest Points to Origin.txt ├── 974. Subarray Sums Divisible by K.txt ├── 975. Odd Even Jump.txt ├── 976. Largest Perimeter Triangle.txt ├── 977. Squares of a Sorted Array.txt ├── 978. Longest Turbulent Subarray.txt ├── 979. Distribute Coins in Binary Tree.txt ├── 980. Unique Paths III.txt ├── 981. Time Based Key-Value Store.txt ├── 982. Triples with Bitwise AND Equal To Zero.pdf ├── 983. Minimum Cost For Tickets.txt ├── 984. String Without AAA or BBB.txt ├── 985. Sum of Even Numbers After Queries.txt ├── 986. Interval List Intersections.txt ├── 987. Vertical Order Traversal of a Binary Tree.txt ├── 989. Add to Array-Form of Integer.txt ├── 990. Satisfiability of Equality Equations.txt ├── 991. Broken Calculator.txt ├── 992. Subarrays with K Different Integers.txt ├── 993. Cousins in Binary Tree.txt ├── 994. Rotting Oranges.txt ├── 995. Minimum Number of K Consecutive Bit Flips.txt ├── 996. Number of Squareful Arrays.pdf ├── 997. Find the Town Judge.txt ├── 998. Maximum Binary Tree II.txt └── 999. Available Captures for Rook.txt ├── 1001-1100 ├── 1001. Grid Illumination.txt ├── 1002. Find Common Characters.txt ├── 1003. Check If Word Is Valid After Substitutions.txt ├── 1004. Max Consecutive Ones III.txt ├── 1005. Maximize Sum Of Array After K Negations.txt ├── 1006. Clumsy Factorial.txt ├── 1007. Minimum Domino Rotations For Equal Row.txt ├── 1008. Construct Binary Search Tree from Preorder Traversal.txt ├── 1009. Complement of Base 10 Integer.txt ├── 1010. Pairs of Songs With Total Durations Divisible by 60.txt ├── 1011. Capacity To Ship Packages Within D Days.txt ├── 1012. Numbers With Repeated Digits.txt ├── 1013. Partition Array Into Three Parts With Equal Sum.txt ├── 1014. Best Sightseeing Pair.txt ├── 1015. Smallest Integer Divisible by K.pdf ├── 1016. Binary String With Substrings Representing 1 To N.txt ├── 1017. Convert to Base -2.txt ├── 1018. Binary Prefix Divisible By 5.txt ├── 1019. Next Greater Node In Linked List.txt ├── 1020. Number of Enclaves.txt ├── 1021. Remove Outermost Parentheses.txt ├── 1022. Sum of Root To Leaf Binary Numbers.txt ├── 1023. Camelcase Matching.txt ├── 1024. Video Stitching.txt ├── 1025. Divisor Game.txt ├── 1026. Maximum Difference Between Node and Ancestor.txt ├── 1027. Longest Arithmetic Sequence.pdf ├── 1028. Recover a Tree From Preorder Traversal.txt ├── 1029. Two City Scheduling.txt ├── 1030. Matrix Cells in Distance Order.txt ├── 1031. Maximum Sum of Two Non-Overlapping Subarrays.txt ├── 1032. Stream of Characters.txt ├── 1033. Moving Stones Until Consecutive.txt ├── 1034. Coloring A Border.txt ├── 1035. Uncrossed Lines.txt ├── 1036. Escape a Large Maze.txt ├── 1037. Valid Boomerang.txt ├── 1038. Binary Search Tree to Greater Sum Tree.txt ├── 1039. Minimum Score Triangulation of Polygon.txt ├── 1040. Moving Stones Until Consecutive II.txt ├── 1041. Robot Bounded In Circle.txt ├── 1042. Flower Planting With No Adjacent.txt ├── 1043. Partition Array for Maximum Sum.pdf ├── 1044. Longest Duplicate Substring.txt ├── 1046. Last Stone Weight.txt ├── 1047. Remove All Adjacent Duplicates In String.txt ├── 1048. Longest String Chain 24ms.cpp ├── 1048. Longest String Chain.txt ├── 1049. Last Stone Weight II.txt ├── 1051. Height Checker.txt ├── 1052. Grumpy Bookstore Owner.txt ├── 1053. Previous Permutation With One Swap.txt ├── 1054. Distant Barcodes.txt ├── 1055. Shortest Way to Form String.txt ├── 1056. Confusing Number.txt ├── 1057. Campus Bikes.pdf ├── 1058. Minimize Rounding Error to Meet Target.txt ├── 1059. All Paths from Source Lead to Destination.txt ├── 1060. Missing Element in Sorted Array.txt ├── 1061. Lexicographically Smallest Equivalent String.txt ├── 1062. Longest Repeating Substring.txt ├── 1063. Number of Valid Subarrays.txt ├── 1064. Fixed Point.txt ├── 1065. Index Pairs of a String.txt ├── 1066. Campus Bikes II.pdf ├── 1067. Digit Count in Range.txt ├── 1071. Greatest Common Divisor of Strings.txt ├── 1072. Flip Columns For Maximum Number of Equal Rows.txt ├── 1073. Adding Two Negabinary Numbers.txt ├── 1074. Number of Submatrices That Sum to Target.txt ├── 1078. Occurrences After Bigram.trivial ├── 1079. Letter Tile Possibilities.pdf ├── 1080. Insufficient Nodes in Root to Leaf Paths.txt ├── 1081. Smallest Subsequence of Distinct Characters.txt ├── 1085. Sum of Digits in the Minimum Number.txt ├── 1086. High Five.txt ├── 1087. Brace Expansion.txt ├── 1088. Confusing Number II.txt ├── 1089. Duplicate Zeros.trivial ├── 1090. Largest Values From Labels.txt ├── 1091. Shortest Path in Binary Matrix.txt ├── 1092. Shortest Common Supersequence.txt ├── 1093. Statistics from a Large Sample.txt ├── 1094. Car Pooling.txt ├── 1095. Find in Mountain Array.txt ├── 1096. Brace Expansion II.txt ├── 1099. Two Sum Less Than K 20ms.cpp ├── 1099. Two Sum Less Than K.txt └── 1100. Find K-Length Substrings With No Repeated Characters.txt ├── 1101-1200 ├── 1101. The Earliest Moment When Everyone Become Friends.txt ├── 1102. Path With Maximum Minimum Value.txt ├── 1103. Distribute Candies to People.txt ├── 1104. Path In Zigzag Labelled Binary Tree.txt ├── 1105. Filling Bookcase Shelves.txt ├── 1106. Parsing A Boolean Expression.txt ├── 1108. Defanging an IP Address.txt ├── 1109. Corporate Flight Bookings.txt ├── 1110. Delete Nodes And Return Forest.txt ├── 1111. Maximum Nesting Depth of Two Valid Parentheses Strings.txt ├── 1114. Print in Order.txt ├── 1115. Print FooBar Alternately.txt ├── 1116. Print Zero Even Odd.txt ├── 1117. Building H2O.txt ├── 1118. Number of Days in a Month.trivial ├── 1119. Remove Vowels from a String.txt ├── 1120. Maximum Average Subtree.txt ├── 1121. Divide Array Into Increasing Sequences.txt ├── 1122. Relative Sort Array.txt ├── 1123. Lowest Common Ancestor of Deepest Leaves.txt ├── 1124. Longest Well-Performing Interval.txt ├── 1125. Smallest Sufficient Team.txt ├── 1128. Number of Equivalent Domino Pairs.txt ├── 1129. Shortest Path with Alternating Colors.txt ├── 1130. Minimum Cost Tree From Leaf Values.txt ├── 1131. Maximum of Absolute Value Expression.txt ├── 1133. Largest Unique Number.txt ├── 1134. Armstrong Number.txt ├── 1135. Connecting Cities With Minimum Cost 232ms.cpp ├── 1135. Connecting Cities With Minimum Cost.pdf ├── 1136. Parallel Courses.txt ├── 1137. N-th Tribonacci Number.txt ├── 1138. Alphabet Board Path.txt ├── 1139. Largest 1-Bordered Square 52ms.cpp ├── 1139. Largest 1-Bordered Square.txt ├── 1140. Stone Game II.txt ├── 1143. Longest Common Subsequence 0ms.cpp ├── 1143. Longest Common Subsequence.txt ├── 1144. Decrease Elements To Make Array Zigzag.txt ├── 1145. Binary Tree Coloring Game.txt ├── 1146. Snapshot Array 148ms.cpp ├── 1146. Snapshot Array.pdf ├── 1147. Longest Chunked Palindrome Decomposition.txt ├── 1150. Check If a Number Is Majority Element in a Sorted Array.txt ├── 1151. Minimum Swaps to Group All 1's Together.txt ├── 1152. Analyze User Website Visit Pattern.txt ├── 1153. String Transforms Into Another String.txt ├── 1154. Day of the Year.trivial ├── 1155. Number of Dice Rolls With Target Sum.pdf ├── 1156. Swap For Longest Repeated Character Substring.txt ├── 1157. Online Majority Element In Subarray 80ms_O(log n).cpp ├── 1157. Online Majority Element In Subarray 80ms_O(log^2 n).cpp ├── 1157. Online Majority Element In Subarray.pdf ├── 1160. Find Words That Can Be Formed by Characters.txt ├── 1161. Maximum Level Sum of a Binary Tree.txt ├── 1162. As Far from Land as Possible.txt ├── 1163. Last Substring in Lexicographical Order.txt ├── 1165. Single-Row Keyboard.txt ├── 1166. Design File System.txt ├── 1167. Minimum Cost to Connect Sticks.txt ├── 1168. Optimize Water Distribution in a Village 192ms.cpp ├── 1168. Optimize Water Distribution in a Village.pdf ├── 1169. Invalid Transactions.txt ├── 1170. Compare Strings by Frequency of the Smallest Character.txt ├── 1171. Remove Zero Sum Consecutive Nodes from Linked List.txt ├── 1172. Dinner Plate Stacks 296ms.cpp ├── 1172. Dinner Plate Stacks.pdf ├── 1175. Prime Arrangements.pdf ├── 1176. Diet Plan Performance.txt ├── 1177. Can Make Palindrome from Substring 220ms.cpp ├── 1177. Can Make Palindrome from Substring.pdf ├── 1178. Number of Valid Words for Each Puzzle 44ms.cpp ├── 1178. Number of Valid Words for Each Puzzle.pdf ├── 1180. Count Substrings with Only One Distinct Letter.txt ├── 1181. Before and After Puzzle.txt ├── 1182. Shortest Distance to Target Color.txt ├── 1184. Distance Between Bus Stops.txt ├── 1185. Day of the Week.trivial ├── 1186. Maximum Subarray Sum with One Deletion.txt ├── 1187. Make Array Strictly Increasing 12ms.cpp ├── 1187. Make Array Strictly Increasing.pdf ├── 1188. Design Bounded Blocking Queue.txt ├── 1189. Maximum Number of Balloons.txt ├── 1190. Reverse Substrings Between Each Pair of Parentheses.txt ├── 1191. K-Concatenation Maximum Sum.txt ├── 1192. Critical Connections in a Network.txt ├── 1195. Fizz Buzz Multithreaded.txt ├── 1196. How Many Apples Can You Put into the Basket.txt ├── 1197. Minimum Knight Moves.txt ├── 1198. Find Smallest Common Element in All Rows.txt ├── 1199. Minimum Time to Build Blocks.txt ├── 1200. Minimum Absolute Difference 72ms.cpp └── 1200. Minimum Absolute Difference.pdf ├── 1201-1300 ├── 1201. Ugly Number III.txt ├── 1202. Smallest String With Swaps.txt ├── 1203. Sort Items by Groups Respecting Dependencies.txt ├── 1206. Design Skiplist.txt ├── 1207. Unique Number of Occurrences.txt ├── 1208. Get Equal Substrings Within Budget.txt ├── 1209. Remove All Adjacent Duplicates in String II.txt ├── 1210. Minimum Moves to Reach Target with Rotations.txt ├── 1213. Intersection of Three Sorted Arrays.txt ├── 1214. Two Sum BSTs.txt ├── 1215. Stepping Numbers.txt ├── 1216. Valid Palindrome III 4ms.cpp ├── 1216. Valid Palindrome III.pdf ├── 1217. Play with Chips.txt ├── 1218. Longest Arithmetic Subsequence of Given Difference 112ms.cpp ├── 1218. Longest Arithmetic Subsequence of Given Difference.pdf ├── 1219. Path with Maximum Gold.pdf ├── 1220. Count Vowels Permutation.txt ├── 1221. Split a String in Balanced Strings.txt ├── 1222. Queens That Can Attack the King.txt ├── 1223. Dice Roll Simulation.txt ├── 1224. Maximum Equal Frequency.txt ├── 1226. The Dining Philosophers.txt ├── 1227. Airplane Seat Assignment Probability.txt ├── 1228. Missing Number In Arithmetic Progression.txt ├── 1229. Meeting Scheduler.txt ├── 1230. Toss Strange Coins.txt ├── 1231. Divide Chocolate.txt ├── 1232. Check If It Is a Straight Line.txt ├── 1233. Remove Sub-Folders from the Filesystem.txt ├── 1234. Replace the Substring for Balanced String.txt ├── 1235. Maximum Profit in Job Scheduling.txt ├── 1236. Web Crawler.txt ├── 1237. Find Positive Integer Solution for a Given Equation.txt ├── 1238. Circular Permutation in Binary Representation.txt ├── 1239. Maximum Length of a Concatenated String with Unique Characters.txt ├── 1240. Tiling a Rectangle with the Fewest Squares 0ms_DP.cpp ├── 1240. Tiling a Rectangle with the Fewest Squares.txt ├── 1242. Web Crawler Multithreaded.txt ├── 1244. Design A Leaderboard.txt ├── 1245. Tree Diameter.txt ├── 1246. Palindrome Removal 20ms.cpp ├── 1246. Palindrome Removal.pdf ├── 1247. Minimum Swaps to Make Strings Equal.txt ├── 1248. Count Number of Nice Subarrays.txt ├── 1249. Minimum Remove to Make Valid Parentheses.txt ├── 1250. Check If It Is a Good Array.txt ├── 1252. Cells with Odd Values in a Matrix.txt ├── 1253. Reconstruct a 2-Row Binary Matrix.txt ├── 1254. Number of Closed Islands.txt ├── 1255. Maximum Score Words Formed by Letters.txt ├── 1256. Encode Number.txt ├── 1257. Smallest Common Region.txt ├── 1258. Synonymous Sentences.txt ├── 1259. Handshakes That Don't Cross.txt ├── 1260. Shift 2D Grid.txt ├── 1261. Find Elements in a Contaminated Binary Tree.txt ├── 1262. Greatest Sum Divisible by Three.txt ├── 1263. Minimum Moves to Move a Box to Their Target Location.txt ├── 1265. Print Immutable Linked List in Reverse.txt ├── 1266. Minimum Time Visiting All Points.txt ├── 1267. Count Servers that Communicate.txt ├── 1268. Search Suggestions System.txt ├── 1269. Number of Ways to Stay in the Same Place After Some Steps 0ms.cpp ├── 1269. Number of Ways to Stay in the Same Place After Some Steps.pdf ├── 1271. Hexspeak.txt ├── 1272. Remove Interval.txt ├── 1273. Delete Tree Nodes.txt ├── 1274. Number of Ships in a Rectangle.txt ├── 1275. Find Winner on a Tic Tac Toe Game.txt ├── 1276. Number of Burgers with No Waste of Ingredients.txt ├── 1277. Count Square Submatrices with All Ones.txt ├── 1278. Palindrome Partitioning III.txt ├── 1279. Traffic Light Controlled Intersection.txt ├── 1281. Subtract the Product and Sum of Digits of an Integer.txt ├── 1282. Group the People Given the Group Size They Belong To.txt ├── 1283. Find the Smallest Divisor Given a Threshold 196ms_asm.py ├── 1283. Find the Smallest Divisor Given a Threshold 4ms.cpp ├── 1283. Find the Smallest Divisor Given a Threshold 8ms.cpp ├── 1283. Find the Smallest Divisor Given a Threshold.pdf ├── 1286. Iterator for Combination.trivial ├── 1287. Element Appearing More Than 25% In Sorted Array.txt ├── 1288. Remove Covered Intervals.txt ├── 1289. Minimum Falling Path Sum II.txt ├── 1290. Convert Binary Number in a Linked List to Integer.txt ├── 1291. Sequential Digits.txt ├── 1292. Maximum Side Length of a Square with Sum Less than or Equal to Threshold.txt ├── 1293. Shortest Path in a Grid with Obstacles Elimination.txt ├── 1295. Find Numbers with Even Number of Digits.txt ├── 1296. Divide Array in Sets of K Consecutive Numbers 36ms.cpp ├── 1296. Divide Array in Sets of K Consecutive Numbers.pdf ├── 1297. Maximum Number of Occurrences of a Substring.txt ├── 1298. Maximum Candies You Can Get from Boxes.txt ├── 1299. Replace Elements with Greatest Element on Right Side.txt └── 1300. Sum of Mutated Array Closest to Target.txt ├── 1301-1400 ├── 1301. Number of Paths with Max Score.txt ├── 1302. Deepest Leaves Sum.txt ├── 1304. Find N Unique Integers Sum up to Zero.trivial ├── 1305. All Elements in Two Binary Search Trees.txt ├── 1306. Jump Game III.txt ├── 1307. Verbal Arithmetic Puzzle.txt ├── 1309. Decrypt String from Alphabet to Integer Mapping.trivial ├── 1310. XOR Queries of a Subarray.txt ├── 1311. Get Watched Videos by Your Friends.txt ├── 1312. Minimum Insertion Steps to Make a String Palindrome.txt ├── 1313. Decompress Run-Length Encoded List.txt ├── 1314. Matrix Block Sum.txt ├── 1315. Sum of Nodes with Even-Valued Grandparent.txt ├── 1316. Distinct Echo Substrings.txt ├── 1317. Convert Integer to the Sum of Two No-Zero Integers.txt ├── 1318. Minimum Flips to Make a OR b Equal to c.txt ├── 1319. Number of Operations to Make Network Connected.txt ├── 1320. Minimum Distance to Type a Word Using Two Fingers.txt ├── 1323. Maximum 69 Number.txt ├── 1324. Print Words Vertically.txt ├── 1325. Delete Leaves With a Given Value.txt ├── 1326. Minimum Number of Taps to Open to Water a Garden.txt ├── 1328. Break a Palindrome.txt ├── 1329. Sort the Matrix Diagonally.txt ├── 1330. Reverse Subarray To Maximize Array Value.txt ├── 1331. Rank Transform of an Array.txt ├── 1332. Remove Palindromic Subsequences.txt ├── 1333. Filter Restaurants by Vegan-Friendly, Price and Distance.txt ├── 1334. Find the City With the Smallest Number of Neighbors at a Threshold Distance.pdf ├── 1335. Minimum Difficulty of a Job Schedule.txt ├── 1337. The K Weakest Rows in a Matrix.txt ├── 1338. Reduce Array Size to The Half.txt ├── 1339. Maximum Product of Splitted Binary Tree.txt ├── 1340. Jump Game V 8ms.cpp ├── 1340. Jump Game V.pdf ├── 1342. Number of Steps to Reduce a Number to Zero.txt ├── 1343. Number of Sub-arrays of Size K and Average Greater than or Equal to Threshold.txt ├── 1344. Angle Between Hands of a Clock.trivial ├── 1345. Jump Game IV.txt ├── 1346. Check If N and Its Double Exist.txt ├── 1347. Minimum Number of Steps to Make Two Strings Anagram.txt ├── 1348. Tweet Counts Per Frequency.txt ├── 1349. Maximum Students Taking Exam.pdf ├── 1351. Count Negative Numbers in a Sorted Matrix.txt ├── 1352. Product of the Last K Numbers.txt ├── 1353. Maximum Number of Events That Can Be Attended 340ms.cpp ├── 1353. Maximum Number of Events That Can Be Attended.pdf ├── 1354. Construct Target Array With Multiple Sums.txt ├── 1356. Sort Integers by The Number of 1 Bits.txt ├── 1357. Apply Discount Every n Orders 152ms.cpp ├── 1357. Apply Discount Every n Orders.pdf ├── 1358. Number of Substrings Containing All Three Characters.txt ├── 1359. Count All Valid Pickup and Delivery Options.txt ├── 1360. Number of Days Between Two Dates.trivial ├── 1361. Validate Binary Tree Nodes.txt ├── 1362. Closest Divisors.txt ├── 1363. Largest Multiple of Three.txt ├── 1365. How Many Numbers Are Smaller Than the Current Number.txt ├── 1366. Rank Teams by Votes.txt ├── 1367. Linked List in Binary Tree.txt ├── 1368. Minimum Cost to Make at Least One Valid Path in a Grid.txt ├── 1370. Increasing Decreasing String.txt ├── 1371. Find the Longest Substring Containing Vowels in Even Counts.txt ├── 1372. Longest ZigZag Path in a Binary Tree.txt ├── 1373. Maximum Sum BST in Binary Tree.txt ├── 1374. Generate a String With Characters That Have Odd Counts.trivial ├── 1375. Bulb Switcher III.txt ├── 1376. Time Needed to Inform All Employees.txt ├── 1377. Frog Position After T Seconds.txt ├── 1379. Find a Corresponding Node of a Binary Tree in a Clone of That Tree.txt ├── 1380. Lucky Numbers in a Matrix.txt ├── 1381. Design a Stack With Increment Operation.txt ├── 1382. Balance a Binary Search Tree.txt ├── 1383. Maximum Performance of a Team.txt ├── 1385. Find the Distance Value Between Two Arrays.pdf ├── 1386. Cinema Seat Allocation.txt ├── 1387. Sort Integers by The Power Value.txt ├── 1388. Pizza With 3n Slices.txt ├── 1389. Create Target Array in the Given Order.txt ├── 1390. Four Divisors.txt ├── 1391. Check if There is a Valid Path in a Grid.txt ├── 1392. Longest Happy Prefix.txt ├── 1394. Find Lucky Integer in an Array.txt ├── 1395. Count Number of Teams.txt ├── 1396. Design Underground System 88ms.cpp ├── 1396. Design Underground System.pdf ├── 1397. Find All Good Strings.txt ├── 1399. Count Largest Group.txt └── 1400. Construct K Palindrome Strings.txt ├── 1401-1500 ├── 1401. Circle and Rectangle Overlapping.txt ├── 1402. Reducing Dishes.txt ├── 1403. Minimum Subsequence in Non-Increasing Order.txt ├── 1404. Number of Steps to Reduce a Number in Binary Representation to One.txt ├── 1405. Longest Happy String.txt ├── 1406. Stone Game III.txt ├── 1408. String Matching in an Array.txt ├── 1409. Queries on a Permutation With Key.txt ├── 1410. HTML Entity Parser.txt ├── 1411. Number of Ways to Paint N × 3 Grid.txt ├── 1413. Minimum Value to Get Positive Step by Step Sum.txt ├── 1414. Find the Minimum Number of Fibonacci Numbers Whose Sum Is K.txt ├── 1415. The k-th Lexicographical String of All Happy Strings of Length n.txt ├── 1416. Restore The Array.txt ├── 1417. Reformat The String.txt ├── 1418. Display Table of Food Orders in a Restaurant.txt ├── 1419. Minimum Number of Frogs Croaking.txt ├── 1420. Build Array Where You Can Find The Maximum Exactly K Comparisons 0ms.cpp ├── 1420. Build Array Where You Can Find The Maximum Exactly K Comparisons.pdf ├── 1422. Maximum Score After Splitting a String.txt ├── 1423. Maximum Points You Can Obtain from Cards.txt ├── 1424. Diagonal Traverse II.txt ├── 1425. Constrained Subsequence Sum.txt ├── 1426. Counting Elements.txt ├── 1427. Perform String Shifts.txt ├── 1428. Leftmost Column with at Least a One.txt ├── 1429. First Unique Number 292ms.cpp ├── 1429. First Unique Number.pdf ├── 1430. Check If a String Is a Valid Sequence from Root to Leaves Path in a Binary Tree.txt ├── 1431. Kids With the Greatest Number of Candies.txt ├── 1432. Max Difference You Can Get From Changing an Integer.txt ├── 1433. Check If a String Can Break Another String.txt ├── 1434. Number of Ways to Wear Different Hats to Each Other.pdf ├── 1436. Destination City.txt ├── 1437. Check If All 1's Are at Least Length K Places Away.txt ├── 1438. Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit.txt ├── 1439. Find the Kth Smallest Sum of a Matrix With Sorted Rows.txt ├── 1441. Build an Array With Stack Operations.txt ├── 1442. Count Triplets That Can Form Two Arrays of Equal XOR.txt ├── 1443. Minimum Time to Collect All Apples in a Tree.txt ├── 1444. Number of Ways of Cutting a Pizza.txt ├── 1446. Consecutive Characters.txt ├── 1447. Simplified Fractions.txt ├── 1448. Count Good Nodes in Binary Tree.txt ├── 1449. Form Largest Integer With Digits That Add up to Target.txt ├── 1450. Number of Students Doing Homework at a Given Time.txt ├── 1451. Rearrange Words in a Sentence.txt ├── 1452. People Whose List of Favorite Companies Is Not a Subset of Another List 92ms.cpp ├── 1452. People Whose List of Favorite Companies Is Not a Subset of Another List.pdf ├── 1453. Maximum Number of Darts Inside of a Circular Dartboard.pdf ├── 1455. Check If a Word Occurs As a Prefix of Any Word in a Sentence.txt ├── 1456. Maximum Number of Vowels in a Substring of Given Length.txt ├── 1457. Pseudo-Palindromic Paths in a Binary Tree.txt ├── 1458. Max Dot Product of Two Subsequences.txt ├── 1460. Make Two Arrays Equal by Reversing Sub-arrays.txt ├── 1461. Check If a String Contains All Binary Codes of Size K 12ms.cpp ├── 1461. Check If a String Contains All Binary Codes of Size K.pdf ├── 1462. Course Schedule IV 148ms.cpp ├── 1462. Course Schedule IV.pdf ├── 1462. Course Schedule IV.txt ├── 1463. Cherry Pickup II.txt ├── 1464. Maximum Product of Two Elements in an Array.txt ├── 1465. Maximum Area of a Piece of Cake After Horizontal and Vertical Cuts.txt ├── 1466. Reorder Routes to Make All Paths Lead to the City Zero.txt ├── 1467. Probability of a Two Boxes Having The Same Number of Distinct Balls.txt ├── 1469. Find All The Lonely Nodes.txt ├── 1470. Shuffle the Array.txt ├── 1471. The k Strongest Values in an Array.txt ├── 1472. Design Browser History.txt ├── 1473. Paint House III.txt ├── 1474. Delete N Nodes After M Nodes of a Linked List.txt ├── 1475. Final Prices With a Special Discount in a Shop.txt ├── 1476. Subrectangle Queries.txt ├── 1477. Find Two Non-overlapping Sub-arrays Each With Target Sum.txt ├── 1478. Allocate Mailboxes 4ms.cpp ├── 1478. Allocate Mailboxes.pdf ├── 1480. Running Sum of 1d Array.txt ├── 1481. Least Number of Unique Integers after K Removals.txt ├── 1482. Minimum Number of Days to Make m Bouquets 164ms.cpp ├── 1482. Minimum Number of Days to Make m Bouquets.pdf ├── 1483. Kth Ancestor of a Tree Node 308ms.cpp ├── 1483. Kth Ancestor of a Tree Node.pdf ├── 1485. Clone Binary Tree With Random Pointer.txt ├── 1486. XOR Operation in an Array.txt ├── 1487. Making File Names Unique.txt ├── 1488. Avoid Flood in The City 204ms.cpp ├── 1488. Avoid Flood in The City 212ms_O(n).cpp ├── 1488. Avoid Flood in The City 320ms_O(n)_unordered_map.cpp ├── 1488. Avoid Flood in The City.pdf ├── 1490. Clone N-ary Tree.txt ├── 1491. Average Salary Excluding the Minimum and Maximum Salary.txt ├── 1492. The kth Factor of n.txt ├── 1493. Longest Subarray of 1's After Deleting One Element.txt ├── 1494. Parallel Courses II.pdf ├── 1496. Path Crossing.txt ├── 1497. Check If Array Pairs Are Divisible by k.txt ├── 1498. Number of Subsequences That Satisfy the Given Sum Condition.txt ├── 1499. Max Value of Equation.txt └── 1500. Design a File Sharing System.txt ├── 1501-1600 ├── 1502. Can Make Arithmetic Progression From Sequence.txt ├── 1503. Last Moment Before All Ants Fall Out of a Plank.txt ├── 1504. Count Submatrices With All Ones.txt ├── 1505. Minimum Possible Integer After at Most K Adjacent Swaps On Digits 24ms.cpp ├── 1505. Minimum Possible Integer After at Most K Adjacent Swaps On Digits.pdf ├── 1506. Find Root of N-Ary Tree.txt ├── 1507. Reformat Date.trivial ├── 1508. Range Sum of Sorted Subarray Sums.txt ├── 1509. Minimum Difference Between Largest and Smallest Value in Three Moves.txt ├── 1510. Stone Game IV.txt ├── 1512. Number of Good Pairs.txt ├── 1513. Number of Substrings With Only 1s.txt ├── 1514. Path with Maximum Probability.txt ├── 1515. Best Position for a Service Centre.pdf ├── 1516. Move Sub-Tree of N-Ary Tree.txt ├── 1518. Water Bottles.txt ├── 1519. Number of Nodes in the Sub-Tree With the Same Label.txt ├── 1520. Maximum Number of Non-Overlapping Substrings 36ms.cpp ├── 1520. Maximum Number of Non-Overlapping Substrings.pdf ├── 1521. Find a Value of a Mysterious Function Closest to Target 60ms.cpp ├── 1521. Find a Value of a Mysterious Function Closest to Target.pdf ├── 1522. Diameter of N-Ary Tree.txt ├── 1523. Count Odd Numbers in an Interval Range.txt ├── 1524. Number of Sub-arrays With Odd Sum.txt ├── 1525. Number of Good Ways to Split a String.txt ├── 1526. Minimum Number of Increments on Subarrays to Form a Target Array.txt ├── 1528. Shuffle String.txt ├── 1529. Bulb Switcher IV.txt ├── 1530. Number of Good Leaf Nodes Pairs.txt ├── 1531 3504ms.py ├── 1531. String Compression II 20ms.cpp ├── 1531. String Compression II.pdf ├── 1531_4ms_cn.png ├── 1533. Find the Index of the Large Integer.txt ├── 1534. Count Good Triplets.txt ├── 1535. Find the Winner of an Array Game.txt ├── 1536. Minimum Swaps to Arrange a Binary Grid.txt ├── 1537. Get the Maximum Score.txt ├── 1538. Guess the Majority in a Hidden Array.pdf ├── 1539. Kth Missing Positive Number.txt ├── 1540. Can Convert String in K Moves.txt ├── 1541. Minimum Insertions to Balance a Parentheses String.txt ├── 1542. Find Longest Awesome Substring.pdf ├── 1544. Make The String Great.txt ├── 1545. Find Kth Bit in Nth Binary String.txt ├── 1546. Maximum Number of Non-Overlapping Subarrays With Sum Equals Target 124ms.cpp ├── 1546. Maximum Number of Non-Overlapping Subarrays With Sum Equals Target 176ms.cpp ├── 1546. Maximum Number of Non-Overlapping Subarrays With Sum Equals Target.pdf ├── 1547. Minimum Cost to Cut a Stick.txt ├── 1548. The Most Similar Path in a Graph.txt ├── 1550. Three Consecutive Odds.txt ├── 1551. Minimum Operations to Make Array Equal.txt ├── 1553. Minimum Number of Days to Eat N Oranges.pdf ├── 1554. Strings Differ by One Character 20ms.cpp ├── 1554. Strings Differ by One Character.pdf ├── 1556. Thousand Separator.txt ├── 1557. Minimum Number of Vertices to Reach All Nodes.txt ├── 1558. Minimum Numbers of Function Calls to Make Target Array 8ms.cpp ├── 1558. Minimum Numbers of Function Calls to Make Target Array.pdf ├── 1559. Detect Cycles in 2D Grid.txt ├── 1560. Most Visited Sector in a Circular Track.txt ├── 1561. Maximum Number of Coins You Can Get.txt ├── 1562. Find Latest Group of Size M 152ms.cpp ├── 1562. Find Latest Group of Size M.pdf ├── 1563. Stone Game V.txt ├── 1564. Put Boxes Into the Warehouse I 152ms.cpp ├── 1564. Put Boxes Into the Warehouse I.pdf ├── 1566. Detect Pattern of Length M Repeated K or More Times.txt ├── 1567. Maximum Length of Subarray With Positive Product.txt ├── 1568. Minimum Number of Days to Disconnect Island.txt ├── 1569. Number of Ways to Reorder Array to Get Same BST.txt ├── 1570. Dot Product of Two Sparse Vectors.txt ├── 1572. Matrix Diagonal Sum.txt ├── 1573. Number of Ways to Split a String.txt ├── 1574. Shortest Subarray to be Removed to Make Array Sorted.txt ├── 1575. Count All Possible Routes.txt ├── 1576. Replace All ?'s to Avoid Consecutive Repeating Characters.txt ├── 1577. Number of Ways Where Square of Number Is Equal to Product of Two Numbers.txt ├── 1578. Minimum Deletion Cost to Avoid Repeating Letters.txt ├── 1579. Remove Max Number of Edges to Keep Graph Fully Traversable.txt ├── 1580. Put Boxes Into the Warehouse II 160ms.cpp ├── 1580. Put Boxes Into the Warehouse II.pdf ├── 1582. Special Positions in a Binary Matrix.txt ├── 1583. Count Unhappy Friends.txt ├── 1584. Min Cost to Connect All Points.pdf ├── 1586. Binary Search Tree Iterator II.txt ├── 1588. Sum of All Odd Length Subarrays.txt ├── 1589. Maximum Sum Obtained of Any Permutation.txt ├── 1590. Make Sum Divisible by P 124ms.cpp ├── 1590. Make Sum Divisible by P.pdf ├── 1591. Strange Printer II.txt ├── 1592. Rearrange Spaces Between Words.txt ├── 1593. Split a String Into the Max Number of Unique Substrings.txt ├── 1594. Maximum Non Negative Product in a Matrix.txt ├── 1595. Minimum Cost to Connect Two Groups of Points.pdf ├── 1597. Build Binary Expression Tree From Infix Expression.txt ├── 1598. Crawler Log Folder.txt ├── 1599. Maximum Profit of Operating a Centennial Wheel.txt └── 1600. Throne Inheritance.txt ├── 1601-1700 ├── 1601. Maximum Number of Achievable Transfer Requests.pdf ├── 1602. Find Nearest Right Node in Binary Tree.txt ├── 1603. Design Parking System.txt ├── 1604. Alert Using Same Key-Card Three or More Times in a One Hour Period.txt ├── 1605. Find Valid Matrix Given Row and Column Sums.txt ├── 1606. Find Servers That Handled Most Number of Requests 260ms.cpp ├── 1606. Find Servers That Handled Most Number of Requests.pdf ├── 1608. Special Array With X Elements Greater Than or Equal X.txt ├── 1609. Even Odd Tree.txt ├── 1610. Maximum Number of Visible Points.txt ├── 1611. Minimum One Bit Operations to Make Integers Zero.txt ├── 1612. Check If Two Expression Trees are Equivalent.txt ├── 1614. Maximum Nesting Depth of the Parentheses.txt ├── 1615. Maximal Network Rank.txt ├── 1616. Split Two Strings to Make Palindrome.txt ├── 1617. Count Subtrees With Max Distance Between Cities.pdf ├── 1618. Maximum Font to Fit a Sentence in a Screen.txt ├── 1619. Mean of Array After Removing Some Elements.txt ├── 1620. Coordinate With Maximum Network Quality.txt ├── 1621. Number of Sets of K Non-Overlapping Line Segments.txt ├── 1622. Fancy Sequence.pdf ├── 1624. Largest Substring Between Two Equal Characters.txt ├── 1625. Lexicographically Smallest String After Applying Operations.txt ├── 1626. Best Team With No Conflicts 8ms.cpp ├── 1626. Best Team With No Conflicts.pdf ├── 1627. Graph Connectivity With Threshold 272ms.cpp ├── 1627. Graph Connectivity With Threshold 284ms.cpp ├── 1627. Graph Connectivity With Threshold.pdf ├── 1628. Design an Expression Tree With Evaluate Function.txt ├── 1629. Slowest Key.txt ├── 1630. Arithmetic Subarrays 36ms.cpp ├── 1630. Arithmetic Subarrays.pdf ├── 1631. Path With Minimum Effort.txt ├── 1632. Rank Transform of a Matrix.txt ├── 1634. Add Two Polynomials Represented as Linked Lists.txt ├── 1636. Sort Array by Increasing Frequency.txt ├── 1637. Widest Vertical Area Between Two Points Containing No Points 308ms.cpp ├── 1637. Widest Vertical Area Between Two Points Containing No Points.pdf ├── 1638. Count Substrings That Differ by One Character.pdf ├── 1639. Number of Ways to Form a Target String Given a Dictionary.txt ├── 1640. Check Array Formation Through Concatenation.txt ├── 1641. Count Sorted Vowel Strings.txt ├── 1642. Furthest Building You Can Reach.pdf ├── 1643. Kth Smallest Instructions.txt ├── 1644. Lowest Common Ancestor of a Binary Tree II.txt ├── 1646. Get Maximum in Generated Array.txt ├── 1647. Minimum Deletions to Make Character Frequencies Unique.txt ├── 1648. Sell Diminishing-Valued Colored Balls 156ms.cpp ├── 1648. Sell Diminishing-Valued Colored Balls.pdf ├── 1649. Create Sorted Array through Instructions.pdf ├── 1650. Lowest Common Ancestor of a Binary Tree III.txt ├── 1652. Defuse the Bomb.txt ├── 1653. Minimum Deletions to Make String Balanced.txt ├── 1654. Minimum Jumps to Reach Home.txt ├── 1655. Distribute Repeating Integers 40ms.cpp ├── 1655. Distribute Repeating Integers.pdf ├── 1656. Design an Ordered Stream.txt ├── 1657. Determine if Two Strings Are Close.txt ├── 1658. Minimum Operations to Reduce X to Zero.txt ├── 1659. Maximize Grid Happiness.txt ├── 1660. Correct a Binary Tree.txt ├── 1662. Check If Two String Arrays are Equivalent.txt ├── 1663. Smallest String With A Given Numeric Value.txt ├── 1664. Ways to Make a Fair Array.txt ├── 1665. Minimum Initial Energy to Finish Tasks.txt ├── 1666. Change the Root of a Binary Tree.txt ├── 1668. Maximum Repeating Substring.txt ├── 1669. Merge In Between Linked Lists.txt ├── 1670. Design Front Middle Back Queue.txt ├── 1671. Minimum Number of Removals to Make Mountain Array.txt ├── 1672. Richest Customer Wealth.txt ├── 1673. Find the Most Competitive Subsequence.txt ├── 1675. Minimize Deviation in Array 196ms.cpp ├── 1675. Minimize Deviation in Array 56ms.cpp ├── 1675. Minimize Deviation in Array.pdf ├── 1676. Lowest Common Ancestor of a Binary Tree IV.txt ├── 1678. Goal Parser Interpretation.txt ├── 1679. Max Number of K-Sum Pairs 212ms.cpp ├── 1679. Max Number of K-Sum Pairs.pdf ├── 1680. Concatenation of Consecutive Binary Numbers.txt ├── 1681. Minimum Incompatibility.txt ├── 1682. Longest Palindromic Subsequence II.txt ├── 1684. Count the Number of Consistent Strings.txt ├── 1685. Sum of Absolute Differences in a Sorted Array.txt ├── 1686. Stone Game VI.txt ├── 1687. Delivering Boxes from Storage to Ports.txt ├── 1688. Count of Matches in Tournament.txt ├── 1689. Partitioning Into Minimum Number Of Deci-Binary Numbers.txt ├── 1690. Stone Game VII.txt ├── 1691. Maximum Height by Stacking Cuboids.txt ├── 1692. Count Ways to Distribute Candies.pdf ├── 1694. Reformat Phone Number.txt ├── 1695. Maximum Erasure Value.txt ├── 1696. Jump Game VI.txt ├── 1697. Checking Existence of Edge Length Limited Paths.pdf ├── 1698. Number of Distinct Substrings in a String.txt └── 1700. Number of Students Unable to Eat Lunch.txt ├── 1701-1800 ├── 1701. Average Waiting Time.txt ├── 1702. Maximum Binary String After Change.txt ├── 1703. Minimum Adjacent Swaps for K Consecutive Ones.txt ├── 1704. Determine if String Halves Are Alike.txt ├── 1705. Maximum Number of Eaten Apples 44ms.cpp ├── 1705. Maximum Number of Eaten Apples.pdf ├── 1706. Where Will the Ball Fall.txt ├── 1707. Maximum XOR With an Element From Array 424ms.cpp ├── 1707. Maximum XOR With an Element From Array.pdf ├── 1708. Largest Subarray Length K.txt ├── 1710. Maximum Units on a Truck.txt ├── 1711. Count Good Meals 108ms.cpp ├── 1711. Count Good Meals.pdf ├── 1712. Ways to Split Array Into Three Subarrays.txt ├── 1713. Minimum Operations to Make a Subsequence 224ms.cpp ├── 1713. Minimum Operations to Make a Subsequence.pdf ├── 1714. Sum Of Special Evenly-Spaced Elements In Array 412ms_avx.cpp ├── 1714. Sum Of Special Evenly-Spaced Elements In Array.pdf ├── 1716. Calculate Money in Leetcode Bank.txt ├── 1717. Maximum Score From Removing Substrings.txt ├── 1718. Construct the Lexicographically Largest Valid Sequence.txt ├── 1719. Number Of Ways To Reconstruct A Tree.txt ├── 1720. Decode XORed Array.txt ├── 1721. Swapping Nodes in a Linked List.txt ├── 1722. Minimize Hamming Distance After Swap Operations.txt ├── 1723. Find Minimum Time to Finish All Jobs.pdf ├── 1724. Checking Existence of Edge Length Limited Paths II.txt ├── 1725. Number Of Rectangles That Can Form The Largest Square.txt ├── 1726. Tuple with Same Product 64ms_array.cpp ├── 1726. Tuple with Same Product 68ms.cpp ├── 1726. Tuple with Same Product.pdf ├── 1727. Largest Submatrix With Rearrangements.txt ├── 1728. Cat and Mouse II.txt ├── 1730. Shortest Path to Get Food.txt ├── 1732. Find the Highest Altitude.txt ├── 1733. Minimum Number of People to Teach.txt ├── 1734. Decode XORed Permutation.txt ├── 1735. Count Ways to Make Array With Product.pdf ├── 1736. Latest Time by Replacing Hidden Digits.txt ├── 1737. Change Minimum Characters to Satisfy One of Three Conditions.txt ├── 1738. Find Kth Largest XOR Coordinate Value.txt ├── 1739. Building Boxes.txt ├── 1740. Find Distance in a Binary Tree.txt ├── 1742. Maximum Number of Balls in a Box.txt ├── 1743. Restore the Array From Adjacent Pairs.txt ├── 1744. Can You Eat Your Favorite Candy on Your Favorite Day.txt ├── 1745. Palindrome Partitioning IV 12ms.cpp ├── 1745. Palindrome Partitioning IV.txt ├── 1746. Maximum Subarray Sum After One Operation.txt ├── 1748. Sum of Unique Elements.txt ├── 1749. Maximum Absolute Sum of Any Subarray.txt ├── 1750. Minimum Length of String After Deleting Similar Ends.txt ├── 1751. Maximum Number of Events That Can Be Attended II.txt ├── 1752. Check if Array Is Sorted and Rotated.txt ├── 1753. Maximum Score From Removing Stones.txt ├── 1754. Largest Merge Of Two Strings.txt ├── 1755. Closest Subsequence Sum.txt ├── 1756. Design Most Recently Used Queue.txt ├── 1758. Minimum Changes To Make Alternating Binary String.txt ├── 1759. Count Number of Homogenous Substrings.txt ├── 1760. Minimum Limit of Balls in a Bag 48ms_sampling.cpp ├── 1760. Minimum Limit of Balls in a Bag 60ms.cpp ├── 1760. Minimum Limit of Balls in a Bag.pdf ├── 1761. Minimum Degree of a Connected Trio in a Graph 116ms_BMM.cpp ├── 1761. Minimum Degree of a Connected Trio in a Graph 80ms.cpp ├── 1761. Minimum Degree of a Connected Trio in a Graph.pdf ├── 1762. Buildings With an Ocean View.txt ├── 1764. Form Array by Concatenating Subarrays of Another Array.txt ├── 1765. Map of Highest Peak.txt ├── 1766. Tree of Coprimes.txt ├── 1768. Merge Strings Alternately.txt ├── 1769. Minimum Number of Operations to Move All Balls to Each Box.txt ├── 1770. Maximum Score from Performing Multiplication Operations.txt ├── 1771. Maximize Palindrome Length From Subsequences.txt ├── 1772. Sort Features by Popularity.txt ├── 1773. Count Items Matching a Rule.txt ├── 1774. Closest Dessert Cost.txt ├── 1775. Equal Sum Arrays With Minimum Number of Operations.txt ├── 1776. Car Fleet II.txt ├── 1778. Shortest Path in a Hidden Grid.txt ├── 1779. Find Nearest Point That Has the Same X or Y Coordinate.txt ├── 1780. Check if Number is a Sum of Powers of Three.txt ├── 1781. Sum of Beauty of All Substrings.txt ├── 1782. Count Pairs Of Nodes.txt ├── 1784. Check if Binary String Has at Most One Segment of Ones.txt ├── 1785. Minimum Elements to Add to Form a Given Sum.txt ├── 1786. Number of Restricted Paths From First to Last Node 324ms.cpp ├── 1786. Number of Restricted Paths From First to Last Node.txt ├── 1787. Make the XOR of All Segments Equal to Zero.txt ├── 1788. Maximize the Beauty of the Garden 28ms.cpp ├── 1788. Maximize the Beauty of the Garden.pdf ├── 1790. Check if One String Swap Can Make Strings Equal.txt ├── 1791. Find Center of Star Graph.txt ├── 1792. Maximum Average Pass Ratio 200ms.cpp ├── 1792. Maximum Average Pass Ratio.pdf ├── 1793. Maximum Score of a Good Subarray.txt ├── 1794. Count Pairs of Equal Substrings With Minimum Difference.txt ├── 1796. Second Largest Digit in a String.txt ├── 1797. Design Authentication Manager.txt ├── 1798. Maximum Number of Consecutive Values You Can Make.pdf ├── 1799. Maximize Score After N Operations.pdf └── 1800. Maximum Ascending Subarray Sum.txt ├── 1801-1900 ├── 1801. Number of Orders in the Backlog.txt ├── 1802. Maximum Value at a Given Index in a Bounded Array.txt ├── 1803. Count Pairs With XOR in a Range 108ms_avx.cpp ├── 1803. Count Pairs With XOR in a Range 1234ms_asm_avx.py ├── 1803. Count Pairs With XOR in a Range 1518ms_asm.py ├── 1803. Count Pairs With XOR in a Range 2783ms_asm.py ├── 1803. Count Pairs With XOR in a Range 32ms.cpp ├── 1803. Count Pairs With XOR in a Range 470ms_asm_avx512.py ├── 1803. Count Pairs With XOR in a Range 896ms_O(n^2).cpp ├── 1803. Count Pairs With XOR in a Range 96ms_avx512_cn.cpp ├── 1803. Count Pairs With XOR in a Range.pdf ├── 1804. Implement Trie II (Prefix Tree).txt ├── 1805. Number of Different Integers in a String.txt ├── 1806. Minimum Number of Operations to Reinitialize a Permutation.txt ├── 1807. Evaluate the Bracket Pairs of a String.txt ├── 1808. Maximize Number of Nice Divisors.pdf ├── 1810. Minimum Path Cost in a Hidden Grid.txt ├── 1812. Determine Color of a Chessboard Square.txt ├── 1813. Sentence Similarity III.txt ├── 1814. Count Nice Pairs in an Array 44ms.cpp ├── 1814. Count Nice Pairs in an Array.pdf ├── 1815. Maximum Number of Groups Getting Fresh Donuts.txt ├── 1816. Truncate Sentence.txt ├── 1817. Finding the Users Active Minutes 140ms.cpp ├── 1817. Finding the Users Active Minutes.pdf ├── 1818. Minimum Absolute Sum Difference.pdf ├── 1819. Number of Different Subsequences GCDs 104ms_cn.cpp ├── 1819. Number of Different Subsequences GCDs 112ms.cpp ├── 1819. Number of Different Subsequences GCDs.pdf ├── 1820. Maximum Number of Accepted Invitations.txt ├── 1822. Sign of the Product of an Array.txt ├── 1823. Find the Winner of the Circular Game.txt ├── 1824. Minimum Sideway Jumps.txt ├── 1825. Finding MK Average 228ms.cpp ├── 1825. Finding MK Average.pdf ├── 1826. Faulty Sensor.txt ├── 1827. Minimum Operations to Make the Array Increasing.txt ├── 1828. Queries on Number of Points Inside a Circle 24ms_avx.cpp ├── 1828. Queries on Number of Points Inside a Circle.pdf ├── 1829. Maximum XOR for Each Query.txt ├── 1830. Minimum Number of Operations to Make String Sorted 0ms.cpp ├── 1830. Minimum Number of Operations to Make String Sorted.pdf ├── 1832. Check if the Sentence Is Pangram.txt ├── 1833. Maximum Ice Cream Bars 56ms.cpp ├── 1833. Maximum Ice Cream Bars.pdf ├── 1834. Single-Threaded CPU 244ms.cpp ├── 1834. Single-Threaded CPU.pdf ├── 1835. Find XOR Sum of All Pairs Bitwise AND.txt ├── 1836. Remove Duplicates From an Unsorted Linked List.txt ├── 1837. Sum of Digits in Base K.txt ├── 1838. Frequency of the Most Frequent Element.txt ├── 1839. Longest Substring Of All Vowels in Order.txt ├── 1840. Maximum Building Height.txt ├── 1842. Next Palindrome Using Same Digits.txt ├── 1844. Replace All Digits with Characters.txt ├── 1845. Seat Reservation Manager 228ms.cpp ├── 1845. Seat Reservation Manager.pdf ├── 1846. Maximum Element After Decreasing and Rearranging.txt ├── 1847. Closest Room.pdf ├── 1848. Minimum Distance to the Target Element.txt ├── 1849. Splitting a String Into Descending Consecutive Values.txt ├── 1850. Minimum Adjacent Swaps to Reach the Kth Smallest Number.txt ├── 1851. Minimum Interval to Include Each Query.txt ├── 1852. Distinct Numbers in Each Subarray 96ms.cpp ├── 1852. Distinct Numbers in Each Subarray.pdf ├── 1854. Maximum Population Year.txt ├── 1855. Maximum Distance Between a Pair of Values.txt ├── 1856. Maximum Subarray Min-Product.txt ├── 1857. Largest Color Value in a Directed Graph 276ms_avx.cpp ├── 1857. Largest Color Value in a Directed Graph.pdf ├── 1858. Longest Word With All Prefixes 36ms.cpp ├── 1858. Longest Word With All Prefixes.pdf ├── 1859. Sorting the Sentence.txt ├── 1860. Incremental Memory Leak.txt ├── 1861. Rotating the Box.txt ├── 1862. Sum of Floored Pairs 96ms.cpp ├── 1862. Sum of Floored Pairs.pdf ├── 1863. Sum of All Subset XOR Totals 0ms.cpp ├── 1863. Sum of All Subset XOR Totals.txt ├── 1864. Minimum Number of Swaps to Make the Binary String Alternating.txt ├── 1865. Finding Pairs With a Certain Sum 76ms.cpp ├── 1865. Finding Pairs With a Certain Sum.pdf ├── 1866. Number of Ways to Rearrange Sticks With K Sticks Visible.pdf ├── 1868. Product of Two Run-Length Encoded Arrays.txt ├── 1869. Longer Contiguous Segments of Ones than Zeros.txt ├── 1870. Minimum Speed to Arrive on Time 112ms.cpp ├── 1870. Minimum Speed to Arrive on Time.pdf ├── 1871. Jump Game VII.txt ├── 1872. Stone Game VIII.txt ├── 1874. Minimize Product Sum of Two Arrays.txt ├── 1876. Substrings of Size Three with Distinct Characters.txt ├── 1877. Minimize Maximum Pair Sum in Array.txt ├── 1878. Get Biggest Three Rhombus Sums in a Grid.txt ├── 1879. Minimum XOR Sum of Two Arrays.txt ├── 1880. Check if Word Equals Summation of Two Words.txt ├── 1881. Maximum Value after Insertion.txt ├── 1882. Process Tasks Using Servers.txt ├── 1883. Minimum Skips to Arrive at Meeting On Time.txt ├── 1884. Egg Drop With 2 Eggs and N Floors.txt ├── 1885. Count Pairs in Two Arrays.txt ├── 1886. Determine Whether Matrix Can Be Obtained By Rotation.txt ├── 1887. Reduction Operations to Make the Array Elements Equal.txt ├── 1888. Minimum Number of Flips to Make the Binary String Alternating.txt ├── 1889. Minimum Space Wasted From Packaging.txt ├── 1891. Cutting Ribbons.txt ├── 1893. Check if All the Integers in a Range Are Covered.txt ├── 1894. Find the Student that Will Replace the Chalk.txt ├── 1895. Largest Magic Square.txt ├── 1896. Minimum Cost to Change the Final Value of Expression.txt ├── 1897. Redistribute Characters to Make All Strings Equal.txt ├── 1898. Maximum Number of Removable Characters.txt ├── 1899. Merge Triplets to Form Target Triplet.txt └── 1900. The Earliest and Latest Rounds Where Players Compete.txt ├── 1901-2000 ├── 1901. Find a Peak Element II.txt ├── 1902. Depth of BST Given Insertion Order.txt ├── 1903. Largest Odd Number in String.txt ├── 1904. The Number of Full Rounds You Have Played.txt ├── 1905. Count Sub Islands.txt ├── 1906. Minimum Absolute Difference Queries 108ms.cpp ├── 1906. Minimum Absolute Difference Queries.pdf ├── 1908. Game of Nim.txt ├── 1909. Remove One Element to Make the Array Strictly Increasing.txt ├── 1910. Remove All Occurrences of a Substring.txt ├── 1911. Maximum Alternating Subsequence Sum.txt ├── 1912. Design Movie Rental System.txt ├── 1913. Maximum Product Difference Between Two Pairs.txt ├── 1914. Cyclically Rotating a Grid.txt ├── 1915. Number of Wonderful Substrings.pdf ├── 1916. Count Ways to Build Rooms in an Ant Colony.txt ├── 1918. Kth Smallest Subarray Sum.txt ├── 1920. Build Array from Permutation.txt ├── 1921. Eliminate Maximum Number of Monsters.txt ├── 1922. Count Good Numbers.txt ├── 1923. Longest Common Subpath.txt ├── 1924. Erect the Fence II 60ms_cn.cpp ├── 1924. Erect the Fence II.txt ├── 1925. Count Square Sum Triples 0ms.cpp ├── 1925. Count Square Sum Triples.txt ├── 1926. Nearest Exit from Entrance in Maze.txt ├── 1927. Sum Game.txt ├── 1928. Minimum Cost to Reach Destination in Time.txt ├── 1929. Concatenation of Array.txt ├── 1930. Unique Length-3 Palindromic Subsequences.txt ├── 1931. Painting a Grid With Three Different Colors.txt ├── 1932. Merge BSTs to Create Single BST.txt ├── 1933. Check if String Is Decomposable Into Value-Equal Substrings.txt ├── 1935. Maximum Number of Words You Can Type.txt ├── 1936. Add Minimum Number of Rungs.txt ├── 1937. Maximum Number of Points with Cost.txt ├── 1938. Maximum Genetic Difference Query.pdf ├── 1940. Longest Common Subsequence Between Sorted Arrays.txt ├── 1941. Check if All Characters Have Equal Number of Occurrences.txt ├── 1942. The Number of the Smallest Unoccupied Chair.txt ├── 1943. Describe the Painting.txt ├── 1944. Number of Visible People in a Queue.txt ├── 1945. Sum of Digits of String After Convert.txt ├── 1946. Largest Number After Mutating Substring.txt ├── 1947. Maximum Compatibility Score Sum.pdf ├── 1948. Delete Duplicate Folders in System 404ms.cpp ├── 1948. Delete Duplicate Folders in System.pdf ├── 1950. Maximum of Minimum Values in All Subarrays.txt ├── 1952. Three Divisors.txt ├── 1953. Maximum Number of Weeks for Which You Can Work.txt ├── 1954. Minimum Garden Perimeter to Collect Enough Apples.txt ├── 1955. Count Number of Special Subsequences.txt ├── 1956. Minimum Time For K Virus Variants to Spread.txt ├── 1957. Delete Characters to Make Fancy String.txt ├── 1958. Check if Move is Legal.txt ├── 1959. Minimum Total Space Wasted With K Resizing Operations.pdf ├── 1960. Maximum Product of the Length of Two Palindromic Substrings.txt ├── 1961. Check If String Is a Prefix of Array.txt ├── 1962. Remove Stones to Minimize the Total 64ms.cpp ├── 1962. Remove Stones to Minimize the Total.pdf ├── 1963. Minimum Number of Swaps to Make the String Balanced.txt ├── 1964. Find the Longest Valid Obstacle Course at Each Position 148ms.cpp ├── 1964. Find the Longest Valid Obstacle Course at Each Position.pdf ├── 1966. Binary Searchable Numbers in an Unsorted Array.txt ├── 1967. Number of Strings That Appear as Substrings in Word.txt ├── 1968. Array With Elements Not Equal to Average of Neighbors.txt ├── 1969. Minimum Non-Zero Product of the Array Elements.txt ├── 1970. Last Day Where You Can Still Cross.txt ├── 1971. Find if Path Exists in Graph.txt ├── 1973. Count Nodes Equal to Sum of Descendants.txt ├── 1974. Minimum Time to Type Word Using Special Typewriter.txt ├── 1975. Maximum Matrix Sum.txt ├── 1976. Number of Ways to Arrive at Destination.txt ├── 1977. Number of Ways to Separate Numbers.txt ├── 1979. Find Greatest Common Divisor of Array.txt ├── 1980. Find Unique Binary String.txt ├── 1981. Minimize the Difference Between Target and Chosen Elements.txt ├── 1982. Find Array Given Subset Sums.txt ├── 1983. Widest Pair of Indices With Equal Range Sum.txt ├── 1984. Minimum Difference Between Highest and Lowest of K Scores.txt ├── 1985. Find the Kth Largest Integer in the Array.txt ├── 1986. Minimum Number of Work Sessions to Finish the Tasks.txt ├── 1987. Number of Unique Good Subsequences.txt ├── 1989. Maximum Number of People That Can Be Caught in Tag.txt ├── 1991. Find the Middle Index in Array.txt ├── 1992. Find All Groups of Farmland.txt ├── 1993. Operations on Tree.pdf ├── 1994. The Number of Good Subsets.txt ├── 1995. Count Special Quadruplets.txt ├── 1996. The Number of Weak Characters in the Game.txt ├── 1997. First Day Where You Have Been in All the Rooms.txt ├── 1998. GCD Sort of an Array.pdf ├── 1999. Smallest Greater Multiple Made of Two Digits.txt └── 2000. Reverse Prefix of Word.txt ├── 2001-2100 ├── 2001. Number of Pairs of Interchangeable Rectangles.txt ├── 2002. Maximum Product of the Length of Two Palindromic Subsequences 0ms_O(2^n).cpp ├── 2002. Maximum Product of the Length of Two Palindromic Subsequences 8ms_O(2^{0.5n}).cpp ├── 2002. Maximum Product of the Length of Two Palindromic Subsequences.pdf ├── 2003. Smallest Missing Genetic Value in Each Subtree.txt ├── 2005. Subtree Removal Game with Fibonacci Tree.txt ├── 2006. Count Number of Pairs With Absolute Difference K.txt ├── 2007. Find Original Array From Doubled Array 108ms.cpp ├── 2007. Find Original Array From Doubled Array.pdf ├── 2007. Find Original Array From Doubled Array.txt ├── 2008. Maximum Earnings From Taxi.txt ├── 2009. Minimum Number of Operations to Make Array Continuous 434ms_O(n)_unordered_map.cpp ├── 2009. Minimum Number of Operations to Make Array Continuous 72ms_sort.cpp ├── 2009. Minimum Number of Operations to Make Array Continuous.pdf ├── 2011. Final Value of Variable After Performing Operations.txt ├── 2012. Sum of Beauty in the Array.txt ├── 2013. Detect Squares 152ms.cpp ├── 2013. Detect Squares.pdf ├── 2014. Longest Subsequence Repeated k Times 40ms_cn.cpp ├── 2014. Longest Subsequence Repeated k Times.pdf ├── 2015. Average Height of Buildings in Each Segment.txt ├── 2016. Maximum Difference Between Increasing Elements.txt ├── 2017. Grid Game.txt ├── 2018. Check if Word Can Be Placed In Crossword.txt ├── 2019. The Score of Students Solving Math Expression.txt ├── 2021. Brightest Position on Street.txt ├── 2022. Convert 1D Array Into 2D Array.txt ├── 2023. Number of Pairs of Strings With Concatenation Equal to Target.txt ├── 2024. Maximize the Confusion of an Exam.txt ├── 2025. Maximum Number of Ways to Partition an Array.txt ├── 2027. Minimum Moves to Convert String.txt ├── 2028. Find Missing Observations.txt ├── 2029. Stone Game IX.txt ├── 2030. Smallest K-Length Subsequence With Occurrences of a Letter.txt ├── 2031. Count Subarrays With More Ones Than Zeros.txt ├── 2032. Two Out of Three.txt ├── 2033. Minimum Operations to Make a Uni-Value Grid.txt ├── 2034. Stock Price Fluctuation.txt ├── 2035. Partition Array Into Two Arrays to Minimize Sum Difference.txt ├── 2036. Maximum Alternating Subarray Sum.txt ├── 2037. Minimum Number of Moves to Seat Everyone.txt ├── 2038. Remove Colored Pieces if Both Neighbors are the Same Color.txt ├── 2039. The Time When the Network Becomes Idle.txt ├── 2040. Kth Smallest Product of Two Sorted Arrays 196ms.cpp ├── 2040. Kth Smallest Product of Two Sorted Arrays.pdf ├── 2042. Check if Numbers Are Ascending in a Sentence.txt ├── 2043. Simple Bank System.txt ├── 2044. Count Number of Maximum Bitwise-OR Subsets.txt ├── 2045. Second Minimum Time to Reach Destination.txt ├── 2046. Sort Linked List Already Sorted Using Absolute Values.txt ├── 2047. Number of Valid Words in a Sentence.txt ├── 2048. Next Greater Numerically Balanced Number.txt ├── 2049. Count Nodes With the Highest Score.txt ├── 2050. Parallel Courses III.txt ├── 2052. Minimum Cost to Separate Sentence Into Rows.txt ├── 2053. Kth Distinct String in an Array.txt ├── 2054. Two Best Non-Overlapping Events.txt ├── 2055. Plates Between Candles.txt ├── 2056. Number of Valid Move Combinations On Chessboard.txt ├── 2057. Smallest Index With Equal Value.txt ├── 2058. Find the Minimum and Maximum Number of Nodes Between Critical Points.txt ├── 2059. Minimum Operations to Convert Number.txt ├── 2060. Check if an Original String Exists Given Two Encoded Strings.txt ├── 2061. Number of Spaces Cleaning Robot Cleaned.txt ├── 2062. Count Vowel Substrings of a String.txt ├── 2063. Vowels of All Substrings.txt ├── 2064. Minimized Maximum of Products Distributed to Any Store 92ms.cpp ├── 2064. Minimized Maximum of Products Distributed to Any Store.pdf ├── 2065. Maximum Path Quality of a Graph.txt ├── 2068. Check Whether Two Strings are Almost Equivalent.txt ├── 2069. Walking Robot Simulation II.txt ├── 2070. Most Beautiful Item for Each Query.txt ├── 2071. Maximum Number of Tasks You Can Assign.txt ├── 2073. Time Needed to Buy Tickets.txt ├── 2074. Reverse Nodes in Even Length Groups.txt ├── 2075. Decode the Slanted Ciphertext.txt ├── 2076. Process Restricted Friend Requests 32ms.cpp ├── 2076. Process Restricted Friend Requests.pdf ├── 2077. Paths in Maze That Lead to Same Room.pdf ├── 2078. Two Furthest Houses With Different Colors.txt ├── 2079. Watering Plants.txt ├── 2080. Range Frequency Queries.txt ├── 2081. Sum of k-Mirror Numbers.txt ├── 2083. Substrings That Begin and End With the Same Letter.txt ├── 2085. Count Common Words With One Occurrence.txt ├── 2086. Minimum Number of Buckets Required to Collect Rainwater from Houses.txt ├── 2087. Minimum Cost Homecoming of a Robot in a Grid.txt ├── 2088. Count Fertile Pyramids in a Land.txt ├── 2089. Find Target Indices After Sorting Array.txt ├── 2090. K Radius Subarray Averages.txt ├── 2091. Removing Minimum and Maximum From Array.txt ├── 2092. Find All People With Secret.txt ├── 2093. Minimum Cost to Reach City With Discounts.txt ├── 2094. Finding 3-Digit Even Numbers.txt ├── 2095. Delete the Middle Node of a Linked List.txt ├── 2096. Step-By-Step Directions From a Binary Tree Node to Another.txt ├── 2097. Valid Arrangement of Pairs.txt ├── 2098. Subsequence of Size K With the Largest Even Sum.txt ├── 2099. Find Subsequence of Length K With the Largest Sum.txt ├── 2100. Find Good Days to Rob the Bank.txt └── 2184. Number of Ways to Build Sturdy Brick Wall.txt ├── 2101-2200 ├── 2101. Detonate the Maximum Bombs.pdf ├── 2102. Sequentially Ordinal Rank Tracker.pdf ├── 2103. Rings and Rods.txt ├── 2104. Sum of Subarray Ranges.txt ├── 2105. Watering Plants II.txt ├── 2106. Maximum Fruits Harvested After at Most K Steps.txt ├── 2107. Number of Unique Flavors After Sharing K Candies.txt ├── 2108. Find First Palindromic String in the Array.txt ├── 2109. Adding Spaces to a String.txt ├── 2110. Number of Smooth Descent Periods of a Stock.txt ├── 2111. Minimum Operations to Make the Array K-Increasing.txt ├── 2113. Elements in Array After Removing and Replacing Elements.txt ├── 2114. Maximum Number of Words Found in Sentences.txt ├── 2115. Find All Possible Recipes from Given Supplies.txt ├── 2116. Check if a Parentheses String Can Be Valid.txt ├── 2117. Abbreviating the Product of a Range 0ms.cpp ├── 2117. Abbreviating the Product of a Range.pdf ├── 2117. Abbreviating the Product of a Range_float128.cpp ├── 2119. A Number After a Double Reversal.txt ├── 2120. Execution of All Suffix Instructions Staying in a Grid.txt ├── 2121. Intervals Between Identical Elements.txt ├── 2123. Minimum Operations to Remove Adjacent Ones in Matrix.pdf ├── 2124. Check if All A's Appears Before All B's.txt ├── 2125. Number of Laser Beams in a Bank.txt ├── 2126. Destroying Asteroids 84ms.cpp ├── 2126. Destroying Asteroids.pdf ├── 2127. Maximum Employees to Be Invited to a Meeting.txt ├── 2128. Remove All Ones With Row and Column Flips.txt ├── 2129. Capitalize the Title.txt ├── 2130. Maximum Twin Sum of a Linked List.txt ├── 2131. Longest Palindrome by Concatenating Two Letter Words.txt ├── 2132. Stamping the Grid.txt ├── 2133. Check if Every Row and Column Contains All Numbers.txt ├── 2134. Minimum Swaps to Group All 1's Together II.txt ├── 2135. Count Words Obtained After Adding a Letter.txt ├── 2136. Earliest Possible Day of Full Bloom.txt ├── 2137. Pour Water Between Buckets to Make Water Levels Equal.txt ├── 2138. Divide a String Into Groups of Size k.txt ├── 2139. Minimum Moves to Reach Target Score.txt ├── 2140. Solving Questions With Brainpower.txt ├── 2141. Maximum Running Time of N Computers 60ms.cpp ├── 2141. Maximum Running Time of N Computers.pdf ├── 2143. Choose Numbers From Two Arrays in Range.txt ├── 2144. Minimum Cost of Buying Candies With Discount.txt ├── 2145. Count the Hidden Sequences.txt ├── 2146. K Highest Ranked Items Within a Price Range.txt ├── 2147. Number of Ways to Divide a Long Corridor.txt ├── 2148. Count Elements With Strictly Smaller and Greater Elements.txt ├── 2149. Rearrange Array Elements by Sign.txt ├── 2150. Find All Lonely Numbers in the Array.txt ├── 2151. Maximum Good People Based on Statements 0ms.cpp ├── 2151. Maximum Good People Based on Statements.pdf ├── 2152. Minimum Number of Lines to Cover Points.pdf ├── 2154. Keep Multiplying Found Values by Two.txt ├── 2155. All Divisions With the Highest Score of a Binary Array.txt ├── 2156. Find Substring With Given Hash Value.txt ├── 2157. Groups of Strings 156ms.cpp ├── 2157. Groups of Strings.pdf ├── 2158. Amount of New Area Painted Each Day.txt ├── 2160. Minimum Sum of Four Digit Number After Splitting Digits.txt ├── 2161. Partition Array According to Given Pivot.txt ├── 2162. Minimum Cost to Set Cooking Time.txt ├── 2163. Minimum Difference in Sums After Removal of Elements.txt ├── 2164. Sort Even and Odd Indices Independently.txt ├── 2165. Smallest Value of the Rearranged Number.txt ├── 2166. Design Bitset.txt ├── 2167. Minimum Time to Remove All Cars Containing Illegal Goods.txt ├── 2168. Unique Substrings With Equal Digit Frequency.txt ├── 2169. Count Operations to Obtain Zero.txt ├── 2170. Minimum Operations to Make the Array Alternating.txt ├── 2171. Removing Minimum Number of Magic Beans.txt ├── 2172. Maximum AND Sum of Array.txt ├── 2174. Remove All Ones With Row and Column Flips II.txt ├── 2176. Count Equal and Divisible Pairs in an Array.pdf ├── 2177. Find Three Consecutive Integers That Sum to a Given Number.txt ├── 2178. Maximum Split of Positive Even Integers.txt ├── 2179. Count Good Triplets in an Array.txt ├── 2180. Count Integers With Even Digit Sum.txt ├── 2181. Merge Nodes in Between Zeros.txt ├── 2182. Construct String With Repeat Limit.txt ├── 2183. Count Array Pairs Divisible by K 72ms.cpp ├── 2183. Count Array Pairs Divisible by K.pdf ├── 2184. Number of Ways to Build Sturdy Brick Wall.txt ├── 2185. Counting Words With a Given Prefix.txt ├── 2186. Minimum Number of Steps to Make Two Strings Anagram II.txt ├── 2187. Minimum Time to Complete Trips 116ms.cpp ├── 2187. Minimum Time to Complete Trips.pdf ├── 2188. Minimum Time to Finish the Race 492ms.cpp ├── 2188. Minimum Time to Finish the Race.pdf ├── 2189. Number of Ways to Build House of Cards.txt ├── 2190. Most Frequent Number Following Key In an Array.txt ├── 2191. Sort the Jumbled Numbers.txt ├── 2192. All Ancestors of a Node in a Directed Acyclic Graph.txt ├── 2193. Minimum Number of Moves to Make Palindrome.pdf ├── 2194. Cells in a Range on an Excel Sheet.txt ├── 2195. Append K Integers With Minimal Sum 52ms.cpp ├── 2195. Append K Integers With Minimal Sum.pdf ├── 2196. Create Binary Tree From Descriptions.txt ├── 2197. Replace Non-Coprime Numbers in Array.pdf ├── 2198. Number of Single Divisor Triplets.pdf └── 2200. Find All K-Distant Indices in an Array.txt ├── 2201-2300 ├── 2201. Count Artifacts That Can Be Extracted.txt ├── 2202. Maximize the Topmost Element After K Moves.txt ├── 2203. Minimum Weighted Subgraph With the Required Paths.txt ├── 2204. Distance to a Cycle in Undirected Graph.txt ├── 2206. Divide Array Into Equal Pairs.txt ├── 2207. Maximize Number of Subsequences in a String.txt ├── 2208. Minimum Operations to Halve Array Sum 120ms.cpp ├── 2208. Minimum Operations to Halve Array Sum.pdf ├── 2209. Minimum White Tiles After Covering With Carpets.txt ├── 2210. Count Hills and Valleys in an Array.txt ├── 2211. Count Collisions on a Road.txt ├── 2212. Maximum Points in an Archery Competition.txt ├── 2213. Longest Substring of One Repeating Character.txt ├── 2214. Minimum Health to Beat Game.txt ├── 2215. Find the Difference of Two Arrays.txt ├── 2216. Minimum Deletions to Make Array Beautiful.txt ├── 2217. Find Palindrome With Fixed Length.txt ├── 2218. Maximum Value of K Coins From Piles.txt ├── 2219. Maximum Sum Score of Array.txt ├── 2220. Minimum Bit Flips to Convert Number.txt ├── 2221. Find Triangular Sum of an Array.txt ├── 2222. Number of Ways to Select Buildings.txt ├── 2223. Sum of Scores of Built Strings.txt ├── 2224. Minimum Number of Operations to Convert Time.txt ├── 2225. Find Players With Zero or One Losses.txt ├── 2226. Maximum Candies Allocated to K Children.txt ├── 2227. Encrypt and Decrypt Strings.txt ├── 2229. Check if an Array Is Consecutive.txt ├── 2231. Largest Number After Digit Swaps by Parity.txt ├── 2232. Minimize Result by Adding Parentheses to Expression.txt ├── 2233. Maximum Product After K Increments 117ms.cpp ├── 2233. Maximum Product After K Increments.pdf ├── 2234. Maximum Total Beauty of the Gardens.txt ├── 2235. Add Two Integers.txt ├── 2236. Root Equals Sum of Children.txt ├── 2237. Count Positions on Street With Required Brightness.txt ├── 2239. Find Closest Number to Zero.txt ├── 2240. Number of Ways to Buy Pens and Pencils.txt ├── 2241. Design an ATM Machine.txt ├── 2242. Maximum Score of a Node Sequence.txt ├── 2243. Calculate Digit Sum of a String.txt ├── 2244. Minimum Rounds to Complete All Tasks.txt ├── 2245. Maximum Trailing Zeros in a Cornered Path.txt ├── 2246. Longest Path With Different Adjacent Characters.txt ├── 2247. Maximum Cost of Trip With K Highways.txt ├── 2248. Intersection of Multiple Arrays.txt ├── 2249. Count Lattice Points Inside a Circle.txt ├── 2250. Count Number of Rectangles Containing Each Point.txt ├── 2251. Number of Flowers in Full Bloom.txt ├── 2254. Design Video Sharing Platform.txt ├── 2255. Count Prefixes of a Given String.txt ├── 2256. Minimum Average Difference.txt ├── 2257. Count Unguarded Cells in the Grid.txt ├── 2258. Escape the Spreading Fire.txt ├── 2259. Remove Digit From Number to Maximize Result.txt ├── 2260. Minimum Consecutive Cards to Pick Up.txt ├── 2261. K Divisible Elements Subarrays.txt ├── 2262. Total Appeal of A String.txt ├── 2264. Largest 3-Same-Digit Number in String.txt ├── 2265. Count Nodes Equal to Average of Subtree.txt ├── 2266. Count Number of Texts.txt ├── 2267. Check if There Is a Valid Parentheses String Path.txt ├── 2268. Minimum Number of Keypresses.txt ├── 2269. Find the K-Beauty of a Number.txt ├── 2270. Number of Ways to Split Array.txt ├── 2271. Maximum White Tiles Covered by a Carpet.txt ├── 2272. Substring With Largest Variance.txt ├── 2273. Find Resultant Array After Removing Anagrams.txt ├── 2274. Maximum Consecutive Floors Without Special Floors 97ms.cpp ├── 2274. Maximum Consecutive Floors Without Special Floors.pdf ├── 2275. Largest Combination With Bitwise AND Greater Than Zero 87ms.cpp ├── 2275. Largest Combination With Bitwise AND Greater Than Zero.pdf ├── 2276. Count Integers in Intervals.pdf ├── 2277. Closest Node to Path in Tree.txt ├── 2278. Percentage of Letter in String.txt ├── 2279. Maximum Bags With Full Capacity of Rocks.txt ├── 2280. Minimum Lines to Represent a Line Chart.txt ├── 2281. Sum of Total Strength of Wizards.txt ├── 2282. Number of People That Can Be Seen in a Grid.txt ├── 2283. Check if Number Has Equal Digit Count and Digit Value.txt ├── 2284. Sender With Largest Word Count.txt ├── 2285. Maximum Total Importance of Roads.txt ├── 2286. Booking Concert Tickets in Groups.txt ├── 2287. Rearrange Characters to Make Target String.txt ├── 2288. Apply Discount to Prices.txt ├── 2289. Steps to Make Array Non-decreasing.txt ├── 2290. Minimum Obstacle Removal to Reach Corner.txt ├── 2291. Maximum Profit From Trading Stocks.txt ├── 2293. Min Max Game.txt ├── 2294. Partition Array Such That Maximum Difference Is K 125ms.cpp ├── 2294. Partition Array Such That Maximum Difference Is K.pdf ├── 2295. Replace Elements in an Array.txt ├── 2296. Design a Text Editor.txt ├── 2297. Jump Game IX.txt ├── 2299. Strong Password Checker II.txt └── 2300. Successful Pairs of Spells and Potions.txt ├── 2301-2400 ├── 2301. Match Substring After Replacement.txt ├── 2302. Count Subarrays With Score Less Than K.txt ├── 2303. Calculate Amount Paid in Taxes.txt ├── 2304. Minimum Path Cost in a Grid.txt ├── 2305. Fair Distribution of Cookies.txt ├── 2306. Naming a Company.txt ├── 2307. Check for Contradictions in Equations.txt ├── 2309. Greatest English Letter in Upper and Lower Case.txt ├── 2310. Sum of Numbers With Units Digit K.txt ├── 2311. Longest Binary Subsequence Less Than or Equal to K.txt ├── 2312. Selling Pieces of Wood.txt ├── 2313. Minimum Flips in Binary Tree to Get Result.txt ├── 2315. Count Asterisks.txt ├── 2316. Count Unreachable Pairs of Nodes in an Undirected Graph.txt ├── 2317. Maximum XOR After Operations.txt ├── 2318. Number of Distinct Roll Sequences.txt ├── 2319. Check if Matrix Is X-Matrix.txt ├── 2320. Count Number of Ways to Place Houses.txt ├── 2321. Maximum Score Of Spliced Array.txt ├── 2322. Minimum Score After Removals on a Tree 33ms.cpp ├── 2322. Minimum Score After Removals on a Tree.pdf ├── 2323. Find Minimum Time to Finish All Jobs II.txt ├── 2325. Decode the Message.txt ├── 2326. Spiral Matrix IV.txt ├── 2327. Number of People Aware of a Secret.txt ├── 2328. Number of Increasing Paths in a Grid.txt ├── 2330. Valid Palindrome IV.txt ├── 2331. Evaluate Boolean Binary Tree.txt ├── 2332. The Latest Time to Catch a Bus.txt ├── 2333. Minimum Sum of Squared Difference 125ms.cpp ├── 2333. Minimum Sum of Squared Difference.pdf ├── 2334. Subarray With Elements Greater Than Varying Threshold.txt ├── 2335. Minimum Amount of Time to Fill Cups.txt ├── 2336. Smallest Number in Infinite Set.txt ├── 2337. Move Pieces to Obtain a String.txt ├── 2338. Count the Number of Ideal Arrays.txt ├── 2340. Minimum Adjacent Swaps to Make a Valid Array.txt ├── 2341. Maximum Number of Pairs in Array.txt ├── 2342. Max Sum of a Pair With Equal Sum of Digits.txt ├── 2343. Query Kth Smallest Trimmed Number.txt ├── 2344. Minimum Deletions to Make Array Divisible.txt ├── 2345. Finding the Number of Visible Mountains.txt ├── 2347. Best Poker Hand.txt ├── 2348. Number of Zero-Filled Subarrays.txt ├── 2349. Design a Number Container System.txt ├── 2350. Shortest Impossible Sequence of Rolls.txt ├── 2351. First Letter to Appear Twice.txt ├── 2352. Equal Row and Column Pairs.txt ├── 2353. Design a Food Rating System.txt ├── 2354. Number of Excellent Pairs.txt ├── 2355. Maximum Number of Books You Can Take.txt ├── 2357. Make Array Zero by Subtracting Equal Amounts.txt ├── 2358. Maximum Number of Groups Entering a Competition.txt ├── 2359. Find Closest Node to Given Two Nodes.txt ├── 2360. Longest Cycle in a Graph.txt ├── 2361. Minimum Costs Using the Train Line.txt ├── 2363. Merge Similar Items.txt ├── 2364. Count Number of Bad Pairs.txt ├── 2365. Task Scheduler II.txt ├── 2366. Minimum Replacements to Sort the Array.txt ├── 2367. Number of Arithmetic Triplets.txt ├── 2368. Reachable Nodes With Restrictions.txt ├── 2369. Check if There is a Valid Partition For The Array.txt ├── 2370. Longest Ideal Subsequence.txt ├── 2371. Minimize Maximum Value in a Grid.txt ├── 2373. Largest Local Values in a Matrix.txt ├── 2374. Node With Highest Edge Score.txt ├── 2375. Construct Smallest Number From DI String.txt ├── 2376. Count Special Integers.txt ├── 2378. Choose Edges to Maximize Score in a Tree.txt ├── 2379. Minimum Recolors to Get K Consecutive Black Blocks.txt ├── 2380. Time Needed to Rearrange a Binary String.txt ├── 2381. Shifting Letters II.txt ├── 2382. Maximum Segment Sum After Removals 205ms.cpp ├── 2382. Maximum Segment Sum After Removals.pdf ├── 2383. Minimum Hours of Training to Win a Competition.txt ├── 2384. Largest Palindromic Number.txt ├── 2385. Amount of Time for Binary Tree to Be Infected.txt ├── 2386. Find the K-Sum of an Array 126ms.cpp ├── 2386. Find the K-Sum of an Array.pdf ├── 2387. Median of a Row Wise Sorted Matrix.txt ├── 2389. Longest Subsequence With Limited Sum.txt ├── 2390. Removing Stars From a String.txt ├── 2391. Minimum Amount of Time to Collect Garbage.txt ├── 2392. Build a Matrix With Conditions.txt ├── 2393. Count Strictly Increasing Subarrays.txt ├── 2395. Find Subarrays With Equal Sum.txt ├── 2396. Strictly Palindromic Number.txt ├── 2397. Maximum Rows Covered by Columns 0ms_dfs.cpp ├── 2397. Maximum Rows Covered by Columns 0ms_dfs_compress.cpp ├── 2397. Maximum Rows Covered by Columns.txt ├── 2398. Maximum Number of Robots Within Budget.txt ├── 2399. Check Distances Between Same Letters.txt └── 2400. Number of Ways to Reach a Position After Exactly k Steps.txt ├── 2401-2500 ├── 2401. Longest Nice Subarray.txt ├── 2402. Meeting Rooms III.txt ├── 2403. Minimum Time to Kill All Monsters.txt ├── 2404. Most Frequent Even Element.txt ├── 2405. Optimal Partition of String.txt ├── 2406. Divide Intervals Into Minimum Number of Groups.txt ├── 2407. Longest Increasing Subsequence II.pdf ├── 2408. Design SQL.txt ├── 2409. Count Days Spent Together.txt ├── 2410. Maximum Matching of Players With Trainers.txt ├── 2411. Smallest Subarrays With Maximum Bitwise OR 77ms.cpp ├── 2411. Smallest Subarrays With Maximum Bitwise OR.pdf ├── 2412. Minimum Money Required Before Transactions.txt ├── 2413. Smallest Even Multiple.txt ├── 2414. Length of the Longest Alphabetical Continuous Substring.txt ├── 2415. Reverse Odd Levels of Binary Tree.txt ├── 2416. Sum of Prefix Scores of Strings.txt ├── 2417. Closest Fair Integer.txt ├── 2418. Sort the People.txt ├── 2419. Longest Subarray With Maximum Bitwise AND.txt ├── 2420. Find All Good Indices.txt ├── 2421. Number of Good Paths.txt ├── 2422. Merge Operations to Turn Array Into a Palindrome.txt ├── 2423. Remove Letter To Equalize Frequency.txt ├── 2424. Longest Uploaded Prefix.txt ├── 2425. Bitwise XOR of All Pairings.txt ├── 2426. Number of Pairs Satisfying Inequality.txt ├── 2427. Number of Common Factors.txt ├── 2428. Maximum Sum of an Hourglass.txt ├── 2429. Minimize XOR.txt ├── 2430. Maximum Deletions on a String.txt ├── 2431. Maximize Total Tastiness of Purchased Fruits.txt ├── 2432. The Employee That Worked on the Longest Task.txt ├── 2433. Find The Original Array of Prefix Xor.txt ├── 2434. Using a Robot to Print the Lexicographically Smallest String.txt ├── 2435. Paths in Matrix Whose Sum Is Divisible by K 107ms_avx.cpp ├── 2435. Paths in Matrix Whose Sum Is Divisible by K.pdf ├── 2436. Minimum Split Into Subarrays With GCD Greater Than One.txt ├── 2437. Number of Valid Clock Times.txt ├── 2438. Range Product Queries of Powers.txt ├── 2439. Minimize Maximum of Array.txt ├── 2440. Create Components With Same Value.txt ├── 2441. Largest Positive Integer That Exists With Its Negative.txt ├── 2442. Count Number of Distinct Integers After Reverse Operations.txt ├── 2443. Sum of Number and Its Reverse.txt ├── 2444. Count Subarrays With Fixed Bounds.txt ├── 2445. Number of Nodes With Value One.txt ├── 2446. Determine if Two Events Have Conflict.txt ├── 2447. Number of Subarrays With GCD Equal to K.txt ├── 2448. Minimum Cost to Make Array Equal.txt ├── 2449. Minimum Number of Operations to Make Arrays Similar.txt ├── 2450. Number of Distinct Binary Strings After Applying Operations.txt ├── 2451. Odd String Difference.txt ├── 2452. Words Within Two Edits of Dictionary.txt ├── 2453. Destroy Sequential Targets.pdf ├── 2454. Next Greater Element IV.txt ├── 2455. Average Value of Even Numbers That Are Divisible by Three.txt ├── 2456. Most Popular Video Creator.txt ├── 2457. Minimum Addition to Make Integer Beautiful.txt ├── 2458. Height of Binary Tree After Subtree Removal Queries.txt ├── 2459. Sort Array by Moving Items to Empty Space.txt ├── 2460. Apply Operations to an Array.txt ├── 2461. Maximum Sum of Distinct Subarrays With Length K.pdf ├── 2462. Total Cost to Hire K Workers.txt ├── 2463. Minimum Total Distance Traveled.pdf ├── 2464. Minimum Subarrays in a Valid Split.txt ├── 2465. Number of Distinct Averages.txt ├── 2466. Count Ways To Build Good Strings.txt ├── 2467. Most Profitable Path in a Tree.txt ├── 2468. Split Message Based on Limit.txt ├── 2469. Convert the Temperature.txt ├── 2470. Number of Subarrays With LCM Equal to K.txt ├── 2471. Minimum Number of Operations to Sort a Binary Tree by Level.txt ├── 2472. Maximum Number of Non-overlapping Palindrome Substrings.txt ├── 2473. Minimum Cost to Buy Apples.txt ├── 2475. Number of Unequal Triplets in Array.txt ├── 2476. Closest Nodes Queries in a Binary Search Tree.txt ├── 2477. Minimum Fuel Cost to Report to the Capital.txt ├── 2478. Number of Beautiful Partitions.txt ├── 2479. Maximum XOR of Two Non-Overlapping Subtrees.txt ├── 2481. Minimum Cuts to Divide a Circle.txt ├── 2482. Difference Between Ones and Zeros in Row and Column.txt ├── 2483. Minimum Penalty for a Shop.txt ├── 2484. Count Palindromic Subsequences.txt ├── 2485. Find the Pivot Integer.txt ├── 2486. Append Characters to String to Make Subsequence.txt ├── 2487. Remove Nodes From Linked List.txt ├── 2488. Count Subarrays With Median K.txt ├── 2489. Number of Substrings With Fixed Ratio.txt ├── 2490. Circular Sentence.txt ├── 2491. Divide Players Into Teams of Equal Skill.txt ├── 2492. Minimum Score of a Path Between Two Cities.txt ├── 2493. Divide Nodes Into the Maximum Number of Groups 316ms.cpp ├── 2495. Number of Subarrays Having Even Product.txt ├── 2496. Maximum Value of a String in an Array.txt ├── 2497. Maximum Star Sum of a Graph.txt ├── 2498. Frog Jump II.txt ├── 2499. Minimum Total Cost to Make Arrays Unequal.txt └── 2500. Delete Greatest Value in Each Row.txt ├── 2501-2600 ├── 2501. Longest Square Streak in an Array.txt ├── 2502. Design Memory Allocator.txt ├── 2503. Maximum Number of Points From Grid Queries.txt ├── 2505. Bitwise OR of All Subsequence Sums.txt ├── 2506. Count Pairs Of Similar Strings.txt ├── 2507. Smallest Value After Replacing With Sum of Prime Factors.txt ├── 2508. Add Edges to Make Degrees of All Nodes Even.txt ├── 2509. Cycle Length Queries in a Tree.txt ├── 2510. Check if There is a Path With Equal Number of 0's And 1's 4ms_cn.cpp ├── 2510. Check if There is a Path With Equal Number of 0's And 1's.txt ├── 2511. Maximum Enemy Forts That Can Be Captured.txt ├── 2512. Reward Top K Students.txt ├── 2513. Minimize the Maximum of Two Arrays.txt ├── 2514. Count Anagrams.txt ├── 2515. Shortest Distance to Target String in a Circular Array.txt ├── 2516. Take K of Each Character From Left and Right.txt ├── 2517. Maximum Tastiness of Candy Basket.txt ├── 2518. Number of Great Partitions.txt ├── 2519. Count the Number of K-Big Indices.txt ├── 2520. Count the Digits That Divide a Number.txt ├── 2521. Distinct Prime Factors of Product of Array.txt ├── 2522. Partition String Into Substrings With Values at Most K.txt ├── 2523. Closest Prime Numbers in Range.txt ├── 2524. Maximum Frequency Score of a Subarray.txt ├── 2525. Categorize Box According to Criteria.txt ├── 2526. Find Consecutive Integers from a Data Stream.txt ├── 2527. Find Xor-Beauty of Array.txt ├── 2528. Maximize the Minimum Powered City.txt ├── 2529. Maximum Count of Positive Integer and Negative Integer.txt ├── 2530. Maximal Score After Applying K Operations.txt ├── 2531. Make Number of Distinct Characters Equal.txt ├── 2532. Time to Cross a Bridge.txt ├── 2533. Number of Good Binary Strings.txt ├── 2534. Time Taken to Cross the Door.txt ├── 2535. Difference Between Element Sum and Digit Sum of an Array.txt ├── 2536. Increment Submatrices by One.txt ├── 2537. Count the Number of Good Subarrays.txt ├── 2538. Difference Between Maximum and Minimum Price Sum.txt ├── 2539. Count the Number of Good Subsequences.txt ├── 2540. Minimum Common Value.txt ├── 2541. Minimum Operations to Make Array Equal II.txt ├── 2542. Maximum Subsequence Score.txt ├── 2543. Check if Point Is Reachable.txt ├── 2544. Alternating Digit Sum.txt ├── 2545. Sort the Students by Their Kth Score.txt ├── 2546. Apply Bitwise Operations to Make Strings Equal.txt ├── 2547. Minimum Cost to Split an Array.txt ├── 2548. Maximum Price to Fill a Bag.txt ├── 2549. Count Distinct Numbers on Board.txt ├── 2550. Count Collisions of Monkeys on a Polygon.txt ├── 2551. Put Marbles in Bags.txt ├── 2552. Count Increasing Quadruplets 116ms_asm.py ├── 2552. Count Increasing Quadruplets.txt ├── 2553. Separate the Digits in an Array.txt ├── 2554. Maximum Number of Integers to Choose From a Range I.txt ├── 2555. Maximize Win From Two Segments.txt ├── 2556. Disconnect Path in a Binary Matrix by at Most One Flip.txt ├── 2557. Maximum Number of Integers to Choose From a Range II.txt ├── 2558. Take Gifts From the Richest Pile.txt ├── 2559. Count Vowel Strings in Ranges.txt ├── 2560. House Robber IV.txt ├── 2561. Rearranging Fruits.txt ├── 2562. Find the Array Concatenation Value.txt ├── 2563. Count the Number of Fair Pairs.txt ├── 2564. Substring XOR Queries.txt ├── 2565. Subsequence With the Minimum Score.txt ├── 2566. Maximum Difference by Remapping a Digit.txt ├── 2567. Minimum Score by Changing Two Elements.txt ├── 2568. Minimum Impossible OR.txt ├── 2569. Handling Sum Queries After Update.txt ├── 2570. Merge Two 2D Arrays by Summing Values.txt ├── 2571. Minimum Operations to Reduce an Integer to 0.txt ├── 2572. Count the Number of Square-Free Subsets 32ms_dfs.py ├── 2572. Count the Number of Square-Free Subsets 36ms_dfs_fast.py ├── 2572. Count the Number of Square-Free Subsets 40ms_DP.py ├── 2572. Count the Number of Square-Free Subsets.txt ├── 2573. Find the String with LCP.txt ├── 2574. Left and Right Sum Differences.txt ├── 2575. Find the Divisibility Array of a String.txt ├── 2576. Find the Maximum Number of Marked Indices.txt ├── 2577. Minimum Time to Visit a Cell In a Grid.txt ├── 2578. Split With Minimum Sum.txt ├── 2579. Count Total Number of Colored Cells.txt ├── 2580. Count Ways to Group Overlapping Ranges.txt ├── 2581. Count Number of Possible Root Nodes.txt ├── 2582. Pass the Pillow.txt ├── 2583. Kth Largest Sum in a Binary Tree.txt ├── 2584. Split the Array to Make Coprime Products.txt ├── 2585. Number of Ways to Earn Points.txt ├── 2586. Count the Number of Vowel Strings in Range.txt ├── 2587. Rearrange Array to Maximize Prefix Score.txt ├── 2588. Count the Number of Beautiful Subarrays.txt ├── 2589. Minimum Time to Complete All Tasks.txt ├── 2590. Design a Todo List.txt ├── 2591. Distribute Money to Maximum Children.txt ├── 2592. Maximize Greatness of an Array.txt ├── 2593. Find Score of an Array After Marking All Elements.txt ├── 2594. Minimum Time to Repair Cars.txt ├── 2595. Number of Even and Odd Bits.txt ├── 2596. Check Knight Tour Configuration.txt ├── 2597. The Number of Beautiful Subsets.txt ├── 2598. Smallest Missing Non-negative Integer After Operations.txt ├── 2599. Make the Prefix Sum Non-negative.txt └── 2600. K Items With the Maximum Sum.txt ├── 2601-2700 ├── 2601. Prime Subtraction Operation.txt ├── 2602. Minimum Operations to Make All Array Elements Equal.txt ├── 2603. Collect Coins in a Tree 2173ms.py ├── 2603. Collect Coins in a Tree.txt ├── 2604. Minimum Time to Eat All Grains.txt ├── 2605. Form Smallest Number From Two Digit Arrays.txt ├── 2606. Find the Substring With Maximum Cost.txt ├── 2607. Make K-Subarray Sums Equal.txt ├── 2608. Shortest Cycle in a Graph.txt ├── 2609. Find the Longest Balanced Substring of a Binary String.txt ├── 2610. Convert an Array Into a 2D Array With Conditions.txt ├── 2611. Mice and Cheese.txt ├── 2612. Minimum Reverse Operations 1728ms_asm_O1.py ├── 2612. Minimum Reverse Operations 256ms_cn_bitset.cpp ├── 2612. Minimum Reverse Operations 605ms.cpp ├── 2612. Minimum Reverse Operations.txt ├── 2613. Beautiful Pairs.txt ├── 2614. Prime In Diagonal.txt ├── 2615. Sum of Distances.txt ├── 2616. Minimize the Maximum Difference of Pairs.txt ├── 2617. Minimum Number of Visited Cells in a Grid 488ms_bitset_STL.cpp ├── 2617. Minimum Number of Visited Cells in a Grid 751ms_bitset_STL_v2.cpp ├── 2617. Minimum Number of Visited Cells in a Grid 879ms_bitset.cpp ├── 2617. Minimum Number of Visited Cells in a Grid.txt ├── 2638. Count the Number of K-Free Subsets.txt ├── 2639. Find the Width of Columns of a Grid.txt ├── 2640. Find the Score of All Prefixes of an Array.txt ├── 2641. Cousins in Binary Tree II.txt ├── 2642. Design Graph With Shortest Path Calculator.txt ├── 2643. Row With Maximum Ones.txt ├── 2644. Find the Maximum Divisibility Score.txt ├── 2645. Minimum Additions to Make Valid String.txt ├── 2646. Minimize the Total Price of the Trips.txt ├── 2647. Color the Triangle Red.txt ├── 2651. Calculate Delayed Arrival Time.txt ├── 2652. Sum Multiples.txt ├── 2653. Sliding Subarray Beauty.txt ├── 2654. Minimum Number of Operations to Make All Array Elements Equal to 1.txt ├── 2655. Find Maximal Uncovered Ranges.txt ├── 2656. Maximum Sum With Exactly K Elements.txt ├── 2657. Find the Prefix Common Array of Two Arrays.txt ├── 2658. Maximum Number of Fish in a Grid.txt ├── 2659. Make Array Empty.txt ├── 2660. Determine the Winner of a Bowling Game.txt ├── 2661. First Completely Painted Row or Column.txt ├── 2662. Minimum Cost of a Path With Special Roads.txt ├── 2663. Lexicographically Smallest Beautiful String.txt ├── 2664. The Knight’s Tour.txt ├── 2670. Find the Distinct Difference Array.txt ├── 2671. Frequency Tracker.txt ├── 2672. Number of Adjacent Elements With the Same Color.txt ├── 2673. Make Costs of Paths Equal in a Binary Tree.txt ├── 2677. Chunk Array.txt ├── 2678. Number of Senior Citizens.txt ├── 2679. Sum in a Matrix.txt ├── 2680. Maximum OR.txt ├── 2681. Power of Heroes.txt ├── 2682. Find the Losers of the Circular Game.txt ├── 2683. Neighboring Bitwise XOR.txt ├── 2684. Maximum Number of Moves in a Grid.txt ├── 2685. Count the Number of Complete Components.txt ├── 2696. Minimum String Length After Removing Substrings.txt ├── 2697. Lexicographically Smallest Palindrome.txt ├── 2698. Find the Punishment Number of an Integer.txt └── 2699. Modify Graph Edge Weights.txt ├── 2701-2800 ├── 2706. Buy Two Chocolates.txt ├── 2707. Extra Characters in a String.txt ├── 2708. Maximum Strength of a Group.txt ├── 2709. Greatest Common Divisor Traversal.txt ├── 2710. Remove Trailing Zeros From a String.txt ├── 2711. Difference of Number of Distinct Values on Diagonals.txt ├── 2712. Minimum Cost to Make All Characters Equal.txt ├── 2713. Maximum Strictly Increasing Cells in a Matrix.txt ├── 2716. Minimize String Length.txt ├── 2717. Semi-Ordered Permutation.txt ├── 2718. Sum of Matrix After Queries 1462ms_bf.cpp ├── 2718. Sum of Matrix After Queries.txt ├── 2719. Count of Integers.txt ├── 2729. Check if The Number is Fascinating.txt ├── 2730. Find the Longest Semi-Repetitive Substring.txt ├── 2731. Movement of Robots.txt ├── 2732. Find a Good Subset of the Matrix.txt ├── 2733. Neither Minimum nor Maximum.txt ├── 2734. Lexicographically Smallest String After Substring Operation.txt ├── 2735. Collecting Chocolates.txt ├── 2736. Maximum Sum Queries.txt ├── 2739. Total Distance Traveled.txt ├── 2740. Find the Value of the Partition.txt ├── 2741. Special Permutations.txt ├── 2742. Painting the Walls.txt ├── 2744. Find Maximum Number of String Pairs.txt ├── 2745. Construct the Longest New String.txt ├── 2746. Decremental String Concatenation 8ms.cpp ├── 2746. Decremental String Concatenation.pdf ├── 2747. Count Zero Request Servers.txt ├── 2748. Number of Beautiful Pairs.txt ├── 2749. Minimum Operations to Make the Integer Zero.txt ├── 2750. Ways to Split Array Into Good Subarrays.txt ├── 2751. Robot Collisions.txt ├── 2765. Longest Alternating Subarray.txt ├── 2766. Relocate Marbles.txt ├── 2767. Partition String Into Minimum Beautiful Substrings.txt ├── 2768. Number of Black Blocks.txt ├── 2769. Find the Maximum Achievable Number.txt ├── 2770. Maximum Number of Jumps to Reach the Last Index.txt ├── 2771. Longest Non-decreasing Subarray From Two Arrays.txt ├── 2772. Apply Operations to Make All Array Elements Equal to Zero.txt ├── 2778. Sum of Squares of Special Elements.txt ├── 2779. Maximum Beauty of an Array After Applying Operation.txt ├── 2780. Minimum Index of a Valid Split.txt ├── 2781. Length of the Longest Valid Substring.txt ├── 2790. Maximum Number of Groups With Increasing Length.txt ├── 2791. Count Paths That Can Form a Palindrome in a Tree.txt ├── 2798. Number of Employees Who Met the Target.txt ├── 2799. Count Complete Subarrays in an Array.txt └── 2800. Shortest String That Contains Three Strings.txt ├── 2801-2900 ├── 2801. Count Stepping Numbers in Range.txt ├── 2806. Account Balance After Rounded Purchase.txt ├── 2807. Insert Greatest Common Divisors in Linked List.txt ├── 2808. Minimum Seconds to Equalize a Circular Array.txt ├── 2810. Faulty Keyboard.txt ├── 2811. Check if it is Possible to Split Array.txt ├── 2812. Find the Safest Path in a Grid.txt ├── 2813. Maximum Elegance of a K-Length Subsequence.txt ├── 2815. Max Pair Sum in an Array.txt ├── 2816. Double a Number Represented as a Linked List 712ms.py ├── 2816. Double a Number Represented as a Linked List.txt ├── 2817. Minimum Absolute Difference Between Elements With Constraint.txt ├── 2818. Apply Operations to Maximize Score.txt ├── 2836. Maximize Value of Function in a Ball Passing Game.txt ├── 2857. Count Pairs of Points With Distance k.txt ├── 2859. Sum of Values at Indices With K Set Bits.txt ├── 2860. Happy Students.txt ├── 2862. Maximum Element-Sum of a Complete Subset of Indices.txt ├── 2864. Maximum Odd Binary Number.txt ├── 2865. Beautiful Towers I.txt ├── 2866. Beautiful Towers II.txt ├── 2867. Count Valid Paths in a Tree.txt ├── 2869. Minimum Operations to Collect Elements.txt ├── 2870. Minimum Number of Operations to Make Array Empty.txt ├── 2871. Split Array Into Maximum Number of Subarrays.txt ├── 2872. Maximum Number of K-Divisible Components.txt ├── 2873. Maximum Value of an Ordered Triplet I.txt ├── 2874. Maximum Value of an Ordered Triplet II.txt ├── 2875. Minimum Size Subarray in Infinite Array.txt └── 2876. Count Visited Nodes in a Directed Graph.txt ├── 2901-3000 ├── 2901. Longest Unequal Adjacent Groups Subsequence II 73ms.cpp ├── 2901. Longest Unequal Adjacent Groups Subsequence II.txt ├── 2902. Count of Sub-Multisets With Bounded Sum.txt ├── 2903. Find Indices With Index and Value Difference I.txt ├── 2904. Shortest and Lexicographically Smallest Beautiful String.txt ├── 2905. Find Indices With Index and Value Difference II.txt ├── 2906. Construct Product Matrix.txt ├── 2908. Minimum Sum of Mountain Triplets I.txt ├── 2909. Minimum Sum of Mountain Triplets II.txt ├── 2910. Minimum Number of Groups to Create a Valid Assignment.txt ├── 2913. Subarrays Distinct Element Sum of Squares I.txt ├── 2914. Minimum Number of Changes to Make Binary String Beautiful.txt ├── 2915. Length of the Longest Subsequence That Sums to Target.txt ├── 2916. Subarrays Distinct Element Sum of Squares II.txt ├── 2917. Find the K-or of an Array.txt ├── 2918. Minimum Equal Sum of Two Arrays After Replacing Zeros.txt ├── 2919. Minimum Increment Operations to Make Array Beautiful.txt ├── 2923. Find Champion I.txt ├── 2924. Find Champion II.txt ├── 2925. Maximum Score After Applying Operations on a Tree.txt ├── 2926. Maximum Balanced Subsequence Sum.txt ├── 2928. Distribute Candies Among Children I.txt ├── 2929. Distribute Candies Among Children II.txt ├── 2930. Number of Strings Which Can Be Rearranged to Contain Substring.txt ├── 2931. Maximum Spending After Buying Items.txt ├── 2932. Maximum Strong Pair XOR I.txt ├── 2935. Maximum Strong Pair XOR II 1693ms.cpp ├── 2940. Find Building Where Alice and Bob Can Meet.txt ├── 2942. Find Words Containing Character.txt ├── 2943. Maximize Area of Square Hole in Grid.txt ├── 2944. Minimum Number of Coins for Fruits.txt ├── 2945. Find Maximum Non-decreasing Array Length.txt ├── 2946. Matrix Similarity After Cyclic Shifts.txt ├── 2947. Count Beautiful Substrings I.txt ├── 2948. Make Lexicographically Smallest Array by Swapping Elements.txt ├── 2949. Count Beautiful Substrings II.txt ├── 2951. Find the Peaks.txt ├── 2952. Minimum Number of Coins to be Added 0ms.cpp ├── 2952. Minimum Number of Coins to be Added.txt ├── 2954. Count the Number of Infection Sequences.txt ├── 2963. Count the Number of Good Partitions.txt ├── 2967. Minimum Cost to Make Array Equalindromic.txt └── 2999. Count the Number of Powerful Integers.txt ├── 3001-3100 ├── 3001. Minimum Moves to Capture The Queen.txt ├── 3002. Maximum Size of a Set After Removals.txt ├── 3003. Maximize the Number of Partitions After Operations 6156ms_asm.py ├── 3003. Maximize the Number of Partitions After Operations.txt ├── 3005. Count Elements With Maximum Frequency.txt ├── 3006. Find Beautiful Indices in the Given Array I.txt ├── 3007. Maximum Number That Sum of the Prices Is Less Than or Equal to K.txt ├── 3008. Find Beautiful Indices in the Given Array II.txt ├── 3010. Divide an Array Into Subarrays With Minimum Cost I.txt ├── 3011. Find if Array Can Be Sorted.txt ├── 3014. Minimum Number of Pushes to Type Word I.txt ├── 3015. Count the Number of Houses at a Certain Distance I.txt ├── 3016. Minimum Number of Pushes to Type Word II.txt ├── 3017. Count the Number of Houses at a Certain Distance II.txt ├── 3027. Find the Number of Ways to Place People II.txt ├── 3029. Minimum Time to Revert Word to Initial State I.txt ├── 3031. Minimum Time to Revert Word to Initial State II 339ms_bf.cpp ├── 3031. Minimum Time to Revert Word to Initial State II.txt ├── 3034. Number of Subarrays That Match a Pattern I.txt ├── 3036. Number of Subarrays That Match a Pattern II.txt ├── 3042. Count Prefix and Suffix Pairs I.txt ├── 3045. Count Prefix and Suffix Pairs II 457ms_L^1.5.py ├── 3045. Count Prefix and Suffix Pairs II.txt ├── 3046. Split the Array.txt ├── 3047. Find the Largest Area of Square Inside Two Rectangles.txt ├── 3048. Earliest Second to Mark Indices I.txt ├── 3049. Earliest Second to Mark Indices II 100ms.py ├── 3049. Earliest Second to Mark Indices II.txt ├── 3074. Apple Redistribution into Boxes.txt ├── 3075. Maximize Happiness of Selected Children.txt ├── 3076. Shortest Uncommon Substring in an Array.txt ├── 3077. Maximum Strength of K Disjoint Subarrays.txt ├── 3082. Find the Sum of the Power of All Subsequences.txt ├── 3093. Longest Common Suffix Queries 2396ms_bf.cpp ├── 3097. Shortest Subarray With OR at Least K II 70ms.cpp └── 3097. Shortest Subarray With OR at Least K.txt ├── 3101-3200 ├── 3101. Count Alternating Subarrays.txt ├── 3102. Minimize Manhattan Distances.txt ├── 3105. Longest Strictly Increasing or Strictly Decreasing Subarray.txt ├── 3106. Lexicographically Smallest String After Operations With Constraint.txt ├── 3107. Minimum Operations to Make Median of Array Equal to K.txt ├── 3108. Minimum Cost Walk in Weighted Graph.txt ├── 3110. Score of a String.txt ├── 3113. Find the Number of Subarrays Where Boundary Elements Are Maximum.txt ├── 3114. Latest Time You Can Obtain After Replacing Characters.txt ├── 3115. Maximum Prime Difference.txt ├── 3116. Kth Smallest Amount With Single Denomination Combination.txt ├── 3120. Count the Number of Special Characters I.txt ├── 3121. Count the Number of Special Characters II.txt ├── 3122. Minimum Number of Operations to Satisfy Conditions.txt ├── 3123. Find Edges in Shortest Paths.txt ├── 3127. Make a Square with the Same Color.txt ├── 3128. Right Triangles.txt ├── 3129. Find All Possible Stable Binary Arrays I.txt ├── 3130. Find All Possible Stable Binary Arrays II.txt ├── 3131. Find the Integer Added to Array I.txt ├── 3132. Find the Integer Added to Array II.txt ├── 3133. Minimum Array End.txt ├── 3134. Find the Median of the Uniqueness Array.txt ├── 3136. Valid Word.txt ├── 3137. Minimum Number of Operations to Make Word K-Periodic.txt ├── 3139. Minimum Cost to Equalize Array.txt ├── 3142. Check if Grid Satisfies Conditions.txt ├── 3143. Maximum Points Inside the Square.txt ├── 3145. Find Products of Elements of Big Array.txt ├── 3146. Permutation Difference between Two Strings.txt ├── 3147. Taking Maximum Energy From the Mystic Dungeon.txt ├── 3148. Maximum Difference Score in a Grid.txt ├── 3151. Special Array I.txt ├── 3152. Special Array II.txt ├── 3153. Sum of Digit Differences of All Pairs.txt ├── 3154. Find Number of Ways to Reach the K-th Stair.txt ├── 3158. Find the XOR of Numbers Which Appear Twice.txt ├── 3159. Find Occurrences of an Element in an Array.txt ├── 3160. Find the Number of Distinct Colors Among the Balls.txt ├── 3161. Block Placement Queries.txt ├── 3162. Find the Number of Good Pairs I.txt ├── 3163. String Compression III.txt ├── 3164. Find the Number of Good Pairs II.txt └── 3165. Maximum Sum of Subsequence With Non-adjacent Elements.txt ├── 3201-3300 ├── 3201. Find the Maximum Length of Valid Subsequence I.txt ├── 3202. Find the Maximum Length of Valid Subsequence II.txt ├── 3203. Find Minimum Diameter After Merging Two Trees.txt ├── 3206. Alternating Groups I.txt ├── 3207. Maximum Points After Enemy Battles.txt ├── 3208. Alternating Groups II.txt ├── 3209. Number of Subarrays With AND Value of K.txt ├── 3210. Find the Encrypted String.txt ├── 3211. Generate Binary Strings Without Adjacent Zeros.txt ├── 3212. Count Submatrices With Equal Frequency of X and Y.txt ├── 3213. Construct String with Minimum Cost.txt ├── 3216. Lexicographically Smallest String After a Swap.txt ├── 3217. Delete Nodes From Linked List Present in Array.txt ├── 3218. Minimum Cost for Cutting Cake I.txt ├── 3219. Minimum Cost for Cutting Cake II.txt ├── 3222. Find the Winning Player in Coin Game.txt ├── 3223. Minimum Length of String After Operations.txt ├── 3224. Minimum Array Changes to Make Differences Equal.txt ├── 3225. Maximum Score From Grid Operations.txt ├── 3226. Number of Bit Changes to Make Two Integers Equal.txt ├── 3227. Vowels Game in a String.txt ├── 3228. Maximum Number of Operations to Move Ones to the End.txt ├── 3229. Minimum Operations to Make Array Equal to Target.txt ├── 3232. Find if Digit Game Can Be Won.txt ├── 3233. Find the Count of Numbers Which Are Not Special.txt ├── 3234. Count the Number of Substrings With Dominant Ones.txt ├── 3266. Final Array State After K Multiplication Operations II.txt ├── 3287. Find the Maximum Sequence Value of Array.txt ├── 3288. Length of the Longest Increasing Path.txt ├── 3289. The Two Sneaky Numbers of Digitville.txt ├── 3290. Maximum Multiplication Score.txt ├── 3291. Minimum Number of Valid Strings to Form Target I.txt ├── 3292. Minimum Number of Valid Strings to Form Target II.txt ├── 3295. Report Spam Message.txt ├── 3296. Minimum Number of Seconds to Make Mountain Height Zero.txt ├── 3297. Count Substrings That Can Be Rearranged to Contain a String I.txt ├── 3298. Count Substrings That Can Be Rearranged to Contain a String II.txt └── 3300. Minimum Element After Replacement With Digit Sum.txt ├── 3301-3400 ├── 3301. Maximize the Total Height of Unique Towers 1067ms.py ├── 3301. Maximize the Total Height of Unique Towers.txt ├── 3302. Find the Lexicographically Smallest Valid Sequence.txt ├── 3303. Find the Occurrence of First Almost Equal Substring.txt ├── 3304. Find the K-th Character in String Game I.txt ├── 3305. Count of Substrings Containing Every Vowel and K Consonants I.txt ├── 3306. Count of Substrings Containing Every Vowel and K Consonants II.txt ├── 3307. Find the K-th Character in String Game II.txt ├── 3309. Maximum Possible Number by Binary Concatenation.txt ├── 3310. Remove Methods From Project.txt ├── 3311. Construct 2D Grid Matching Graph Layout.txt ├── 3312. Sorted GCD Pair Queries.txt ├── 3314. Construct the Minimum Bitwise Array I.txt ├── 3315. Construct the Minimum Bitwise Array II.txt ├── 3317. Find the Number of Possible Ways for an Event.txt ├── 3318. Find X-Sum of All K-Long Subarrays I.txt ├── 3319. K-th Largest Perfect Subtree Size in Binary Tree.txt ├── 3320. Count The Number of Winning Sequences.txt ├── 3321. Find X-Sum of All K-Long Subarrays II.txt ├── 3324. Find the Sequence of Strings Appeared on the Screen.txt ├── 3325. Count Substrings With K-Frequency Characters I.txt ├── 3326. Minimum Division Operations to Make Array Non Decreasing.txt ├── 3327. Check if DFS Strings Are Palindromes.txt ├── 3335. Total Characters in String After Transformations I.txt ├── 3337. Total Characters in String After Transformations II.txt ├── 3345. Smallest Divisible Digit Product I.txt ├── 3346. Maximum Frequency of an Element After Performing Operations I.txt ├── 3347. Maximum Frequency of an Element After Performing Operations II.txt ├── 3348. Smallest Divisible Digit Product II 4470ms.py ├── 3348. Smallest Divisible Digit Product II.txt ├── 3349. Adjacent Increasing Subarrays Detection I.txt ├── 3350. Adjacent Increasing Subarrays Detection II.txt ├── 3351. Sum of Good Subsequences.txt ├── 3352. Count K-Reducible Numbers Less Than N.txt ├── 3366. Minimum Array Sum 3ms_greedy.py ├── 3366. Minimum Array Sum.txt ├── 3370. Smallest Number With All Set Bits.txt ├── 3371. Identify the Largest Outlier in an Array.txt ├── 3372. Maximize the Number of Target Nodes After Connecting Trees I.txt ├── 3373. Maximize the Number of Target Nodes After Connecting Trees II.txt ├── 3375. Minimum Operations to Make Array Values Equal to K.txt ├── 3376. Minimum Time to Break Locks I.txt ├── 3377. Digit Operations to Make Two Integers Equal.txt ├── 3379. Transformed Array.txt ├── 3380. Maximum Area Rectangle With Point Constraints I.txt ├── 3381. Maximum Subarray Sum With Length Divisible by K.txt ├── 3382. Maximum Area Rectangle With Point Constraints II.txt ├── 3386. Button with Longest Push Time.txt ├── 3387. Maximize Amount After Two Days of Conversions.txt ├── 3395. Subsequences with a Unique Middle Mode I.txt ├── 3396. Minimum Number of Operations to Make Elements in Array Distinct.txt ├── 3398. Smallest Substring With Identical Characters I.txt ├── 3399. Smallest Substring With Identical Characters II.txt └── 3400. Maximum Number of Matching Indices After Right Shifts.txt ├── 3401-3500 ├── 3402. Minimum Operations to Make Columns Strictly Increasing.txt ├── 3403. Find the Lexicographically Largest String From the Box I.txt ├── 3404. Count Special Subsequences.txt ├── 3405. Count the Number of Arrays with K Matching Adjacent Elements.txt ├── 3407. Substring Matching Pattern.txt ├── 3408. Design Task Manager.txt ├── 3409. Longest Subsequence With Decreasing Adjacent Difference.txt ├── 3410. Maximize Subarray Sum After Removing All Occurrences of One Element.txt ├── 3411. Maximum Subarray With Equal Products.txt ├── 3412. Find Mirror Score of a String.txt ├── 3413. Maximum Coins From K Consecutive Bags.txt ├── 3414. Maximum Score of Non-overlapping Intervals.txt ├── 3417. Zigzag Grid Traversal With Skip.txt ├── 3418. Maximum Amount of Money Robot Can Earn.txt ├── 3419. Minimize the Maximum Edge Weight of Graph.txt ├── 3420. Count Non-Decreasing Subarrays After K Operations.txt ├── 3423. Maximum Difference Between Adjacent Elements in a Circular Array.txt ├── 3424. Minimum Cost to Make Arrays Identical.txt ├── 3425. Longest Special Path.txt ├── 3426. Manhattan Distances of All Arrangements of Pieces.txt ├── 3427. Sum of Variable Length Subarrays.txt ├── 3428. Maximum and Minimum Sums of at Most Size K Subsequences.txt ├── 3429. Paint House IV.txt ├── 3430. Maximum and Minimum Sums of at Most Size K Subarrays.txt ├── 3432. Count Partitions with Even Sum Difference.txt ├── 3433. Count Mentions Per User.txt ├── 3434. Maximum Frequency After Subarray Operation.txt └── 3435. Frequencies of Shortest Supersequences.txt ├── README.md ├── chk ├── README.md ├── chk.cpp ├── chk.py ├── download_contest.js ├── download_contest_py.js ├── download_contest_py_CN.js ├── download_histogram.js ├── download_histogram │ ├── download_histogram.js │ ├── download_histogram.ts │ ├── download_histogram_py.js │ ├── download_histogram_py.ts │ ├── node_modules │ │ ├── .package-lock.json │ │ └── @types │ │ │ └── node │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── assert.d.ts │ │ │ ├── assert │ │ │ └── strict.d.ts │ │ │ ├── async_hooks.d.ts │ │ │ ├── buffer.d.ts │ │ │ ├── child_process.d.ts │ │ │ ├── cluster.d.ts │ │ │ ├── console.d.ts │ │ │ ├── constants.d.ts │ │ │ ├── crypto.d.ts │ │ │ ├── dgram.d.ts │ │ │ ├── diagnostics_channel.d.ts │ │ │ ├── dns.d.ts │ │ │ ├── dns │ │ │ └── promises.d.ts │ │ │ ├── domain.d.ts │ │ │ ├── events.d.ts │ │ │ ├── fs.d.ts │ │ │ ├── fs │ │ │ └── promises.d.ts │ │ │ ├── globals.d.ts │ │ │ ├── globals.global.d.ts │ │ │ ├── http.d.ts │ │ │ ├── http2.d.ts │ │ │ ├── https.d.ts │ │ │ ├── index.d.ts │ │ │ ├── inspector.d.ts │ │ │ ├── module.d.ts │ │ │ ├── net.d.ts │ │ │ ├── os.d.ts │ │ │ ├── package.json │ │ │ ├── path.d.ts │ │ │ ├── perf_hooks.d.ts │ │ │ ├── process.d.ts │ │ │ ├── punycode.d.ts │ │ │ ├── querystring.d.ts │ │ │ ├── readline.d.ts │ │ │ ├── repl.d.ts │ │ │ ├── stream.d.ts │ │ │ ├── stream │ │ │ ├── consumers.d.ts │ │ │ ├── promises.d.ts │ │ │ └── web.d.ts │ │ │ ├── string_decoder.d.ts │ │ │ ├── timers.d.ts │ │ │ ├── timers │ │ │ └── promises.d.ts │ │ │ ├── tls.d.ts │ │ │ ├── trace_events.d.ts │ │ │ ├── tty.d.ts │ │ │ ├── url.d.ts │ │ │ ├── util.d.ts │ │ │ ├── v8.d.ts │ │ │ ├── vm.d.ts │ │ │ ├── wasi.d.ts │ │ │ ├── worker_threads.d.ts │ │ │ └── zlib.d.ts │ ├── package-lock.json │ └── package.json ├── missing_template.txt └── pai.cpp ├── download.js ├── figs ├── 1135.png ├── 1146.png ├── 1157.png ├── 1168.png ├── 1172.png ├── 1177.png ├── 1178.png ├── 1187.png ├── 1200.png ├── 1216.png ├── 1218.png ├── 1246.png ├── 1269.png ├── 127.png ├── 1283.png ├── 1296.png ├── 1340.png ├── 1353.png ├── 1357.png ├── 1396.png ├── 1420.png ├── 1429.png ├── 1452.png ├── 1461.png ├── 1462.png ├── 1478.png ├── 1482.png ├── 1483.png ├── 1488.png ├── 1505.png ├── 1520.png ├── 1521.png ├── 1531.png ├── 1546.png ├── 1554.png ├── 1558.png ├── 1562.png ├── 1564.png ├── 1580.png ├── 1590.png ├── 1606.png ├── 1626.png ├── 1627.png ├── 1630.png ├── 1637.png ├── 164.png ├── 1648.png ├── 1655.png ├── 1675.png ├── 1679.png ├── 170.png ├── 1705.png ├── 1707.png ├── 1711.png ├── 1713.png ├── 1714.png ├── 1726.png ├── 1760.png ├── 1761.png ├── 1788.png ├── 1792.png ├── 1803.png ├── 1814.png ├── 1817.png ├── 1819.png ├── 1825.png ├── 1828.png ├── 1830.png ├── 1833.png ├── 1834.png ├── 1845.png ├── 1852.png ├── 1857.png ├── 1858.png ├── 1862.png ├── 1865.png ├── 1870.png ├── 1906.png ├── 1948.png ├── 1962.png ├── 1964.png ├── 2002.png ├── 2007.png ├── 2009.png ├── 204.png ├── 2040.png ├── 2064.png ├── 2076.png ├── 211.png ├── 2117.png ├── 2126.png ├── 2141.png ├── 2151.png ├── 2157.png ├── 2183.png ├── 2187.png ├── 2188.png ├── 2195.png ├── 2208.png ├── 2233.png ├── 2274.png ├── 2275.png ├── 2322.png ├── 2333.png ├── 2382.png ├── 2386.png ├── 2411.png ├── 2435.png ├── 305.png ├── 318.png ├── 325.png ├── 363.png ├── 373.png ├── 391.png ├── 406.png ├── 421.png ├── 472.png ├── 477.png ├── 516.png ├── 524.png ├── 527.png ├── 546.png ├── 548.png ├── 555.png ├── 632.png ├── 644.png ├── 652.png ├── 668.png ├── 675.png ├── 706.png ├── 711.png ├── 715.png ├── 720.png ├── 729.png ├── 731.png ├── 764.png ├── 792.png ├── 820.png ├── 823.png ├── 846.png ├── 870.png ├── 875.png ├── 895.png ├── 898.png ├── 911.png ├── 912.png ├── 945.png ├── 952.png ├── 954.png ├── 963.png ├── cn │ ├── 1143.png │ ├── 1283_asm.png │ ├── 1803_asm.png │ ├── 1924.png │ ├── 2013.png │ ├── 2014.png │ ├── 2294.png │ ├── 2552_asm.png │ └── 2746.png └── tmp │ ├── 1157_92ms.png │ ├── 1283_4ms.png │ ├── 1655_4ms_java.png │ ├── 1675_56ms.png │ ├── 170_24ms.png │ ├── 516_8ms.png │ ├── 675_48ms.png │ ├── 952_32ms.png │ ├── err │ ├── 1705_44ms_err.png │ └── 1705_88ms_err.png │ └── hack │ ├── 307_hack.png │ ├── 307_memory.png │ ├── 338_hack.png │ └── 894_hack.png ├── miscellaneous_topics.pdf ├── open_problems.txt ├── references.bib └── templates ├── mkd.cpp ├── run_asm.py └── template.cpp /0001-0100/002. Add Two Numbers.txt: -------------------------------------------------------------------------------- 1 | simulation. O(n). 2 | -------------------------------------------------------------------------------- /0001-0100/005. Longest Palindromic Substring.txt: -------------------------------------------------------------------------------- 1 | Manacher algorithm. O(n). 2 | -------------------------------------------------------------------------------- /0001-0100/011. Container With Most Water.txt: -------------------------------------------------------------------------------- 1 | use monotone property. O(n). 2 | -------------------------------------------------------------------------------- /0001-0100/014. Longest Common Prefix.txt: -------------------------------------------------------------------------------- 1 | find the letters one by one. O(L). 2 | -------------------------------------------------------------------------------- /0001-0100/020. Valid Parentheses.txt: -------------------------------------------------------------------------------- 1 | use counters. O(n). 2 | 3 | -------------------------------------------------------------------------------- /0001-0100/022. Generate Parentheses.txt: -------------------------------------------------------------------------------- 1 | search. 2 | #solutions: Catalan number. 3 | 4 | -------------------------------------------------------------------------------- /0001-0100/025. Reverse Nodes in k-Group.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | -------------------------------------------------------------------------------- /0001-0100/026. Remove Duplicates from Sorted Array.txt: -------------------------------------------------------------------------------- 1 | unique_element (C++). O(n). 2 | -------------------------------------------------------------------------------- /0001-0100/031. Next Permutation.txt: -------------------------------------------------------------------------------- 1 | next_permutation (C++). O(n). 2 | -------------------------------------------------------------------------------- /0001-0100/032. Longest Valid Parentheses.txt: -------------------------------------------------------------------------------- 1 | use stack. O(n). 2 | -------------------------------------------------------------------------------- /0001-0100/033. Search in Rotated Sorted Array.txt: -------------------------------------------------------------------------------- 1 | binary search. O(log n). 2 | -------------------------------------------------------------------------------- /0001-0100/035. Search Insert Position.txt: -------------------------------------------------------------------------------- 1 | binary search. O(log n). 2 | 3 | -------------------------------------------------------------------------------- /0001-0100/043. Multiply Strings.txt: -------------------------------------------------------------------------------- 1 | FFT. O(n log n) (word complexity). 2 | -------------------------------------------------------------------------------- /0001-0100/049. Group Anagrams.txt: -------------------------------------------------------------------------------- 1 | hashing. 2 | -------------------------------------------------------------------------------- /0001-0100/052. N-Queens II.txt: -------------------------------------------------------------------------------- 1 | see 051. N-Queens. 2 | -------------------------------------------------------------------------------- /0001-0100/053. Maximum Subarray.txt: -------------------------------------------------------------------------------- 1 | greedy. O(n). 2 | -------------------------------------------------------------------------------- /0001-0100/055. Jump Game.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | -------------------------------------------------------------------------------- /0001-0100/056. Merge Intervals.txt: -------------------------------------------------------------------------------- 1 | O(n) after sorting. 2 | -------------------------------------------------------------------------------- /0001-0100/057. Insert Interval.txt: -------------------------------------------------------------------------------- 1 | reduce to 056. Merge Intervals. O(n). 2 | -------------------------------------------------------------------------------- /0001-0100/062. Unique Paths.txt: -------------------------------------------------------------------------------- 1 | DP. O(nm). 2 | -------------------------------------------------------------------------------- /0001-0100/063. Unique Paths II.txt: -------------------------------------------------------------------------------- 1 | DP. O(nm). 2 | -------------------------------------------------------------------------------- /0001-0100/064. Minimum Path Sum.txt: -------------------------------------------------------------------------------- 1 | DP. O(nm). 2 | -------------------------------------------------------------------------------- /0001-0100/065. Valid Number.txt: -------------------------------------------------------------------------------- 1 | use DFA. 2 | -------------------------------------------------------------------------------- /0001-0100/066. Plus One.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | -------------------------------------------------------------------------------- /0001-0100/067. Add Binary.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | -------------------------------------------------------------------------------- /0001-0100/068. Text Justification.txt: -------------------------------------------------------------------------------- 1 | simulation. 2 | -------------------------------------------------------------------------------- /0001-0100/071. Simplify Path.txt: -------------------------------------------------------------------------------- 1 | stack. O(n). 2 | -------------------------------------------------------------------------------- /0001-0100/073. Set Matrix Zeroes.txt: -------------------------------------------------------------------------------- 1 | O(nm) time, O(1) additional space. 2 | -------------------------------------------------------------------------------- /0001-0100/074. Search a 2D Matrix.txt: -------------------------------------------------------------------------------- 1 | binary search. O(log n+log m). 2 | -------------------------------------------------------------------------------- /0001-0100/076. Minimum Window Substring.txt: -------------------------------------------------------------------------------- 1 | double pointers. O(n). 2 | -------------------------------------------------------------------------------- /0001-0100/077. Combinations.txt: -------------------------------------------------------------------------------- 1 | 1. bit operation. O(C(n,k)). 2 | 2. dfs. O(C(n,k)). 3 | -------------------------------------------------------------------------------- /0001-0100/078. Subsets.txt: -------------------------------------------------------------------------------- 1 | dfs. O(#subsets). 2 | -------------------------------------------------------------------------------- /0001-0100/079. Word Search.txt: -------------------------------------------------------------------------------- 1 | dfs. 2 | 3 | see 212. Word Search II. 4 | -------------------------------------------------------------------------------- /0001-0100/082. Remove Duplicates from Sorted List II.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | -------------------------------------------------------------------------------- /0001-0100/084. Largest Rectangle in Histogram.txt: -------------------------------------------------------------------------------- 1 | use stack. O(n). 2 | -------------------------------------------------------------------------------- /0001-0100/086. Partition List.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | -------------------------------------------------------------------------------- /0001-0100/088. Merge Sorted Array.txt: -------------------------------------------------------------------------------- 1 | O(n). see 021. Merge Two Sorted Lists. 2 | -------------------------------------------------------------------------------- /0001-0100/089. Gray Code.txt: -------------------------------------------------------------------------------- 1 | iterative construction. 2 | -------------------------------------------------------------------------------- /0001-0100/090. Subsets II.txt: -------------------------------------------------------------------------------- 1 | dfs. O(#subsets). 2 | 3 | -------------------------------------------------------------------------------- /0001-0100/095. Unique Binary Search Trees II.txt: -------------------------------------------------------------------------------- 1 | dfs. 2 | -------------------------------------------------------------------------------- /0001-0100/098. Validate Binary Search Tree.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | -------------------------------------------------------------------------------- /0001-0100/100. Same Tree.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n). 2 | -------------------------------------------------------------------------------- /0101-0200/101. Symmetric Tree.txt: -------------------------------------------------------------------------------- 1 | recursion. O(n). 2 | -------------------------------------------------------------------------------- /0101-0200/102. Binary Tree Level Order Traversal.txt: -------------------------------------------------------------------------------- 1 | bfs. O(n). 2 | -------------------------------------------------------------------------------- /0101-0200/103. Binary Tree Zigzag Level Order Traversal.txt: -------------------------------------------------------------------------------- 1 | bfs. O(n). 2 | -------------------------------------------------------------------------------- /0101-0200/104. Maximum Depth of Binary Tree.txt: -------------------------------------------------------------------------------- 1 | recursion. O(n). 2 | -------------------------------------------------------------------------------- /0101-0200/105. Construct Binary Tree from Preorder and Inorder Traversal.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | -------------------------------------------------------------------------------- /0101-0200/106. Construct Binary Tree from Inorder and Postorder Traversal.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | -------------------------------------------------------------------------------- /0101-0200/107. Binary Tree Level Order Traversal II.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | -------------------------------------------------------------------------------- /0101-0200/108. Convert Sorted Array to Binary Search Tree.txt: -------------------------------------------------------------------------------- 1 | recursion. O(n). 2 | -------------------------------------------------------------------------------- /0101-0200/110. Balanced Binary Tree.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | -------------------------------------------------------------------------------- /0101-0200/111. Minimum Depth of Binary Tree.txt: -------------------------------------------------------------------------------- 1 | recursion. O(n). 2 | -------------------------------------------------------------------------------- /0101-0200/112. Path Sum.txt: -------------------------------------------------------------------------------- 1 | dfs, calculate prefix sum on tree. O(n). 2 | -------------------------------------------------------------------------------- /0101-0200/113. Path Sum II.txt: -------------------------------------------------------------------------------- 1 | dfs, calculate prefix sum on tree. O(n). 2 | -------------------------------------------------------------------------------- /0101-0200/114. Flatten Binary Tree to Linked List.txt: -------------------------------------------------------------------------------- 1 | inorder traversal, O(n). 2 | -------------------------------------------------------------------------------- /0101-0200/118. Pascal's Triangle.txt: -------------------------------------------------------------------------------- 1 | DP. O(n^2). 2 | see 119. Pascal's Triangle II. 3 | -------------------------------------------------------------------------------- /0101-0200/120. Triangle.txt: -------------------------------------------------------------------------------- 1 | DP. O(n^2). 2 | -------------------------------------------------------------------------------- /0101-0200/121. Best Time to Buy and Sell Stock.txt: -------------------------------------------------------------------------------- 1 | greedy. O(n). 2 | -------------------------------------------------------------------------------- /0101-0200/122. Best Time to Buy and Sell Stock II.txt: -------------------------------------------------------------------------------- 1 | greedy. O(n). 2 | -------------------------------------------------------------------------------- /0101-0200/128. Longest Consecutive Sequence.txt: -------------------------------------------------------------------------------- 1 | hashing. O(n). 2 | -------------------------------------------------------------------------------- /0101-0200/130. Surrounded Regions.txt: -------------------------------------------------------------------------------- 1 | flood fill. O(nm). 2 | 3 | -------------------------------------------------------------------------------- /0101-0200/131. Palindrome Partitioning.txt: -------------------------------------------------------------------------------- 1 | see 132. Palindrome Partitioning II. 2 | -------------------------------------------------------------------------------- /0101-0200/133. Clone Graph.txt: -------------------------------------------------------------------------------- 1 | dfs. 2 | -------------------------------------------------------------------------------- /0101-0200/134. Gas Station.txt: -------------------------------------------------------------------------------- 1 | greedy. We only need to scan the array once. O(n). 2 | -------------------------------------------------------------------------------- /0101-0200/135. Candy.txt: -------------------------------------------------------------------------------- 1 | scan left to right and right to left. O(n). 2 | -------------------------------------------------------------------------------- /0101-0200/136. Single Number.txt: -------------------------------------------------------------------------------- 1 | xor. O(n) time, O(1) space. 2 | -------------------------------------------------------------------------------- /0101-0200/138. Copy List with Random Pointer.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | -------------------------------------------------------------------------------- /0101-0200/142. Linked List Cycle II.txt: -------------------------------------------------------------------------------- 1 | see 141. Linked List Cycle. 2 | 3 | -------------------------------------------------------------------------------- /0101-0200/143. Reorder List.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | -------------------------------------------------------------------------------- /0101-0200/144. Binary Tree Preorder Traversal.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n). 2 | -------------------------------------------------------------------------------- /0101-0200/145. Binary Tree Postorder Traversal.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n). 2 | -------------------------------------------------------------------------------- /0101-0200/146. LRU Cache.txt: -------------------------------------------------------------------------------- 1 | hash+linked list. O(1) per operation. 2 | -------------------------------------------------------------------------------- /0101-0200/148. Sort List.txt: -------------------------------------------------------------------------------- 1 | merge sort. O(n log n) time, O(1) extra space. 2 | -------------------------------------------------------------------------------- /0101-0200/150. Evaluate Reverse Polish Notation.txt: -------------------------------------------------------------------------------- 1 | stack. O(n). 2 | -------------------------------------------------------------------------------- /0101-0200/152. Maximum Product Subarray.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | -------------------------------------------------------------------------------- /0101-0200/153. Find Minimum in Rotated Sorted Array.txt: -------------------------------------------------------------------------------- 1 | binary search. O(log n). 2 | -------------------------------------------------------------------------------- /0101-0200/155. Min Stack.txt: -------------------------------------------------------------------------------- 1 | prefix min. O(1) per operation. 2 | -------------------------------------------------------------------------------- /0101-0200/160. Intersection of Two Linked Lists.txt: -------------------------------------------------------------------------------- 1 | LCA. O(n) time, O(1) space. 2 | -------------------------------------------------------------------------------- /0101-0200/162. Find Peak Element.txt: -------------------------------------------------------------------------------- 1 | binary search. O(log n). 2 | -------------------------------------------------------------------------------- /0101-0200/163. Missing Ranges.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | -------------------------------------------------------------------------------- /0101-0200/174. Dungeon Game.txt: -------------------------------------------------------------------------------- 1 | DP. O(n*m). 2 | -------------------------------------------------------------------------------- /0101-0200/187. Repeated DNA Sequences.txt: -------------------------------------------------------------------------------- 1 | suffix tree/hashing. O(n). 2 | -------------------------------------------------------------------------------- /0101-0200/198. House Robber.txt: -------------------------------------------------------------------------------- 1 | DP. O(n). 2 | -------------------------------------------------------------------------------- /0101-0200/199. Binary Tree Right Side View.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | -------------------------------------------------------------------------------- /0201-0300/206. Reverse Linked List.txt: -------------------------------------------------------------------------------- 1 | O(n) time, O(1) space. 2 | -------------------------------------------------------------------------------- /0201-0300/207. Course Schedule.txt: -------------------------------------------------------------------------------- 1 | Topological sort. O(n+m). 2 | -------------------------------------------------------------------------------- /0201-0300/208. Implement Trie (Prefix Tree).txt: -------------------------------------------------------------------------------- 1 | Trie. O(L). 2 | -------------------------------------------------------------------------------- /0201-0300/209. Minimum Size Subarray Sum.txt: -------------------------------------------------------------------------------- 1 | double pointers. O(n). 2 | -------------------------------------------------------------------------------- /0201-0300/210. Course Schedule II.txt: -------------------------------------------------------------------------------- 1 | see 207. Course Schedule. 2 | -------------------------------------------------------------------------------- /0201-0300/214. Shortest Palindrome.txt: -------------------------------------------------------------------------------- 1 | KMP. O(n). 2 | -------------------------------------------------------------------------------- /0201-0300/219. Contains Duplicate II.txt: -------------------------------------------------------------------------------- 1 | hashing+sliding window. O(n). 2 | -------------------------------------------------------------------------------- /0201-0300/223. Rectangle Area.txt: -------------------------------------------------------------------------------- 1 | O(1). 2 | -------------------------------------------------------------------------------- /0201-0300/224. Basic Calculator.txt: -------------------------------------------------------------------------------- 1 | stack. O(n). 2 | -------------------------------------------------------------------------------- /0201-0300/226. Invert Binary Tree.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n). 2 | 3 | can do O(1) space. 4 | -------------------------------------------------------------------------------- /0201-0300/227. Basic Calculator II.txt: -------------------------------------------------------------------------------- 1 | stack. O(n). 2 | -------------------------------------------------------------------------------- /0201-0300/228. Summary Ranges.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | -------------------------------------------------------------------------------- /0201-0300/231. Power of Two.txt: -------------------------------------------------------------------------------- 1 | O(1). use lowbit, or n&(n-1). 2 | -------------------------------------------------------------------------------- /0201-0300/232. Implement Queue using Stacks.txt: -------------------------------------------------------------------------------- 1 | use 2 stacks. O(1) amortized. 2 | -------------------------------------------------------------------------------- /0201-0300/233. Number of Digit One.txt: -------------------------------------------------------------------------------- 1 | counting. O(log n). 2 | -------------------------------------------------------------------------------- /0201-0300/235. Lowest Common Ancestor of a Binary Search Tree.txt: -------------------------------------------------------------------------------- 1 | O(height). 2 | -------------------------------------------------------------------------------- /0201-0300/236. Lowest Common Ancestor of a Binary Tree.txt: -------------------------------------------------------------------------------- 1 | O(height). 2 | -------------------------------------------------------------------------------- /0201-0300/239. Sliding Window Maximum.txt: -------------------------------------------------------------------------------- 1 | monotone queue. O(n). 2 | -------------------------------------------------------------------------------- /0201-0300/240. Search a 2D Matrix II.txt: -------------------------------------------------------------------------------- 1 | monotone pointer. O(n+m). 2 | -------------------------------------------------------------------------------- /0201-0300/242. Valid Anagram.txt: -------------------------------------------------------------------------------- 1 | count. O(n). 2 | -------------------------------------------------------------------------------- /0201-0300/246. Strobogrammatic Number.txt: -------------------------------------------------------------------------------- 1 | O(log n). 2 | -------------------------------------------------------------------------------- /0201-0300/250. Count Univalue Subtrees.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n). 2 | -------------------------------------------------------------------------------- /0201-0300/251. Flatten 2D Vector.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | -------------------------------------------------------------------------------- /0201-0300/252. Meeting Rooms.txt: -------------------------------------------------------------------------------- 1 | O(n) after sorting. 2 | -------------------------------------------------------------------------------- /0201-0300/253. Meeting Rooms II.txt: -------------------------------------------------------------------------------- 1 | priority queue. 2 | -------------------------------------------------------------------------------- /0201-0300/255. Verify Preorder Sequence in Binary Search Tree.txt: -------------------------------------------------------------------------------- 1 | stack. O(n). 2 | -------------------------------------------------------------------------------- /0201-0300/261. Graph Valid Tree.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | -------------------------------------------------------------------------------- /0201-0300/266. Palindrome Permutation.txt: -------------------------------------------------------------------------------- 1 | count. O(n). 2 | -------------------------------------------------------------------------------- /0201-0300/267. Palindrome Permutation II.txt: -------------------------------------------------------------------------------- 1 | dfs. O(#solutions). 2 | 3 | -------------------------------------------------------------------------------- /0201-0300/268. Missing Number.txt: -------------------------------------------------------------------------------- 1 | 1. use sum. O(1). 2 | 2. use xor. O(1). 3 | -------------------------------------------------------------------------------- /0201-0300/270. Closest Binary Search Tree Value.txt: -------------------------------------------------------------------------------- 1 | O(height). 2 | -------------------------------------------------------------------------------- /0201-0300/273. Integer to English Words.txt: -------------------------------------------------------------------------------- 1 | simulation. 2 | -------------------------------------------------------------------------------- /0201-0300/275. H-Index II.txt: -------------------------------------------------------------------------------- 1 | binary search. O(log n). 2 | -------------------------------------------------------------------------------- /0201-0300/278. First Bad Version.txt: -------------------------------------------------------------------------------- 1 | binary search. O(log n). 2 | -------------------------------------------------------------------------------- /0201-0300/280. Wiggle Sort.txt: -------------------------------------------------------------------------------- 1 | use swap. O(n) time, O(1) space. 2 | -------------------------------------------------------------------------------- /0201-0300/285. Inorder Successor in BST.txt: -------------------------------------------------------------------------------- 1 | O(height). 2 | -------------------------------------------------------------------------------- /0201-0300/286. Walls and Gates.txt: -------------------------------------------------------------------------------- 1 | bfs. O(n*m). 2 | -------------------------------------------------------------------------------- /0201-0300/288. Unique Word Abbreviation.txt: -------------------------------------------------------------------------------- 1 | hashing. O(L). 2 | 3 | -------------------------------------------------------------------------------- /0201-0300/290. Word Pattern.txt: -------------------------------------------------------------------------------- 1 | compare the strings. O(L). 2 | -------------------------------------------------------------------------------- /0201-0300/292. Nim Game.txt: -------------------------------------------------------------------------------- 1 | return n%4. O(1). 2 | -------------------------------------------------------------------------------- /0201-0300/297. Serialize and Deserialize Binary Tree.txt: -------------------------------------------------------------------------------- 1 | () sequence. O(n). 2 | -------------------------------------------------------------------------------- /0201-0300/298. Binary Tree Longest Consecutive Sequence.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n). 2 | -------------------------------------------------------------------------------- /0301-0400/303. Range Sum Query - Immutable.txt: -------------------------------------------------------------------------------- 1 | prefix sum. O(n). 2 | -------------------------------------------------------------------------------- /0301-0400/304. Range Sum Query 2D - Immutable.txt: -------------------------------------------------------------------------------- 1 | prefix sum. O(n*m). 2 | -------------------------------------------------------------------------------- /0301-0400/309. Best Time to Buy and Sell Stock with Cooldown.txt: -------------------------------------------------------------------------------- 1 | DP. O(n). 2 | -------------------------------------------------------------------------------- /0301-0400/314. Binary Tree Vertical Order Traversal.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | -------------------------------------------------------------------------------- /0301-0400/316. Remove Duplicate Letters.txt: -------------------------------------------------------------------------------- 1 | greedy, use stack. O(n). 2 | -------------------------------------------------------------------------------- /0301-0400/326. Power of Three.txt: -------------------------------------------------------------------------------- 1 | O(1). 1162261467%n==0. 2 | -------------------------------------------------------------------------------- /0301-0400/333. Largest BST Subtree.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | -------------------------------------------------------------------------------- /0301-0400/337. House Robber III.txt: -------------------------------------------------------------------------------- 1 | tree DP. O(n). 2 | -------------------------------------------------------------------------------- /0301-0400/339. Nested List Weight Sum.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n). 2 | -------------------------------------------------------------------------------- /0301-0400/341. Flatten Nested List Iterator.txt: -------------------------------------------------------------------------------- 1 | dfs. 2 | -------------------------------------------------------------------------------- /0301-0400/342. Power of Four.txt: -------------------------------------------------------------------------------- 1 | O(1). is power of 2, and =1 (mod 3). 2 | -------------------------------------------------------------------------------- /0301-0400/344. Reverse String.txt: -------------------------------------------------------------------------------- 1 | double pointers. O(n). 2 | -------------------------------------------------------------------------------- /0301-0400/345. Reverse Vowels of a String.txt: -------------------------------------------------------------------------------- 1 | double pointers. O(n). 2 | 3 | -------------------------------------------------------------------------------- /0301-0400/346. Moving Average from Data Stream.txt: -------------------------------------------------------------------------------- 1 | sliding window. O(n). 2 | -------------------------------------------------------------------------------- /0301-0400/349. Intersection of Two Arrays.txt: -------------------------------------------------------------------------------- 1 | hashing. O(n). 2 | -------------------------------------------------------------------------------- /0301-0400/351. Android Unlock Patterns.txt: -------------------------------------------------------------------------------- 1 | dfs/DP with state compression. 2 | -------------------------------------------------------------------------------- /0301-0400/353. Design Snake Game.txt: -------------------------------------------------------------------------------- 1 | record the position of the snake. 2 | -------------------------------------------------------------------------------- /0301-0400/359. Logger Rate Limiter.txt: -------------------------------------------------------------------------------- 1 | simulation. 2 | -------------------------------------------------------------------------------- /0301-0400/361. Bomb Enemy.txt: -------------------------------------------------------------------------------- 1 | DP. O(nm). 2 | -------------------------------------------------------------------------------- /0301-0400/364. Nested List Weight Sum II.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n). 2 | -------------------------------------------------------------------------------- /0301-0400/365. Water and Jug Problem.txt: -------------------------------------------------------------------------------- 1 | gcd, ax+by=d. 2 | -------------------------------------------------------------------------------- /0301-0400/366. Find Leaves of Binary Tree.txt: -------------------------------------------------------------------------------- 1 | bfs from leaves. O(n). 2 | -------------------------------------------------------------------------------- /0301-0400/374. Guess Number Higher or Lower.txt: -------------------------------------------------------------------------------- 1 | binary search. O(log n). 2 | -------------------------------------------------------------------------------- /0301-0400/376. Wiggle Subsequence.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | -------------------------------------------------------------------------------- /0301-0400/379. Design Phone Directory.txt: -------------------------------------------------------------------------------- 1 | hashing/array of counters. 2 | -------------------------------------------------------------------------------- /0301-0400/384. Shuffle an Array.txt: -------------------------------------------------------------------------------- 1 | random_shuffle. O(n). 2 | -------------------------------------------------------------------------------- /0301-0400/385. Mini Parser.txt: -------------------------------------------------------------------------------- 1 | stack. O(n). 2 | -------------------------------------------------------------------------------- /0301-0400/386. Lexicographical Numbers.txt: -------------------------------------------------------------------------------- 1 | dfs on an implicit trie. O(n). 2 | -------------------------------------------------------------------------------- /0301-0400/388. Longest Absolute File Path.txt: -------------------------------------------------------------------------------- 1 | stack. O(n). 2 | -------------------------------------------------------------------------------- /0301-0400/389. Find the Difference.txt: -------------------------------------------------------------------------------- 1 | count each character, or use xor. O(n). 2 | -------------------------------------------------------------------------------- /0301-0400/393. UTF-8 Validation.txt: -------------------------------------------------------------------------------- 1 | bit operation. O(n). 2 | -------------------------------------------------------------------------------- /0301-0400/394. Decode String.txt: -------------------------------------------------------------------------------- 1 | recursively decode, use stack. O(L). 2 | -------------------------------------------------------------------------------- /0301-0400/396. Rotate Function.txt: -------------------------------------------------------------------------------- 1 | prefix sum for i*A[i]. O(n). 2 | -------------------------------------------------------------------------------- /0301-0400/399. Evaluate Division.txt: -------------------------------------------------------------------------------- 1 | dfs, find connected component. O(n). 2 | 3 | -------------------------------------------------------------------------------- /0401-0500/403. Frog Jump.txt: -------------------------------------------------------------------------------- 1 | dfs with memoization. O(n^2). 2 | -------------------------------------------------------------------------------- /0401-0500/413. Arithmetic Slices.txt: -------------------------------------------------------------------------------- 1 | linear scan. O(n). 2 | -------------------------------------------------------------------------------- /0401-0500/414. Third Maximum Number.txt: -------------------------------------------------------------------------------- 1 | record the top 3 maximum. O(n). 2 | -------------------------------------------------------------------------------- /0401-0500/415. Add Strings.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | -------------------------------------------------------------------------------- /0401-0500/417. Pacific Atlantic Water Flow.txt: -------------------------------------------------------------------------------- 1 | flood fill. O(nm). 2 | -------------------------------------------------------------------------------- /0401-0500/420. Strong Password Checker.txt: -------------------------------------------------------------------------------- 1 | case by case analysis, greedy. O(n). 2 | -------------------------------------------------------------------------------- /0401-0500/425. Word Squares.txt: -------------------------------------------------------------------------------- 1 | dfs, using trie. 2 | -------------------------------------------------------------------------------- /0401-0500/427. Construct Quad Tree.txt: -------------------------------------------------------------------------------- 1 | simulation. O(n^2). 2 | -------------------------------------------------------------------------------- /0401-0500/428. Serialize and Deserialize N-ary Tree.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n). 2 | -------------------------------------------------------------------------------- /0401-0500/429. N-ary Tree Level Order Traversal.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n). 2 | -------------------------------------------------------------------------------- /0401-0500/430. Flatten a Multilevel Doubly Linked List.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n). 2 | -------------------------------------------------------------------------------- /0401-0500/432. All O`one Data Structure.txt: -------------------------------------------------------------------------------- 1 | hash+bucket. O(1) per operation. 2 | -------------------------------------------------------------------------------- /0401-0500/435. Non-overlapping Intervals.txt: -------------------------------------------------------------------------------- 1 | greedy. O(n) after sorting. 2 | -------------------------------------------------------------------------------- /0401-0500/436. Find Right Interval.txt: -------------------------------------------------------------------------------- 1 | O(n) after sorting. 2 | -------------------------------------------------------------------------------- /0401-0500/441. Arranging Coins.txt: -------------------------------------------------------------------------------- 1 | math formula. O(1). 2 | -------------------------------------------------------------------------------- /0401-0500/444. Sequence Reconstruction.txt: -------------------------------------------------------------------------------- 1 | topological sort. O(n). 2 | -------------------------------------------------------------------------------- /0401-0500/445. Add Two Numbers II.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | -------------------------------------------------------------------------------- /0401-0500/447. Number of Boomerangs.txt: -------------------------------------------------------------------------------- 1 | hashing. O(n^2). 2 | 3 | -------------------------------------------------------------------------------- /0401-0500/450. Delete Node in a BST.txt: -------------------------------------------------------------------------------- 1 | O(height). 2 | -------------------------------------------------------------------------------- /0401-0500/451. Sort Characters By Frequency.txt: -------------------------------------------------------------------------------- 1 | hashing+bucket sort. O(n). 2 | -------------------------------------------------------------------------------- /0401-0500/454. 4Sum II.txt: -------------------------------------------------------------------------------- 1 | see 18. 4Sum. 2 | -------------------------------------------------------------------------------- /0401-0500/455. Assign Cookies.txt: -------------------------------------------------------------------------------- 1 | greedy. O(n) after sorting. 2 | -------------------------------------------------------------------------------- /0401-0500/460. LFU Cache.txt: -------------------------------------------------------------------------------- 1 | hash table+linked list. O(1) per operation. 2 | -------------------------------------------------------------------------------- /0401-0500/461. Hamming Distance.txt: -------------------------------------------------------------------------------- 1 | __builtin_popcount(x^y). 2 | -------------------------------------------------------------------------------- /0401-0500/462. Minimum Moves to Equal Array Elements II.txt: -------------------------------------------------------------------------------- 1 | find median. O(n). 2 | -------------------------------------------------------------------------------- /0401-0500/467. Unique Substrings in Wraparound String.txt: -------------------------------------------------------------------------------- 1 | two pointers. O(n). 2 | -------------------------------------------------------------------------------- /0401-0500/468. Validate IP Address.txt: -------------------------------------------------------------------------------- 1 | simulation. 2 | -------------------------------------------------------------------------------- /0401-0500/469. Convex Polygon.txt: -------------------------------------------------------------------------------- 1 | use cross product. O(n). 2 | -------------------------------------------------------------------------------- /0401-0500/471. Encode String with Shortest Length.txt: -------------------------------------------------------------------------------- 1 | dfs. 2 | -------------------------------------------------------------------------------- /0401-0500/475. Heaters.txt: -------------------------------------------------------------------------------- 1 | O(n) after sorting. 2 | -------------------------------------------------------------------------------- /0401-0500/476. Number Complement.txt: -------------------------------------------------------------------------------- 1 | O(1), __builtin_clz (C++). 2 | -------------------------------------------------------------------------------- /0401-0500/478. Generate Random Point in a Circle.txt: -------------------------------------------------------------------------------- 1 | rejection sampling. O(1). 2 | -------------------------------------------------------------------------------- /0401-0500/487. Max Consecutive Ones II.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | -------------------------------------------------------------------------------- /0401-0500/489. Robot Room Cleaner.txt: -------------------------------------------------------------------------------- 1 | dfs. O(nm). 2 | -------------------------------------------------------------------------------- /0401-0500/490. The Maze.txt: -------------------------------------------------------------------------------- 1 | 4n^2 states, BFS. O(n^2). 2 | -------------------------------------------------------------------------------- /0401-0500/493. Reverse Pairs.txt: -------------------------------------------------------------------------------- 1 | merge sort. O(n log n). 2 | -------------------------------------------------------------------------------- /0401-0500/495. Teemo Attacking.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | -------------------------------------------------------------------------------- /0401-0500/499. The Maze III.txt: -------------------------------------------------------------------------------- 1 | dijkstra (can use bucket). O(n^2). 2 | -------------------------------------------------------------------------------- /0501-0600/501. Find Mode in Binary Search Tree.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | -------------------------------------------------------------------------------- /0501-0600/505. The Maze II.txt: -------------------------------------------------------------------------------- 1 | see 499. The Maze III. O(n^2). 2 | 3 | -------------------------------------------------------------------------------- /0501-0600/508. Most Frequent Subtree Sum.txt: -------------------------------------------------------------------------------- 1 | hashing. O(n). 2 | -------------------------------------------------------------------------------- /0501-0600/510. Inorder Successor in BST II.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n). 2 | -------------------------------------------------------------------------------- /0501-0600/515. Find Largest Value in Each Tree Row.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | -------------------------------------------------------------------------------- /0501-0600/518. Coin Change 2.txt: -------------------------------------------------------------------------------- 1 | FFT. see 322. Coin Change. 2 | -------------------------------------------------------------------------------- /0501-0600/521. Longest Uncommon Subsequence I.txt: -------------------------------------------------------------------------------- 1 | trivial O(1). 2 | -------------------------------------------------------------------------------- /0501-0600/523. Continuous Subarray Sum.txt: -------------------------------------------------------------------------------- 1 | prefix sum mod k, hashing. O(n). 2 | -------------------------------------------------------------------------------- /0501-0600/525. Contiguous Array.txt: -------------------------------------------------------------------------------- 1 | prefix sum, hashing (bucket). O(n). 2 | -------------------------------------------------------------------------------- /0501-0600/529. Minesweeper.txt: -------------------------------------------------------------------------------- 1 | simulation, O(n^2). 2 | -------------------------------------------------------------------------------- /0501-0600/530. Minimum Absolute Difference in BST.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | -------------------------------------------------------------------------------- /0501-0600/531. Lonely Pixel I.txt: -------------------------------------------------------------------------------- 1 | trivial. O(n^2). 2 | -------------------------------------------------------------------------------- /0501-0600/532. K-diff Pairs in an Array.txt: -------------------------------------------------------------------------------- 1 | hashing. O(n). 2 | -------------------------------------------------------------------------------- /0501-0600/533. Lonely Pixel II.txt: -------------------------------------------------------------------------------- 1 | we can use trie for rows. O(n^2). 2 | -------------------------------------------------------------------------------- /0501-0600/536. Construct Binary Tree from String.txt: -------------------------------------------------------------------------------- 1 | stack. O(n). 2 | -------------------------------------------------------------------------------- /0501-0600/538. Convert BST to Greater Tree.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | -------------------------------------------------------------------------------- /0501-0600/539. Minimum Time Difference.txt: -------------------------------------------------------------------------------- 1 | reduce to sorting. 2 | -------------------------------------------------------------------------------- /0501-0600/542. 01 Matrix.txt: -------------------------------------------------------------------------------- 1 | bfs, starting from the 0s. O(n^2). 2 | -------------------------------------------------------------------------------- /0501-0600/543. Diameter of Binary Tree.txt: -------------------------------------------------------------------------------- 1 | bfs twice. O(n). 2 | -------------------------------------------------------------------------------- /0501-0600/544. Output Contest Matches.txt: -------------------------------------------------------------------------------- 1 | iteratively construct. 2 | -------------------------------------------------------------------------------- /0501-0600/545. Boundary of Binary Tree.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n). 2 | -------------------------------------------------------------------------------- /0501-0600/547. Friend Circles.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n^2). 2 | -------------------------------------------------------------------------------- /0501-0600/554. Brick Wall.txt: -------------------------------------------------------------------------------- 1 | hashing. O(n). 2 | -------------------------------------------------------------------------------- /0501-0600/556. Next Greater Element III.txt: -------------------------------------------------------------------------------- 1 | next_permutation. 2 | -------------------------------------------------------------------------------- /0501-0600/558. Quad Tree Intersection.txt: -------------------------------------------------------------------------------- 1 | dfs. 2 | -------------------------------------------------------------------------------- /0501-0600/559. Maximum Depth of N-ary Tree.txt: -------------------------------------------------------------------------------- 1 | recursion. O(n). 2 | -------------------------------------------------------------------------------- /0501-0600/560. Subarray Sum Equals K.txt: -------------------------------------------------------------------------------- 1 | prefix sum, hashing. O(n). 2 | -------------------------------------------------------------------------------- /0501-0600/561. Array Partition I.txt: -------------------------------------------------------------------------------- 1 | greedy, reduce to sorting. 2 | -------------------------------------------------------------------------------- /0501-0600/563. Binary Tree Tilt.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | -------------------------------------------------------------------------------- /0501-0600/564. Find the Closest Palindrome.txt: -------------------------------------------------------------------------------- 1 | O(log n). 2 | -------------------------------------------------------------------------------- /0501-0600/565. Array Nesting.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | -------------------------------------------------------------------------------- /0501-0600/568. Maximum Vacation Days.txt: -------------------------------------------------------------------------------- 1 | DP/shortest path. O(mk)=O(n^2k). 2 | 3 | -------------------------------------------------------------------------------- /0501-0600/575. Distribute Candies.txt: -------------------------------------------------------------------------------- 1 | hashing. O(n). 2 | -------------------------------------------------------------------------------- /0501-0600/582. Kill Process.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n). 2 | -------------------------------------------------------------------------------- /0501-0600/587. Erect the Fence.txt: -------------------------------------------------------------------------------- 1 | convex hull. O(n log n). 2 | -------------------------------------------------------------------------------- /0501-0600/588. Design In-Memory File System.txt: -------------------------------------------------------------------------------- 1 | simulation. 2 | -------------------------------------------------------------------------------- /0501-0600/591. Tag Validator.txt: -------------------------------------------------------------------------------- 1 | regular expression. 2 | -------------------------------------------------------------------------------- /0501-0600/594. Longest Harmonious Subsequence.txt: -------------------------------------------------------------------------------- 1 | hashing. O(n). 2 | -------------------------------------------------------------------------------- /0501-0600/598. Range Addition II.txt: -------------------------------------------------------------------------------- 1 | O(#operations). 2 | -------------------------------------------------------------------------------- /0501-0600/599. Minimum Index Sum of Two Lists.txt: -------------------------------------------------------------------------------- 1 | hashing. O(n). 2 | -------------------------------------------------------------------------------- /0601-0700/605. Can Place Flowers.txt: -------------------------------------------------------------------------------- 1 | greedy. O(n). 2 | -------------------------------------------------------------------------------- /0601-0700/609. Find Duplicate File in System.txt: -------------------------------------------------------------------------------- 1 | Trie. 2 | -------------------------------------------------------------------------------- /0601-0700/617. Merge Two Binary Trees.txt: -------------------------------------------------------------------------------- 1 | time: O(#duplicate nodes). 2 | -------------------------------------------------------------------------------- /0601-0700/622. Design Circular Queue.txt: -------------------------------------------------------------------------------- 1 | O(1) per operation. 2 | -------------------------------------------------------------------------------- /0601-0700/630. Course Schedule III.txt: -------------------------------------------------------------------------------- 1 | greedy. O(n log n). 2 | -------------------------------------------------------------------------------- /0601-0700/635. Design Log Storage System.txt: -------------------------------------------------------------------------------- 1 | hashing. 2 | -------------------------------------------------------------------------------- /0601-0700/636. Exclusive Time of Functions.txt: -------------------------------------------------------------------------------- 1 | stack. O(n). 2 | -------------------------------------------------------------------------------- /0601-0700/640. Solve the Equation.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | -------------------------------------------------------------------------------- /0601-0700/641. Design Circular Deque.txt: -------------------------------------------------------------------------------- 1 | O(1) per operation. 2 | -------------------------------------------------------------------------------- /0601-0700/643. Maximum Average Subarray I.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | -------------------------------------------------------------------------------- /0601-0700/646. Maximum Length of Pair Chain.txt: -------------------------------------------------------------------------------- 1 | greedy, O(n) after sorting. 2 | -------------------------------------------------------------------------------- /0601-0700/647. Palindromic Substrings.txt: -------------------------------------------------------------------------------- 1 | Manacher, O(n). 2 | -------------------------------------------------------------------------------- /0601-0700/648. Replace Words.txt: -------------------------------------------------------------------------------- 1 | Trie. O(n). 2 | -------------------------------------------------------------------------------- /0601-0700/649. Dota2 Senate.txt: -------------------------------------------------------------------------------- 1 | greedy. O(n). 2 | -------------------------------------------------------------------------------- /0601-0700/656. Coin Path.txt: -------------------------------------------------------------------------------- 1 | DP, monotonic queue. O(n). 2 | -------------------------------------------------------------------------------- /0601-0700/657. Robot Return to Origin.txt: -------------------------------------------------------------------------------- 1 | simulation. O(n). 2 | -------------------------------------------------------------------------------- /0601-0700/660. Remove 9.txt: -------------------------------------------------------------------------------- 1 | math, use 9-based number system. O(log n). 2 | -------------------------------------------------------------------------------- /0601-0700/661. Image Smoother.txt: -------------------------------------------------------------------------------- 1 | O(nm). 2 | -------------------------------------------------------------------------------- /0601-0700/662. Maximum Width of Binary Tree.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n). 2 | -------------------------------------------------------------------------------- /0601-0700/663. Equal Tree Partition.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n). 2 | -------------------------------------------------------------------------------- /0601-0700/665. Non-decreasing Array.txt: -------------------------------------------------------------------------------- 1 | local property, O(n) check. 2 | 3 | -------------------------------------------------------------------------------- /0601-0700/666. Path Sum IV.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n). 2 | -------------------------------------------------------------------------------- /0601-0700/669. Trim a Binary Search Tree.txt: -------------------------------------------------------------------------------- 1 | dfs, O(n). 2 | 3 | -------------------------------------------------------------------------------- /0601-0700/671. Second Minimum Node In a Binary Tree.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n). 2 | 3 | -------------------------------------------------------------------------------- /0601-0700/674. Longest Continuous Increasing Subsequence.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | -------------------------------------------------------------------------------- /0601-0700/676. Implement Magic Dictionary.txt: -------------------------------------------------------------------------------- 1 | string hashing. O(L). 2 | 3 | -------------------------------------------------------------------------------- /0601-0700/681. Next Closest Time.txt: -------------------------------------------------------------------------------- 1 | eumerate. O(1). 2 | 3 | -------------------------------------------------------------------------------- /0601-0700/682. Baseball Game.txt: -------------------------------------------------------------------------------- 1 | stack, O(n). 2 | 3 | -------------------------------------------------------------------------------- /0601-0700/686. Repeated String Match.txt: -------------------------------------------------------------------------------- 1 | kmp. O(n). 2 | 3 | -------------------------------------------------------------------------------- /0601-0700/687. Longest Univalue Path.txt: -------------------------------------------------------------------------------- 1 | DP. O(n). 2 | 3 | -------------------------------------------------------------------------------- /0601-0700/688. Knight Probability in Chessboard.txt: -------------------------------------------------------------------------------- 1 | DP. O(n^2*k). 2 | 3 | -------------------------------------------------------------------------------- /0601-0700/690. Employee Importance.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n). 2 | 3 | -------------------------------------------------------------------------------- /0601-0700/692. Top K Frequent Words.txt: -------------------------------------------------------------------------------- 1 | trie+bucket sort. O(L). 2 | 3 | -------------------------------------------------------------------------------- /0601-0700/694. Number of Distinct Islands.txt: -------------------------------------------------------------------------------- 1 | hashing. O(nm). 2 | 3 | -------------------------------------------------------------------------------- /0601-0700/695. Max Area of Island.txt: -------------------------------------------------------------------------------- 1 | dfs. O(nm). 2 | 3 | -------------------------------------------------------------------------------- /0601-0700/696. Count Binary Substrings.txt: -------------------------------------------------------------------------------- 1 | counting. O(n). 2 | 3 | -------------------------------------------------------------------------------- /0601-0700/697. Degree of an Array.txt: -------------------------------------------------------------------------------- 1 | hashing. O(n). 2 | -------------------------------------------------------------------------------- /0601-0700/700. Search in a Binary Search Tree.txt: -------------------------------------------------------------------------------- 1 | dfs. O(h). 2 | 3 | -------------------------------------------------------------------------------- /0701-0800/701. Insert into a Binary Search Tree.txt: -------------------------------------------------------------------------------- 1 | O(h). 2 | 3 | -------------------------------------------------------------------------------- /0701-0800/705. Design HashSet.txt: -------------------------------------------------------------------------------- 1 | expected O(1) per operation. 2 | -------------------------------------------------------------------------------- /0701-0800/708. Insert into a Sorted Circular Linked List.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /0701-0800/713. Subarray Product Less Than K.txt: -------------------------------------------------------------------------------- 1 | two pointers. O(n). 2 | 3 | -------------------------------------------------------------------------------- /0701-0800/716. Max Stack.txt: -------------------------------------------------------------------------------- 1 | O(1) per operation. 2 | 3 | -------------------------------------------------------------------------------- /0701-0800/722. Remove Comments.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /0701-0800/724. Find Pivot Index.txt: -------------------------------------------------------------------------------- 1 | prefix sum. O(n). 2 | 3 | -------------------------------------------------------------------------------- /0701-0800/725. Split Linked List in Parts.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /0701-0800/726. Number of Atoms.txt: -------------------------------------------------------------------------------- 1 | O(L). 2 | 3 | -------------------------------------------------------------------------------- /0701-0800/733. Flood Fill.txt: -------------------------------------------------------------------------------- 1 | O(nm). 2 | 3 | -------------------------------------------------------------------------------- /0701-0800/734. Sentence Similarity.txt: -------------------------------------------------------------------------------- 1 | hashing/trie. O(L). 2 | 3 | -------------------------------------------------------------------------------- /0701-0800/735. Asteroid Collision.txt: -------------------------------------------------------------------------------- 1 | stack. O(n). 2 | 3 | -------------------------------------------------------------------------------- /0701-0800/736. Parse Lisp Expression.txt: -------------------------------------------------------------------------------- 1 | stack. O(n). 2 | 3 | -------------------------------------------------------------------------------- /0701-0800/738. Monotone Increasing Digits.txt: -------------------------------------------------------------------------------- 1 | O(log n). 2 | 3 | -------------------------------------------------------------------------------- /0701-0800/739. Daily Temperatures.txt: -------------------------------------------------------------------------------- 1 | monotone queue. O(n). 2 | 3 | -------------------------------------------------------------------------------- /0701-0800/742. Closest Leaf in a Binary Tree.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n). 2 | 3 | -------------------------------------------------------------------------------- /0701-0800/746. Min Cost Climbing Stairs.txt: -------------------------------------------------------------------------------- 1 | DP. O(n). 2 | 3 | -------------------------------------------------------------------------------- /0701-0800/747. Largest Number At Least Twice of Others.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /0701-0800/748. Shortest Completing Word.txt: -------------------------------------------------------------------------------- 1 | O(L). 2 | 3 | -------------------------------------------------------------------------------- /0701-0800/751. IP to CIDR.txt: -------------------------------------------------------------------------------- 1 | repeatedly find the last 1 bit. 2 | -------------------------------------------------------------------------------- /0701-0800/752. Open the Lock.txt: -------------------------------------------------------------------------------- 1 | bfs. O(10^4). 2 | 3 | -------------------------------------------------------------------------------- /0701-0800/755. Pour Water.txt: -------------------------------------------------------------------------------- 1 | merge indices with the same height. O(n). 2 | 3 | -------------------------------------------------------------------------------- /0701-0800/759. Employee Free Time.txt: -------------------------------------------------------------------------------- 1 | reduce to sorting. O(sort(n)). 2 | 3 | -------------------------------------------------------------------------------- /0701-0800/760. Find Anagram Mappings.txt: -------------------------------------------------------------------------------- 1 | hashing. O(n). 2 | 3 | -------------------------------------------------------------------------------- /0701-0800/766. Toeplitz Matrix.txt: -------------------------------------------------------------------------------- 1 | O(nm). 2 | 3 | -------------------------------------------------------------------------------- /0701-0800/770. Basic Calculator IV.txt: -------------------------------------------------------------------------------- 1 | stack. O(n). 2 | 3 | -------------------------------------------------------------------------------- /0701-0800/771. Jewels and Stones.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /0701-0800/772. Basic Calculator III.txt: -------------------------------------------------------------------------------- 1 | stack. O(n). 2 | 3 | -------------------------------------------------------------------------------- /0701-0800/773. Sliding Puzzle.txt: -------------------------------------------------------------------------------- 1 | dfs/A*. 2 | 3 | -------------------------------------------------------------------------------- /0701-0800/776. Split BST.txt: -------------------------------------------------------------------------------- 1 | O(h). 2 | 3 | -------------------------------------------------------------------------------- /0701-0800/778. Swim in Rising Water.txt: -------------------------------------------------------------------------------- 1 | bottleneck shortest path. O(n^2). 2 | 3 | -------------------------------------------------------------------------------- /0701-0800/781. Rabbits in Forest.txt: -------------------------------------------------------------------------------- 1 | count. O(n). 2 | 3 | -------------------------------------------------------------------------------- /0701-0800/783. Minimum Distance Between BST Nodes.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n). 2 | 3 | -------------------------------------------------------------------------------- /0701-0800/785. Is Graph Bipartite.txt: -------------------------------------------------------------------------------- 1 | bfs. O(n+m). 2 | 3 | -------------------------------------------------------------------------------- /0701-0800/788. Rotated Digits.txt: -------------------------------------------------------------------------------- 1 | counting (DP on digits). O(log n). 2 | 3 | -------------------------------------------------------------------------------- /0701-0800/791. Custom Sort String.txt: -------------------------------------------------------------------------------- 1 | counting. O(n+m). 2 | 3 | -------------------------------------------------------------------------------- /0701-0800/794. Valid Tic-Tac-Toe State.txt: -------------------------------------------------------------------------------- 1 | O(1). 2 | 3 | -------------------------------------------------------------------------------- /0701-0800/795. Number of Subarrays with Bounded Maximum.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /0701-0800/797. All Paths From Source to Target.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n+m+output). 2 | 3 | -------------------------------------------------------------------------------- /0701-0800/800. Similar RGB Color.txt: -------------------------------------------------------------------------------- 1 | deal with R/G/B separately. O(1). 2 | 3 | -------------------------------------------------------------------------------- /0801-0900/804. Unique Morse Code Words.txt: -------------------------------------------------------------------------------- 1 | simulation+hashing. O(n). 2 | -------------------------------------------------------------------------------- /0801-0900/806. Number of Lines To Write String.txt: -------------------------------------------------------------------------------- 1 | simulation. O(n). 2 | -------------------------------------------------------------------------------- /0801-0900/807. Max Increase to Keep City Skyline.txt: -------------------------------------------------------------------------------- 1 | O(nm). 2 | 3 | -------------------------------------------------------------------------------- /0801-0900/809. Expressive Words.txt: -------------------------------------------------------------------------------- 1 | count. O(n). 2 | 3 | -------------------------------------------------------------------------------- /0801-0900/811. Subdomain Visit Count.txt: -------------------------------------------------------------------------------- 1 | trie. O(L). 2 | 3 | -------------------------------------------------------------------------------- /0801-0900/814. Binary Tree Pruning.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n). 2 | 3 | -------------------------------------------------------------------------------- /0801-0900/816. Ambiguous Coordinates.txt: -------------------------------------------------------------------------------- 1 | enumerate. O(output). 2 | 3 | -------------------------------------------------------------------------------- /0801-0900/817. Linked List Components.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /0801-0900/819. Most Common Word.txt: -------------------------------------------------------------------------------- 1 | trie. O(n). 2 | -------------------------------------------------------------------------------- /0801-0900/821. Shortest Distance to a Character.txt: -------------------------------------------------------------------------------- 1 | bfs. O(n). 2 | -------------------------------------------------------------------------------- /0801-0900/824. Goat Latin.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /0801-0900/825. Friends Of Appropriate Ages.txt: -------------------------------------------------------------------------------- 1 | O(sort(n)). 2 | 3 | -------------------------------------------------------------------------------- /0801-0900/826. Most Profit Assigning Work.txt: -------------------------------------------------------------------------------- 1 | sorting. O(sort(n)). 2 | 3 | -------------------------------------------------------------------------------- /0801-0900/830. Positions of Large Groups.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /0801-0900/831. Masking Personal Information.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /0801-0900/834. Sum of Distances in Tree.txt: -------------------------------------------------------------------------------- 1 | tree DP. O(n). 2 | 3 | -------------------------------------------------------------------------------- /0801-0900/836. Rectangle Overlap.txt: -------------------------------------------------------------------------------- 1 | O(1). 2 | 3 | -------------------------------------------------------------------------------- /0801-0900/838. Push Dominoes.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /0801-0900/840. Magic Squares In Grid.txt: -------------------------------------------------------------------------------- 1 | O(nm). 2 | -------------------------------------------------------------------------------- /0801-0900/841. Keys and Rooms.txt: -------------------------------------------------------------------------------- 1 | bfs. O(L). 2 | 3 | -------------------------------------------------------------------------------- /0801-0900/844. Backspace String Compare.txt: -------------------------------------------------------------------------------- 1 | stack. O(n). 2 | -------------------------------------------------------------------------------- /0801-0900/845. Longest Mountain in Array.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /0801-0900/848. Shifting Letters.txt: -------------------------------------------------------------------------------- 1 | prefix sum. O(n). 2 | 3 | -------------------------------------------------------------------------------- /0801-0900/849. Maximize Distance to Closest Person.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | -------------------------------------------------------------------------------- /0801-0900/851. Loud and Rich.txt: -------------------------------------------------------------------------------- 1 | DP on DAG. O(n+m). 2 | 3 | -------------------------------------------------------------------------------- /0801-0900/853. Car Fleet.txt: -------------------------------------------------------------------------------- 1 | O(n) after sorting. O(sort(n)). 2 | 3 | -------------------------------------------------------------------------------- /0801-0900/856. Score of Parentheses.txt: -------------------------------------------------------------------------------- 1 | stack. O(n). 2 | 3 | -------------------------------------------------------------------------------- /0801-0900/858. Mirror Reflection.txt: -------------------------------------------------------------------------------- 1 | math, O(1). 2 | 3 | -------------------------------------------------------------------------------- /0801-0900/860. Lemonade Change.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /0801-0900/863. All Nodes Distance K in Binary Tree.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n). 2 | 3 | -------------------------------------------------------------------------------- /0801-0900/868. Binary Gap.txt: -------------------------------------------------------------------------------- 1 | bit operation, binary search. O(log log W). 2 | 3 | -------------------------------------------------------------------------------- /0801-0900/872. Leaf-Similar Trees.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /0801-0900/874. Walking Robot Simulation.txt: -------------------------------------------------------------------------------- 1 | simulation+hashing. O(n). 2 | -------------------------------------------------------------------------------- /0801-0900/876. Middle of the Linked List.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /0801-0900/880. Decoded String at Index.txt: -------------------------------------------------------------------------------- 1 | stack. O(n). 2 | 3 | -------------------------------------------------------------------------------- /0801-0900/883. Projection Area of 3D Shapes.txt: -------------------------------------------------------------------------------- 1 | O(n^2). 2 | 3 | -------------------------------------------------------------------------------- /0801-0900/884. Uncommon Words from Two Sentences.txt: -------------------------------------------------------------------------------- 1 | trie. O(n). 2 | -------------------------------------------------------------------------------- /0801-0900/885. Spiral Matrix III.txt: -------------------------------------------------------------------------------- 1 | simulation. O(r*c). 2 | -------------------------------------------------------------------------------- /0801-0900/888. Fair Candy Swap.txt: -------------------------------------------------------------------------------- 1 | hashing. O(n). 2 | 3 | -------------------------------------------------------------------------------- /0801-0900/890. Find and Replace Pattern.txt: -------------------------------------------------------------------------------- 1 | minimum representation. O(n). 2 | 3 | -------------------------------------------------------------------------------- /0801-0900/892. Surface Area of 3D Shapes.txt: -------------------------------------------------------------------------------- 1 | O(n^2). 2 | 3 | -------------------------------------------------------------------------------- /0801-0900/894. All Possible Full Binary Trees.txt: -------------------------------------------------------------------------------- 1 | dfs. O(output). 2 | 3 | -------------------------------------------------------------------------------- /0801-0900/896. Monotonic Array.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | -------------------------------------------------------------------------------- /0801-0900/897. Increasing Order Search Tree.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | -------------------------------------------------------------------------------- /0901-1000/901. Online Stock Span.txt: -------------------------------------------------------------------------------- 1 | monotone stack. amortized O(1). 2 | 3 | -------------------------------------------------------------------------------- /0901-1000/904. Fruit Into Baskets.txt: -------------------------------------------------------------------------------- 1 | two pointers. O(n). 2 | 3 | -------------------------------------------------------------------------------- /0901-1000/905. Sort Array By Parity.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /0901-1000/908. Smallest Range I.txt: -------------------------------------------------------------------------------- 1 | find the maximum and minimum. O(n). 2 | 3 | -------------------------------------------------------------------------------- /0901-1000/909. Snakes and Ladders.txt: -------------------------------------------------------------------------------- 1 | bfs. O(n^2). 2 | 3 | -------------------------------------------------------------------------------- /0901-1000/914. X of a Kind in a Deck of Cards.txt: -------------------------------------------------------------------------------- 1 | gcd. O(n). 2 | 3 | -------------------------------------------------------------------------------- /0901-1000/917. Reverse Only Letters.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | -------------------------------------------------------------------------------- /0901-1000/918. Maximum Sum Circular Subarray.txt: -------------------------------------------------------------------------------- 1 | prefix min/max. O(n). 2 | 3 | -------------------------------------------------------------------------------- /0901-1000/919. Complete Binary Tree Inserter.txt: -------------------------------------------------------------------------------- 1 | O(1) per operation. 2 | 3 | -------------------------------------------------------------------------------- /0901-1000/921. Minimum Add to Make Parentheses Valid.txt: -------------------------------------------------------------------------------- 1 | greedy. O(n). 2 | 3 | -------------------------------------------------------------------------------- /0901-1000/922. Sort Array By Parity II.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /0901-1000/925. Long Pressed Name.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | -------------------------------------------------------------------------------- /0901-1000/929. Unique Email Addresses.txt: -------------------------------------------------------------------------------- 1 | simulation. O(n). 2 | -------------------------------------------------------------------------------- /0901-1000/930. Binary Subarrays With Sum.txt: -------------------------------------------------------------------------------- 1 | two pointers. O(n). 2 | 3 | -------------------------------------------------------------------------------- /0901-1000/931. Minimum Falling Path Sum.txt: -------------------------------------------------------------------------------- 1 | DP. O(n^2). 2 | 3 | -------------------------------------------------------------------------------- /0901-1000/933. Number of Recent Calls.txt: -------------------------------------------------------------------------------- 1 | queue. O(n). 2 | 3 | -------------------------------------------------------------------------------- /0901-1000/934. Shortest Bridge.txt: -------------------------------------------------------------------------------- 1 | bfs. O(nm). 2 | 3 | -------------------------------------------------------------------------------- /0901-1000/937. Reorder Data in Log Files.txt: -------------------------------------------------------------------------------- 1 | string sorting. O(sort(n,L)). 2 | 3 | -------------------------------------------------------------------------------- /0901-1000/938. Range Sum of BST.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n). 2 | -------------------------------------------------------------------------------- /0901-1000/941. Valid Mountain Array.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /0901-1000/942. DI String Match.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | -------------------------------------------------------------------------------- /0901-1000/943. Find the Shortest Superstring.txt: -------------------------------------------------------------------------------- 1 | TSP. 2 | 3 | -------------------------------------------------------------------------------- /0901-1000/949. Largest Time for Given Digits.txt: -------------------------------------------------------------------------------- 1 | O(1). 2 | 3 | -------------------------------------------------------------------------------- /0901-1000/957. Prison Cells After N Days.txt: -------------------------------------------------------------------------------- 1 | find the loop. 2 | 3 | -------------------------------------------------------------------------------- /0901-1000/958. Check Completeness of a Binary Tree.txt: -------------------------------------------------------------------------------- 1 | bfs. O(n). 2 | 3 | -------------------------------------------------------------------------------- /0901-1000/962. Maximum Width Ramp.txt: -------------------------------------------------------------------------------- 1 | monotone stack. O(n). 2 | 3 | -------------------------------------------------------------------------------- /0901-1000/965. Univalued Binary Tree.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n). 2 | 3 | -------------------------------------------------------------------------------- /0901-1000/966. Vowel Spellchecker.txt: -------------------------------------------------------------------------------- 1 | hashing/trie. O(L). 2 | 3 | -------------------------------------------------------------------------------- /0901-1000/968. Binary Tree Cameras.txt: -------------------------------------------------------------------------------- 1 | tree DP. O(n). 2 | 3 | -------------------------------------------------------------------------------- /0901-1000/970. Powerful Integers.txt: -------------------------------------------------------------------------------- 1 | enumerate. O(#output). 2 | 3 | -------------------------------------------------------------------------------- /0901-1000/971. Flip Binary Tree To Match Preorder Traversal.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n). 2 | 3 | -------------------------------------------------------------------------------- /0901-1000/972. Equal Rational Numbers.txt: -------------------------------------------------------------------------------- 1 | string gcd. O(n). 2 | -------------------------------------------------------------------------------- /0901-1000/973. K Closest Points to Origin.txt: -------------------------------------------------------------------------------- 1 | kth_element. O(n). 2 | 3 | -------------------------------------------------------------------------------- /0901-1000/974. Subarray Sums Divisible by K.txt: -------------------------------------------------------------------------------- 1 | prefix sum, hashing. O(n). 2 | 3 | -------------------------------------------------------------------------------- /0901-1000/975. Odd Even Jump.txt: -------------------------------------------------------------------------------- 1 | Sorting + monotone queue. O(n). 2 | 3 | -------------------------------------------------------------------------------- /0901-1000/978. Longest Turbulent Subarray.txt: -------------------------------------------------------------------------------- 1 | DP. O(n). 2 | 3 | -------------------------------------------------------------------------------- /0901-1000/979. Distribute Coins in Binary Tree.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n). 2 | -------------------------------------------------------------------------------- /0901-1000/981. Time Based Key-Value Store.txt: -------------------------------------------------------------------------------- 1 | hashing. O(n). 2 | 3 | -------------------------------------------------------------------------------- /0901-1000/983. Minimum Cost For Tickets.txt: -------------------------------------------------------------------------------- 1 | DP. O(n). 2 | 3 | -------------------------------------------------------------------------------- /0901-1000/984. String Without AAA or BBB.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /0901-1000/985. Sum of Even Numbers After Queries.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /0901-1000/986. Interval List Intersections.txt: -------------------------------------------------------------------------------- 1 | two pointers. O(n). 2 | 3 | -------------------------------------------------------------------------------- /0901-1000/989. Add to Array-Form of Integer.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /0901-1000/992. Subarrays with K Different Integers.txt: -------------------------------------------------------------------------------- 1 | two pointers. O(n). 2 | 3 | -------------------------------------------------------------------------------- /0901-1000/993. Cousins in Binary Tree.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /0901-1000/994. Rotting Oranges.txt: -------------------------------------------------------------------------------- 1 | bfs. O(nm). 2 | 3 | -------------------------------------------------------------------------------- /0901-1000/997. Find the Town Judge.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /0901-1000/999. Available Captures for Rook.txt: -------------------------------------------------------------------------------- 1 | simulation. O(n^2). 2 | 3 | -------------------------------------------------------------------------------- /1001-1100/1001. Grid Illumination.txt: -------------------------------------------------------------------------------- 1 | hashing. O(n). 2 | -------------------------------------------------------------------------------- /1001-1100/1002. Find Common Characters.txt: -------------------------------------------------------------------------------- 1 | counting. O(n). 2 | -------------------------------------------------------------------------------- /1001-1100/1004. Max Consecutive Ones III.txt: -------------------------------------------------------------------------------- 1 | double pointers. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1001-1100/1007. Minimum Domino Rotations For Equal Row.txt: -------------------------------------------------------------------------------- 1 | counting. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1001-1100/1009. Complement of Base 10 Integer.txt: -------------------------------------------------------------------------------- 1 | clz. O(1). 2 | 3 | -------------------------------------------------------------------------------- /1001-1100/1012. Numbers With Repeated Digits.txt: -------------------------------------------------------------------------------- 1 | DP on digits. O(log n). 2 | 3 | -------------------------------------------------------------------------------- /1001-1100/1013. Partition Array Into Three Parts With Equal Sum.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1001-1100/1014. Best Sightseeing Pair.txt: -------------------------------------------------------------------------------- 1 | prefix max. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1001-1100/1017. Convert to Base -2.txt: -------------------------------------------------------------------------------- 1 | O(log n). 2 | 3 | -------------------------------------------------------------------------------- /1001-1100/1018. Binary Prefix Divisible By 5.txt: -------------------------------------------------------------------------------- 1 | prefix sum. O(n). 2 | -------------------------------------------------------------------------------- /1001-1100/1019. Next Greater Node In Linked List.txt: -------------------------------------------------------------------------------- 1 | stack. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1001-1100/1020. Number of Enclaves.txt: -------------------------------------------------------------------------------- 1 | bfs. O(nm). 2 | 3 | -------------------------------------------------------------------------------- /1001-1100/1021. Remove Outermost Parentheses.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1001-1100/1022. Sum of Root To Leaf Binary Numbers.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n). 2 | -------------------------------------------------------------------------------- /1001-1100/1023. Camelcase Matching.txt: -------------------------------------------------------------------------------- 1 | greedy. O(L). 2 | 3 | -------------------------------------------------------------------------------- /1001-1100/1028. Recover a Tree From Preorder Traversal.txt: -------------------------------------------------------------------------------- 1 | stack. O(n). 2 | -------------------------------------------------------------------------------- /1001-1100/1029. Two City Scheduling.txt: -------------------------------------------------------------------------------- 1 | greedy, median finding. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1001-1100/1030. Matrix Cells in Distance Order.txt: -------------------------------------------------------------------------------- 1 | O(RC). 2 | -------------------------------------------------------------------------------- /1001-1100/1032. Stream of Characters.txt: -------------------------------------------------------------------------------- 1 | AC automaton. O(L). 2 | 3 | -------------------------------------------------------------------------------- /1001-1100/1033. Moving Stones Until Consecutive.txt: -------------------------------------------------------------------------------- 1 | O(1). 2 | 3 | -------------------------------------------------------------------------------- /1001-1100/1034. Coloring A Border.txt: -------------------------------------------------------------------------------- 1 | bfs. O(nm). 2 | 3 | -------------------------------------------------------------------------------- /1001-1100/1037. Valid Boomerang.txt: -------------------------------------------------------------------------------- 1 | O(1). 2 | 3 | -------------------------------------------------------------------------------- /1001-1100/1038. Binary Search Tree to Greater Sum Tree.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n). 2 | -------------------------------------------------------------------------------- /1001-1100/1041. Robot Bounded In Circle.txt: -------------------------------------------------------------------------------- 1 | simulation. O(n). 2 | -------------------------------------------------------------------------------- /1001-1100/1044. Longest Duplicate Substring.txt: -------------------------------------------------------------------------------- 1 | suffix tree. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1001-1100/1046. Last Stone Weight.txt: -------------------------------------------------------------------------------- 1 | priority queue. O(sort(n)). 2 | 3 | -------------------------------------------------------------------------------- /1001-1100/1047. Remove All Adjacent Duplicates In String.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1001-1100/1051. Height Checker.txt: -------------------------------------------------------------------------------- 1 | O(n) after sorting. 2 | -------------------------------------------------------------------------------- /1001-1100/1052. Grumpy Bookstore Owner.txt: -------------------------------------------------------------------------------- 1 | prefix sum. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1001-1100/1053. Previous Permutation With One Swap.txt: -------------------------------------------------------------------------------- 1 | greedy. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1001-1100/1054. Distant Barcodes.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1001-1100/1056. Confusing Number.txt: -------------------------------------------------------------------------------- 1 | O(log n). 2 | 3 | -------------------------------------------------------------------------------- /1001-1100/1060. Missing Element in Sorted Array.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1001-1100/1062. Longest Repeating Substring.txt: -------------------------------------------------------------------------------- 1 | suffix tree. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1001-1100/1064. Fixed Point.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1001-1100/1065. Index Pairs of a String.txt: -------------------------------------------------------------------------------- 1 | AC automaton. O(n+m+|output|). 2 | 3 | -------------------------------------------------------------------------------- /1001-1100/1067. Digit Count in Range.txt: -------------------------------------------------------------------------------- 1 | digits DP. O(log n). 2 | 3 | -------------------------------------------------------------------------------- /1001-1100/1073. Adding Two Negabinary Numbers.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | -------------------------------------------------------------------------------- /1001-1100/1085. Sum of Digits in the Minimum Number.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1001-1100/1086. High Five.txt: -------------------------------------------------------------------------------- 1 | sorting. O(sort(n)). 2 | 3 | -------------------------------------------------------------------------------- /1001-1100/1087. Brace Expansion.txt: -------------------------------------------------------------------------------- 1 | dfs. O(length of output). 2 | 3 | -------------------------------------------------------------------------------- /1001-1100/1088. Confusing Number II.txt: -------------------------------------------------------------------------------- 1 | digits DP. O(log n). 2 | 3 | -------------------------------------------------------------------------------- /1001-1100/1091. Shortest Path in Binary Matrix.txt: -------------------------------------------------------------------------------- 1 | shortest path, bfs. O(n^2). 2 | -------------------------------------------------------------------------------- /1001-1100/1093. Statistics from a Large Sample.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | -------------------------------------------------------------------------------- /1001-1100/1094. Car Pooling.txt: -------------------------------------------------------------------------------- 1 | prefix sum. O(sort(n)). 2 | 3 | -------------------------------------------------------------------------------- /1001-1100/1095. Find in Mountain Array.txt: -------------------------------------------------------------------------------- 1 | binary search. O(log n). 2 | 3 | -------------------------------------------------------------------------------- /1001-1100/1096. Brace Expansion II.txt: -------------------------------------------------------------------------------- 1 | dfs. 2 | -------------------------------------------------------------------------------- /1101-1200/1103. Distribute Candies to People.txt: -------------------------------------------------------------------------------- 1 | math, O(n). 2 | 3 | -------------------------------------------------------------------------------- /1101-1200/1104. Path In Zigzag Labelled Binary Tree.txt: -------------------------------------------------------------------------------- 1 | O(log n). 2 | 3 | -------------------------------------------------------------------------------- /1101-1200/1106. Parsing A Boolean Expression.txt: -------------------------------------------------------------------------------- 1 | stack. O(n). 2 | -------------------------------------------------------------------------------- /1101-1200/1108. Defanging an IP Address.txt: -------------------------------------------------------------------------------- 1 | O(1). 2 | 3 | -------------------------------------------------------------------------------- /1101-1200/1109. Corporate Flight Bookings.txt: -------------------------------------------------------------------------------- 1 | prefix sum. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1101-1200/1110. Delete Nodes And Return Forest.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1101-1200/1114. Print in Order.txt: -------------------------------------------------------------------------------- 1 | thread. 2 | 3 | -------------------------------------------------------------------------------- /1101-1200/1115. Print FooBar Alternately.txt: -------------------------------------------------------------------------------- 1 | thread. 2 | 3 | -------------------------------------------------------------------------------- /1101-1200/1116. Print Zero Even Odd.txt: -------------------------------------------------------------------------------- 1 | thread. 2 | 3 | -------------------------------------------------------------------------------- /1101-1200/1117. Building H2O.txt: -------------------------------------------------------------------------------- 1 | thread. 2 | 3 | -------------------------------------------------------------------------------- /1101-1200/1119. Remove Vowels from a String.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1101-1200/1120. Maximum Average Subtree.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1101-1200/1122. Relative Sort Array.txt: -------------------------------------------------------------------------------- 1 | hashing. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1101-1200/1123. Lowest Common Ancestor of Deepest Leaves.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1101-1200/1128. Number of Equivalent Domino Pairs.txt: -------------------------------------------------------------------------------- 1 | hashing. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1101-1200/1133. Largest Unique Number.txt: -------------------------------------------------------------------------------- 1 | hashing. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1101-1200/1134. Armstrong Number.txt: -------------------------------------------------------------------------------- 1 | O(log n). 2 | 3 | -------------------------------------------------------------------------------- /1101-1200/1137. N-th Tribonacci Number.txt: -------------------------------------------------------------------------------- 1 | fast exponentiation. O(log n). 2 | 3 | -------------------------------------------------------------------------------- /1101-1200/1138. Alphabet Board Path.txt: -------------------------------------------------------------------------------- 1 | O(n+|Σ|). 2 | 3 | -------------------------------------------------------------------------------- /1101-1200/1144. Decrease Elements To Make Array Zigzag.txt: -------------------------------------------------------------------------------- 1 | greedy. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1101-1200/1156. Swap For Longest Repeated Character Substring.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1101-1200/1160. Find Words That Can Be Formed by Characters.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1101-1200/1161. Maximum Level Sum of a Binary Tree.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1101-1200/1162. As Far from Land as Possible.txt: -------------------------------------------------------------------------------- 1 | bfs. O(n^2). 2 | -------------------------------------------------------------------------------- /1101-1200/1165. Single-Row Keyboard.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1101-1200/1166. Design File System.txt: -------------------------------------------------------------------------------- 1 | trie. O(L). 2 | 3 | -------------------------------------------------------------------------------- /1101-1200/1167. Minimum Cost to Connect Sticks.txt: -------------------------------------------------------------------------------- 1 | heap/sort. O(sort(n)). 2 | 3 | -------------------------------------------------------------------------------- /1101-1200/1169. Invalid Transactions.txt: -------------------------------------------------------------------------------- 1 | hashing. O(L). 2 | -------------------------------------------------------------------------------- /1101-1200/1176. Diet Plan Performance.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1101-1200/1180. Count Substrings with Only One Distinct Letter.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1101-1200/1181. Before and After Puzzle.txt: -------------------------------------------------------------------------------- 1 | Trie. O(L+length of output). 2 | 3 | -------------------------------------------------------------------------------- /1101-1200/1182. Shortest Distance to Target Color.txt: -------------------------------------------------------------------------------- 1 | O(n) for |Σ|=O(1). 2 | 3 | -------------------------------------------------------------------------------- /1101-1200/1184. Distance Between Bus Stops.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | -------------------------------------------------------------------------------- /1101-1200/1186. Maximum Subarray Sum with One Deletion.txt: -------------------------------------------------------------------------------- 1 | DP. O(n). 2 | -------------------------------------------------------------------------------- /1101-1200/1188. Design Bounded Blocking Queue.txt: -------------------------------------------------------------------------------- 1 | O(1) per operation. 2 | 3 | -------------------------------------------------------------------------------- /1101-1200/1189. Maximum Number of Balloons.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1101-1200/1195. Fizz Buzz Multithreaded.txt: -------------------------------------------------------------------------------- 1 | multithread. 2 | 3 | -------------------------------------------------------------------------------- /1201-1300/1206. Design Skiplist.txt: -------------------------------------------------------------------------------- 1 | skiplist. O(n log n). 2 | -------------------------------------------------------------------------------- /1201-1300/1207. Unique Number of Occurrences.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1201-1300/1208. Get Equal Substrings Within Budget.txt: -------------------------------------------------------------------------------- 1 | two pointers. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1201-1300/1214. Two Sum BSTs.txt: -------------------------------------------------------------------------------- 1 | reduce to 2sum. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1201-1300/1217. Play with Chips.txt: -------------------------------------------------------------------------------- 1 | consider odd and even. O(n). 2 | -------------------------------------------------------------------------------- /1201-1300/1221. Split a String in Balanced Strings.txt: -------------------------------------------------------------------------------- 1 | greedy. O(n). 2 | -------------------------------------------------------------------------------- /1201-1300/1222. Queens That Can Attack the King.txt: -------------------------------------------------------------------------------- 1 | simulation. 2 | -------------------------------------------------------------------------------- /1201-1300/1223. Dice Roll Simulation.txt: -------------------------------------------------------------------------------- 1 | DP. O(n). 2 | -------------------------------------------------------------------------------- /1201-1300/1226. The Dining Philosophers.txt: -------------------------------------------------------------------------------- 1 | thread, mutex. 2 | 3 | -------------------------------------------------------------------------------- /1201-1300/1229. Meeting Scheduler.txt: -------------------------------------------------------------------------------- 1 | sorting, two pointers. O(sort(n)). 2 | 3 | -------------------------------------------------------------------------------- /1201-1300/1232. Check If It Is a Straight Line.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | -------------------------------------------------------------------------------- /1201-1300/1233. Remove Sub-Folders from the Filesystem.txt: -------------------------------------------------------------------------------- 1 | trie. O(L). 2 | -------------------------------------------------------------------------------- /1201-1300/1236. Web Crawler.txt: -------------------------------------------------------------------------------- 1 | dfs. O(L). 2 | 3 | -------------------------------------------------------------------------------- /1201-1300/1242. Web Crawler Multithreaded.txt: -------------------------------------------------------------------------------- 1 | dfs+multithread. O(L). 2 | 3 | -------------------------------------------------------------------------------- /1201-1300/1245. Tree Diameter.txt: -------------------------------------------------------------------------------- 1 | DP/two bfses. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1201-1300/1248. Count Number of Nice Subarrays.txt: -------------------------------------------------------------------------------- 1 | two pointers. O(n). 2 | -------------------------------------------------------------------------------- /1201-1300/1253. Reconstruct a 2-Row Binary Matrix.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1201-1300/1254. Number of Closed Islands.txt: -------------------------------------------------------------------------------- 1 | dfs. O(nm). 2 | -------------------------------------------------------------------------------- /1201-1300/1255. Maximum Score Words Formed by Letters.txt: -------------------------------------------------------------------------------- 1 | dfs. O(2^n). 2 | 3 | -------------------------------------------------------------------------------- /1201-1300/1256. Encode Number.txt: -------------------------------------------------------------------------------- 1 | binary representation. O(log n). 2 | 3 | -------------------------------------------------------------------------------- /1201-1300/1257. Smallest Common Region.txt: -------------------------------------------------------------------------------- 1 | LCA. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1201-1300/1259. Handshakes That Don't Cross.txt: -------------------------------------------------------------------------------- 1 | Catalan number. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1201-1300/1260. Shift 2D Grid.txt: -------------------------------------------------------------------------------- 1 | combine the shifts. O(nm). 2 | -------------------------------------------------------------------------------- /1201-1300/1261. Find Elements in a Contaminated Binary Tree.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1201-1300/1262. Greatest Sum Divisible by Three.txt: -------------------------------------------------------------------------------- 1 | DP. O(n). 2 | -------------------------------------------------------------------------------- /1201-1300/1266. Minimum Time Visiting All Points.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | -------------------------------------------------------------------------------- /1201-1300/1268. Search Suggestions System.txt: -------------------------------------------------------------------------------- 1 | trie. O(L). 2 | 3 | -------------------------------------------------------------------------------- /1201-1300/1271. Hexspeak.txt: -------------------------------------------------------------------------------- 1 | O(log n). 2 | 3 | -------------------------------------------------------------------------------- /1201-1300/1272. Remove Interval.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1201-1300/1273. Delete Tree Nodes.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1201-1300/1275. Find Winner on a Tic Tac Toe Game.txt: -------------------------------------------------------------------------------- 1 | O(1). 2 | 3 | -------------------------------------------------------------------------------- /1201-1300/1276. Number of Burgers with No Waste of Ingredients.txt: -------------------------------------------------------------------------------- 1 | O(1). 2 | 3 | -------------------------------------------------------------------------------- /1201-1300/1279. Traffic Light Controlled Intersection.txt: -------------------------------------------------------------------------------- 1 | mutex. O(1). 2 | 3 | -------------------------------------------------------------------------------- /1201-1300/1288. Remove Covered Intervals.txt: -------------------------------------------------------------------------------- 1 | reduce to sorting. O(sort(n)). 2 | -------------------------------------------------------------------------------- /1201-1300/1291. Sequential Digits.txt: -------------------------------------------------------------------------------- 1 | dfs. 2 | 3 | -------------------------------------------------------------------------------- /1201-1300/1298. Maximum Candies You Can Get from Boxes.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1201-1300/1300. Sum of Mutated Array Closest to Target.txt: -------------------------------------------------------------------------------- 1 | kth element. O(n). 2 | -------------------------------------------------------------------------------- /1301-1400/1301. Number of Paths with Max Score.txt: -------------------------------------------------------------------------------- 1 | DP. O(nm). 2 | 3 | -------------------------------------------------------------------------------- /1301-1400/1302. Deepest Leaves Sum.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n). 2 | -------------------------------------------------------------------------------- /1301-1400/1305. All Elements in Two Binary Search Trees.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1301-1400/1306. Jump Game III.txt: -------------------------------------------------------------------------------- 1 | bfs. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1301-1400/1310. XOR Queries of a Subarray.txt: -------------------------------------------------------------------------------- 1 | prefix xor sum. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1301-1400/1311. Get Watched Videos by Your Friends.txt: -------------------------------------------------------------------------------- 1 | bfs+sort. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1301-1400/1313. Decompress Run-Length Encoded List.txt: -------------------------------------------------------------------------------- 1 | O(output). 2 | 3 | -------------------------------------------------------------------------------- /1301-1400/1314. Matrix Block Sum.txt: -------------------------------------------------------------------------------- 1 | prefix sum. O(nm). 2 | 3 | -------------------------------------------------------------------------------- /1301-1400/1315. Sum of Nodes with Even-Valued Grandparent.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1301-1400/1318. Minimum Flips to Make a OR b Equal to c.txt: -------------------------------------------------------------------------------- 1 | popcount. 2 | 3 | -------------------------------------------------------------------------------- /1301-1400/1323. Maximum 69 Number.txt: -------------------------------------------------------------------------------- 1 | O(log n). 2 | 3 | -------------------------------------------------------------------------------- /1301-1400/1324. Print Words Vertically.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1301-1400/1325. Delete Leaves With a Given Value.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n). 2 | -------------------------------------------------------------------------------- /1301-1400/1328. Break a Palindrome.txt: -------------------------------------------------------------------------------- 1 | greedy. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1301-1400/1329. Sort the Matrix Diagonally.txt: -------------------------------------------------------------------------------- 1 | reduce to sorting. O(sort(n*m)). 2 | -------------------------------------------------------------------------------- /1301-1400/1331. Rank Transform of an Array.txt: -------------------------------------------------------------------------------- 1 | reduce to sorting. O(sort(n)). 2 | -------------------------------------------------------------------------------- /1301-1400/1338. Reduce Array Size to The Half.txt: -------------------------------------------------------------------------------- 1 | counting sort. O(n). 2 | -------------------------------------------------------------------------------- /1301-1400/1339. Maximum Product of Splitted Binary Tree.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n). 2 | -------------------------------------------------------------------------------- /1301-1400/1345. Jump Game IV.txt: -------------------------------------------------------------------------------- 1 | bfs. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1301-1400/1346. Check If N and Its Double Exist.txt: -------------------------------------------------------------------------------- 1 | hashing. O(n). 2 | -------------------------------------------------------------------------------- /1301-1400/1356. Sort Integers by The Number of 1 Bits.txt: -------------------------------------------------------------------------------- 1 | O(sort(n)). 2 | 3 | -------------------------------------------------------------------------------- /1301-1400/1361. Validate Binary Tree Nodes.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1301-1400/1362. Closest Divisors.txt: -------------------------------------------------------------------------------- 1 | reduce to factorization. 2 | -------------------------------------------------------------------------------- /1301-1400/1363. Largest Multiple of Three.txt: -------------------------------------------------------------------------------- 1 | greedy. O(n). 2 | -------------------------------------------------------------------------------- /1301-1400/1366. Rank Teams by Votes.txt: -------------------------------------------------------------------------------- 1 | string sorting. O(n). 2 | -------------------------------------------------------------------------------- /1301-1400/1367. Linked List in Binary Tree.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1301-1400/1372. Longest ZigZag Path in a Binary Tree.txt: -------------------------------------------------------------------------------- 1 | DP. O(n). 2 | -------------------------------------------------------------------------------- /1301-1400/1373. Maximum Sum BST in Binary Tree.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n). 2 | -------------------------------------------------------------------------------- /1301-1400/1376. Time Needed to Inform All Employees.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1301-1400/1377. Frog Position After T Seconds.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1301-1400/1380. Lucky Numbers in a Matrix.txt: -------------------------------------------------------------------------------- 1 | O(nm). 2 | -------------------------------------------------------------------------------- /1301-1400/1382. Balance a Binary Search Tree.txt: -------------------------------------------------------------------------------- 1 | flatten and rebuild. O(n). 2 | -------------------------------------------------------------------------------- /1301-1400/1391. Check if There is a Valid Path in a Grid.txt: -------------------------------------------------------------------------------- 1 | bfs. O(nm). 2 | -------------------------------------------------------------------------------- /1301-1400/1392. Longest Happy Prefix.txt: -------------------------------------------------------------------------------- 1 | hashing/kmp. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1301-1400/1394. Find Lucky Integer in an Array.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1301-1400/1400. Construct K Palindrome Strings.txt: -------------------------------------------------------------------------------- 1 | counting. O(n). 2 | -------------------------------------------------------------------------------- /1401-1500/1401. Circle and Rectangle Overlapping.txt: -------------------------------------------------------------------------------- 1 | O(1). 2 | -------------------------------------------------------------------------------- /1401-1500/1406. Stone Game III.txt: -------------------------------------------------------------------------------- 1 | DP. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1401-1500/1408. String Matching in an Array.txt: -------------------------------------------------------------------------------- 1 | suffix tree. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1401-1500/1410. HTML Entity Parser.txt: -------------------------------------------------------------------------------- 1 | simulation. O(L). 2 | 3 | -------------------------------------------------------------------------------- /1401-1500/1417. Reformat The String.txt: -------------------------------------------------------------------------------- 1 | count. O(n). 2 | -------------------------------------------------------------------------------- /1401-1500/1419. Minimum Number of Frogs Croaking.txt: -------------------------------------------------------------------------------- 1 | counting. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1401-1500/1422. Maximum Score After Splitting a String.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1401-1500/1424. Diagonal Traverse II.txt: -------------------------------------------------------------------------------- 1 | O(L). 2 | 3 | -------------------------------------------------------------------------------- /1401-1500/1425. Constrained Subsequence Sum.txt: -------------------------------------------------------------------------------- 1 | DP, monotone array. O(n). 2 | -------------------------------------------------------------------------------- /1401-1500/1426. Counting Elements.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1401-1500/1427. Perform String Shifts.txt: -------------------------------------------------------------------------------- 1 | take the sum. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1401-1500/1431. Kids With the Greatest Number of Candies.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1401-1500/1436. Destination City.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1401-1500/1441. Build an Array With Stack Operations.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1401-1500/1446. Consecutive Characters.txt: -------------------------------------------------------------------------------- 1 | O(1). 2 | 3 | -------------------------------------------------------------------------------- /1401-1500/1447. Simplified Fractions.txt: -------------------------------------------------------------------------------- 1 | Stern Brocot Tree. O(output). 2 | 3 | -------------------------------------------------------------------------------- /1401-1500/1448. Count Good Nodes in Binary Tree.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1401-1500/1451. Rearrange Words in a Sentence.txt: -------------------------------------------------------------------------------- 1 | O(L). 2 | 3 | -------------------------------------------------------------------------------- /1401-1500/1464. Maximum Product of Two Elements in an Array.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1401-1500/1469. Find All The Lonely Nodes.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1401-1500/1470. Shuffle the Array.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | -------------------------------------------------------------------------------- /1401-1500/1471. The k Strongest Values in an Array.txt: -------------------------------------------------------------------------------- 1 | median finding. O(n). 2 | -------------------------------------------------------------------------------- /1401-1500/1472. Design Browser History.txt: -------------------------------------------------------------------------------- 1 | stack. O(n). 2 | -------------------------------------------------------------------------------- /1401-1500/1474. Delete N Nodes After M Nodes of a Linked List.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1401-1500/1480. Running Sum of 1d Array.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | -------------------------------------------------------------------------------- /1401-1500/1485. Clone Binary Tree With Random Pointer.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1401-1500/1487. Making File Names Unique.txt: -------------------------------------------------------------------------------- 1 | string hashing. O(L). 2 | 3 | -------------------------------------------------------------------------------- /1401-1500/1490. Clone N-ary Tree.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1401-1500/1496. Path Crossing.txt: -------------------------------------------------------------------------------- 1 | hashing. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1401-1500/1499. Max Value of Equation.txt: -------------------------------------------------------------------------------- 1 | monotone queue. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1501-1600/1504. Count Submatrices With All Ones.txt: -------------------------------------------------------------------------------- 1 | monotone stack. O(nm). 2 | 3 | -------------------------------------------------------------------------------- /1501-1600/1510. Stone Game IV.txt: -------------------------------------------------------------------------------- 1 | DP. O(n*sqrt(n)). 2 | 3 | -------------------------------------------------------------------------------- /1501-1600/1512. Number of Good Pairs.txt: -------------------------------------------------------------------------------- 1 | hashing. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1501-1600/1513. Number of Substrings With Only 1s.txt: -------------------------------------------------------------------------------- 1 | counting. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1501-1600/1516. Move Sub-Tree of N-Ary Tree.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1501-1600/1518. Water Bottles.txt: -------------------------------------------------------------------------------- 1 | math. O(1). 2 | 3 | -------------------------------------------------------------------------------- /1501-1600/1523. Count Odd Numbers in an Interval Range.txt: -------------------------------------------------------------------------------- 1 | O(1). 2 | 3 | -------------------------------------------------------------------------------- /1501-1600/1524. Number of Sub-arrays With Odd Sum.txt: -------------------------------------------------------------------------------- 1 | DP. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1501-1600/1528. Shuffle String.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1501-1600/1529. Bulb Switcher IV.txt: -------------------------------------------------------------------------------- 1 | switch from left to right. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1501-1600/1537. Get the Maximum Score.txt: -------------------------------------------------------------------------------- 1 | DP. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1501-1600/1539. Kth Missing Positive Number.txt: -------------------------------------------------------------------------------- 1 | binary search. O(log k). 2 | 3 | -------------------------------------------------------------------------------- /1501-1600/1540. Can Convert String in K Moves.txt: -------------------------------------------------------------------------------- 1 | counting. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1501-1600/1544. Make The String Great.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1501-1600/1545. Find Kth Bit in Nth Binary String.txt: -------------------------------------------------------------------------------- 1 | recurse. O(log k). 2 | 3 | -------------------------------------------------------------------------------- /1501-1600/1550. Three Consecutive Odds.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1501-1600/1556. Thousand Separator.txt: -------------------------------------------------------------------------------- 1 | O(log n). 2 | 3 | -------------------------------------------------------------------------------- /1501-1600/1559. Detect Cycles in 2D Grid.txt: -------------------------------------------------------------------------------- 1 | dfs. O(nm). 2 | 3 | -------------------------------------------------------------------------------- /1501-1600/1567. Maximum Length of Subarray With Positive Product.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1501-1600/1570. Dot Product of Two Sparse Vectors.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1501-1600/1572. Matrix Diagonal Sum.txt: -------------------------------------------------------------------------------- 1 | O(n) after reading the inputs. 2 | 3 | -------------------------------------------------------------------------------- /1501-1600/1573. Number of Ways to Split a String.txt: -------------------------------------------------------------------------------- 1 | counting. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1501-1600/1582. Special Positions in a Binary Matrix.txt: -------------------------------------------------------------------------------- 1 | O(nm). 2 | 3 | -------------------------------------------------------------------------------- /1501-1600/1583. Count Unhappy Friends.txt: -------------------------------------------------------------------------------- 1 | Enumerate each pair. O(n^2). 2 | 3 | -------------------------------------------------------------------------------- /1501-1600/1586. Binary Search Tree Iterator II.txt: -------------------------------------------------------------------------------- 1 | amortized O(1). 2 | 3 | -------------------------------------------------------------------------------- /1501-1600/1588. Sum of All Odd Length Subarrays.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1501-1600/1592. Rearrange Spaces Between Words.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1501-1600/1594. Maximum Non Negative Product in a Matrix.txt: -------------------------------------------------------------------------------- 1 | DP. O(nm). 2 | 3 | -------------------------------------------------------------------------------- /1501-1600/1598. Crawler Log Folder.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1601-1700/1602. Find Nearest Right Node in Binary Tree.txt: -------------------------------------------------------------------------------- 1 | dfs, O(n). 2 | 3 | -------------------------------------------------------------------------------- /1601-1700/1603. Design Parking System.txt: -------------------------------------------------------------------------------- 1 | counting. O(1) per operation. 2 | 3 | -------------------------------------------------------------------------------- /1601-1700/1609. Even Odd Tree.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1601-1700/1614. Maximum Nesting Depth of the Parentheses.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1601-1700/1624. Largest Substring Between Two Equal Characters.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1601-1700/1629. Slowest Key.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1601-1700/1634. Add Two Polynomials Represented as Linked Lists.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1601-1700/1644. Lowest Common Ancestor of a Binary Tree II.txt: -------------------------------------------------------------------------------- 1 | O(h). 2 | 3 | -------------------------------------------------------------------------------- /1601-1700/1650. Lowest Common Ancestor of a Binary Tree III.txt: -------------------------------------------------------------------------------- 1 | O(h). 2 | 3 | -------------------------------------------------------------------------------- /1601-1700/1652. Defuse the Bomb.txt: -------------------------------------------------------------------------------- 1 | prefix sum. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1601-1700/1653. Minimum Deletions to Make String Balanced.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1601-1700/1656. Design an Ordered Stream.txt: -------------------------------------------------------------------------------- 1 | O(n) in total. 2 | 3 | -------------------------------------------------------------------------------- /1601-1700/1662. Check If Two String Arrays are Equivalent.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1601-1700/1666. Change the Root of a Binary Tree.txt: -------------------------------------------------------------------------------- 1 | O(n) or O(h). 2 | 3 | -------------------------------------------------------------------------------- /1601-1700/1669. Merge In Between Linked Lists.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1601-1700/1672. Richest Customer Wealth.txt: -------------------------------------------------------------------------------- 1 | O(nm). 2 | 3 | -------------------------------------------------------------------------------- /1601-1700/1676. Lowest Common Ancestor of a Binary Tree IV.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1601-1700/1678. Goal Parser Interpretation.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1601-1700/1684. Count the Number of Consistent Strings.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1601-1700/1690. Stone Game VII.txt: -------------------------------------------------------------------------------- 1 | DP. O(n^2). 2 | 3 | -------------------------------------------------------------------------------- /1601-1700/1694. Reformat Phone Number.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1701-1800/1701. Average Waiting Time.txt: -------------------------------------------------------------------------------- 1 | simulation. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1701-1800/1702. Maximum Binary String After Change.txt: -------------------------------------------------------------------------------- 1 | greedy. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1701-1800/1704. Determine if String Halves Are Alike.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1701-1800/1706. Where Will the Ball Fall.txt: -------------------------------------------------------------------------------- 1 | simulation. O(nm). 2 | 3 | -------------------------------------------------------------------------------- /1701-1800/1710. Maximum Units on a Truck.txt: -------------------------------------------------------------------------------- 1 | nth_element. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1701-1800/1716. Calculate Money in Leetcode Bank.txt: -------------------------------------------------------------------------------- 1 | O(1). 2 | 3 | -------------------------------------------------------------------------------- /1701-1800/1720. Decode XORed Array.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1701-1800/1721. Swapping Nodes in a Linked List.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1701-1800/1730. Shortest Path to Get Food.txt: -------------------------------------------------------------------------------- 1 | bfs. O(nm). 2 | 3 | -------------------------------------------------------------------------------- /1701-1800/1732. Find the Highest Altitude.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1701-1800/1736. Latest Time by Replacing Hidden Digits.txt: -------------------------------------------------------------------------------- 1 | O(1). 2 | 3 | -------------------------------------------------------------------------------- /1701-1800/1740. Find Distance in a Binary Tree.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1701-1800/1743. Restore the Array From Adjacent Pairs.txt: -------------------------------------------------------------------------------- 1 | hashing. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1701-1800/1746. Maximum Subarray Sum After One Operation.txt: -------------------------------------------------------------------------------- 1 | DP. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1701-1800/1748. Sum of Unique Elements.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1701-1800/1752. Check if Array Is Sorted and Rotated.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1701-1800/1753. Maximum Score From Removing Stones.txt: -------------------------------------------------------------------------------- 1 | O(1). 2 | 3 | -------------------------------------------------------------------------------- /1701-1800/1759. Count Number of Homogenous Substrings.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1701-1800/1762. Buildings With an Ocean View.txt: -------------------------------------------------------------------------------- 1 | monotone stack. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1701-1800/1765. Map of Highest Peak.txt: -------------------------------------------------------------------------------- 1 | bfs. O(nm). 2 | 3 | -------------------------------------------------------------------------------- /1701-1800/1768. Merge Strings Alternately.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1701-1800/1772. Sort Features by Popularity.txt: -------------------------------------------------------------------------------- 1 | trie. O(L). 2 | 3 | -------------------------------------------------------------------------------- /1701-1800/1773. Count Items Matching a Rule.txt: -------------------------------------------------------------------------------- 1 | O(L). 2 | 3 | -------------------------------------------------------------------------------- /1701-1800/1780. Check if Number is a Sum of Powers of Three.txt: -------------------------------------------------------------------------------- 1 | O(log n). 2 | 3 | -------------------------------------------------------------------------------- /1701-1800/1785. Minimum Elements to Add to Form a Given Sum.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1701-1800/1796. Second Largest Digit in a String.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1701-1800/1800. Maximum Ascending Subarray Sum.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1801-1900/1804. Implement Trie II (Prefix Tree).txt: -------------------------------------------------------------------------------- 1 | trie. O(L). 2 | 3 | -------------------------------------------------------------------------------- /1801-1900/1805. Number of Different Integers in a String.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1801-1900/1807. Evaluate the Bracket Pairs of a String.txt: -------------------------------------------------------------------------------- 1 | trie. O(L). 2 | 3 | -------------------------------------------------------------------------------- /1801-1900/1812. Determine Color of a Chessboard Square.txt: -------------------------------------------------------------------------------- 1 | O(1). 2 | 3 | -------------------------------------------------------------------------------- /1801-1900/1816. Truncate Sentence.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1801-1900/1822. Sign of the Product of an Array.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1801-1900/1824. Minimum Sideway Jumps.txt: -------------------------------------------------------------------------------- 1 | DP. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1801-1900/1826. Faulty Sensor.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1801-1900/1827. Minimum Operations to Make the Array Increasing.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1801-1900/1829. Maximum XOR for Each Query.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1801-1900/1832. Check if the Sentence Is Pangram.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1801-1900/1837. Sum of Digits in Base K.txt: -------------------------------------------------------------------------------- 1 | O(log n). 2 | 3 | -------------------------------------------------------------------------------- /1801-1900/1844. Replace All Digits with Characters.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1801-1900/1848. Minimum Distance to the Target Element.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1801-1900/1854. Maximum Population Year.txt: -------------------------------------------------------------------------------- 1 | O(sort(n)). 2 | 3 | -------------------------------------------------------------------------------- /1801-1900/1859. Sorting the Sentence.txt: -------------------------------------------------------------------------------- 1 | O(L). 2 | 3 | -------------------------------------------------------------------------------- /1801-1900/1860. Incremental Memory Leak.txt: -------------------------------------------------------------------------------- 1 | math. O(1). 2 | 3 | -------------------------------------------------------------------------------- /1801-1900/1861. Rotating the Box.txt: -------------------------------------------------------------------------------- 1 | O(nm). 2 | 3 | -------------------------------------------------------------------------------- /1801-1900/1869. Longer Contiguous Segments of Ones than Zeros.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1801-1900/1871. Jump Game VII.txt: -------------------------------------------------------------------------------- 1 | DP, sliding window. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1801-1900/1872. Stone Game VIII.txt: -------------------------------------------------------------------------------- 1 | DP, O(n). 2 | 3 | -------------------------------------------------------------------------------- /1801-1900/1880. Check if Word Equals Summation of Two Words.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1801-1900/1881. Maximum Value after Insertion.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1801-1900/1882. Process Tasks Using Servers.txt: -------------------------------------------------------------------------------- 1 | heap. O(n log n). 2 | 3 | -------------------------------------------------------------------------------- /1801-1900/1883. Minimum Skips to Arrive at Meeting On Time.txt: -------------------------------------------------------------------------------- 1 | DP. O(n^2). 2 | 3 | -------------------------------------------------------------------------------- /1801-1900/1894. Find the Student that Will Replace the Chalk.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1901-2000/1903. Largest Odd Number in String.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1901-2000/1904. The Number of Full Rounds You Have Played.txt: -------------------------------------------------------------------------------- 1 | O(1). 2 | 3 | -------------------------------------------------------------------------------- /1901-2000/1905. Count Sub Islands.txt: -------------------------------------------------------------------------------- 1 | bfs. O(nm). 2 | 3 | -------------------------------------------------------------------------------- /1901-2000/1908. Game of Nim.txt: -------------------------------------------------------------------------------- 1 | game of nim, use xor. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1901-2000/1910. Remove All Occurrences of a Substring.txt: -------------------------------------------------------------------------------- 1 | kmp. O(n+m). 2 | 3 | -------------------------------------------------------------------------------- /1901-2000/1911. Maximum Alternating Subsequence Sum.txt: -------------------------------------------------------------------------------- 1 | DP. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1901-2000/1912. Design Movie Rental System.txt: -------------------------------------------------------------------------------- 1 | priority queue. O(log n). 2 | 3 | -------------------------------------------------------------------------------- /1901-2000/1913. Maximum Product Difference Between Two Pairs.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1901-2000/1914. Cyclically Rotating a Grid.txt: -------------------------------------------------------------------------------- 1 | O(nm). 2 | 3 | -------------------------------------------------------------------------------- /1901-2000/1920. Build Array from Permutation.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1901-2000/1922. Count Good Numbers.txt: -------------------------------------------------------------------------------- 1 | math. O(log n). 2 | 3 | -------------------------------------------------------------------------------- /1901-2000/1926. Nearest Exit from Entrance in Maze.txt: -------------------------------------------------------------------------------- 1 | bfs. O(nm). 2 | 3 | -------------------------------------------------------------------------------- /1901-2000/1929. Concatenation of Array.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1901-2000/1932. Merge BSTs to Create Single BST.txt: -------------------------------------------------------------------------------- 1 | hashing, dfs. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1901-2000/1935. Maximum Number of Words You Can Type.txt: -------------------------------------------------------------------------------- 1 | O(L). 2 | 3 | -------------------------------------------------------------------------------- /1901-2000/1936. Add Minimum Number of Rungs.txt: -------------------------------------------------------------------------------- 1 | greedy. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1901-2000/1943. Describe the Painting.txt: -------------------------------------------------------------------------------- 1 | sorting. O(sort(n)). 2 | 3 | -------------------------------------------------------------------------------- /1901-2000/1946. Largest Number After Mutating Substring.txt: -------------------------------------------------------------------------------- 1 | greedy. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1901-2000/1955. Count Number of Special Subsequences.txt: -------------------------------------------------------------------------------- 1 | DP. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1901-2000/1957. Delete Characters to Make Fancy String.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1901-2000/1958. Check if Move is Legal.txt: -------------------------------------------------------------------------------- 1 | O(n+m) after reading the input. 2 | 3 | -------------------------------------------------------------------------------- /1901-2000/1961. Check If String Is a Prefix of Array.txt: -------------------------------------------------------------------------------- 1 | O(L). 2 | 3 | -------------------------------------------------------------------------------- /1901-2000/1971. Find if Path Exists in Graph.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n+m). 2 | 3 | -------------------------------------------------------------------------------- /1901-2000/1973. Count Nodes Equal to Sum of Descendants.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1901-2000/1975. Maximum Matrix Sum.txt: -------------------------------------------------------------------------------- 1 | greedy. O(nm). 2 | 3 | -------------------------------------------------------------------------------- /1901-2000/1979. Find Greatest Common Divisor of Array.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1901-2000/1980. Find Unique Binary String.txt: -------------------------------------------------------------------------------- 1 | O(n^2). 2 | 3 | -------------------------------------------------------------------------------- /1901-2000/1987. Number of Unique Good Subsequences.txt: -------------------------------------------------------------------------------- 1 | DP. O(n). 2 | 3 | -------------------------------------------------------------------------------- /1901-2000/1991. Find the Middle Index in Array.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /1901-2000/1992. Find All Groups of Farmland.txt: -------------------------------------------------------------------------------- 1 | O(nm). 2 | 3 | -------------------------------------------------------------------------------- /1901-2000/1995. Count Special Quadruplets.txt: -------------------------------------------------------------------------------- 1 | 4-sum. O(n^2). 2 | 3 | -------------------------------------------------------------------------------- /1901-2000/2000. Reverse Prefix of Word.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2001-2100/2021. Brightest Position on Street.txt: -------------------------------------------------------------------------------- 1 | prefix sum. O(sort(n)). 2 | 3 | -------------------------------------------------------------------------------- /2001-2100/2022. Convert 1D Array Into 2D Array.txt: -------------------------------------------------------------------------------- 1 | O(nm). 2 | 3 | -------------------------------------------------------------------------------- /2001-2100/2027. Minimum Moves to Convert String.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2001-2100/2028. Find Missing Observations.txt: -------------------------------------------------------------------------------- 1 | O(n+m). 2 | 3 | -------------------------------------------------------------------------------- /2001-2100/2029. Stone Game IX.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2001-2100/2032. Two Out of Three.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2001-2100/2036. Maximum Alternating Subarray Sum.txt: -------------------------------------------------------------------------------- 1 | DP, O(n). 2 | 3 | -------------------------------------------------------------------------------- /2001-2100/2039. The Time When the Network Becomes Idle.txt: -------------------------------------------------------------------------------- 1 | bfs. O(n+m). 2 | 3 | -------------------------------------------------------------------------------- /2001-2100/2042. Check if Numbers Are Ascending in a Sentence.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2001-2100/2043. Simple Bank System.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2001-2100/2047. Number of Valid Words in a Sentence.txt: -------------------------------------------------------------------------------- 1 | O(L). 2 | 3 | -------------------------------------------------------------------------------- /2001-2100/2050. Parallel Courses III.txt: -------------------------------------------------------------------------------- 1 | DP on DAG. O(n+m). 2 | 3 | -------------------------------------------------------------------------------- /2001-2100/2053. Kth Distinct String in an Array.txt: -------------------------------------------------------------------------------- 1 | O(L). 2 | 3 | -------------------------------------------------------------------------------- /2001-2100/2054. Two Best Non-Overlapping Events.txt: -------------------------------------------------------------------------------- 1 | O(sort(n)). 2 | 3 | -------------------------------------------------------------------------------- /2001-2100/2055. Plates Between Candles.txt: -------------------------------------------------------------------------------- 1 | prefix sum. O(n+q). 2 | 3 | -------------------------------------------------------------------------------- /2001-2100/2056. Number of Valid Move Combinations On Chessboard.txt: -------------------------------------------------------------------------------- 1 | dfs. 2 | 3 | -------------------------------------------------------------------------------- /2001-2100/2057. Smallest Index With Equal Value.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2001-2100/2063. Vowels of All Substrings.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2001-2100/2068. Check Whether Two Strings are Almost Equivalent.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2001-2100/2069. Walking Robot Simulation II.txt: -------------------------------------------------------------------------------- 1 | O(1) per operation. 2 | 3 | -------------------------------------------------------------------------------- /2001-2100/2074. Reverse Nodes in Even Length Groups.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2001-2100/2075. Decode the Slanted Ciphertext.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2001-2100/2078. Two Furthest Houses With Different Colors.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2001-2100/2079. Watering Plants.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2001-2100/2085. Count Common Words With One Occurrence.txt: -------------------------------------------------------------------------------- 1 | O(L). 2 | 3 | -------------------------------------------------------------------------------- /2001-2100/2087. Minimum Cost Homecoming of a Robot in a Grid.txt: -------------------------------------------------------------------------------- 1 | O(n+m). 2 | 3 | -------------------------------------------------------------------------------- /2001-2100/2088. Count Fertile Pyramids in a Land.txt: -------------------------------------------------------------------------------- 1 | DP. O(nm). 2 | 3 | -------------------------------------------------------------------------------- /2001-2100/2090. K Radius Subarray Averages.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2001-2100/2092. Find All People With Secret.txt: -------------------------------------------------------------------------------- 1 | bfs. O(n+sort(m)). 2 | 3 | -------------------------------------------------------------------------------- /2001-2100/2094. Finding 3-Digit Even Numbers.txt: -------------------------------------------------------------------------------- 1 | dfs. 2 | 3 | -------------------------------------------------------------------------------- /2001-2100/2095. Delete the Middle Node of a Linked List.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2001-2100/2097. Valid Arrangement of Pairs.txt: -------------------------------------------------------------------------------- 1 | Eularian path. O(n). 2 | 3 | -------------------------------------------------------------------------------- /2001-2100/2100. Find Good Days to Rob the Bank.txt: -------------------------------------------------------------------------------- 1 | DP. O(n). 2 | 3 | -------------------------------------------------------------------------------- /2101-2200/2103. Rings and Rods.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2101-2200/2104. Sum of Subarray Ranges.txt: -------------------------------------------------------------------------------- 1 | monotone stack. O(n). 2 | 3 | -------------------------------------------------------------------------------- /2101-2200/2105. Watering Plants II.txt: -------------------------------------------------------------------------------- 1 | simulation. O(n). 2 | 3 | -------------------------------------------------------------------------------- /2101-2200/2108. Find First Palindromic String in the Array.txt: -------------------------------------------------------------------------------- 1 | O(L). 2 | 3 | -------------------------------------------------------------------------------- /2101-2200/2109. Adding Spaces to a String.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2101-2200/2110. Number of Smooth Descent Periods of a Stock.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2101-2200/2114. Maximum Number of Words Found in Sentences.txt: -------------------------------------------------------------------------------- 1 | O(L). 2 | 3 | -------------------------------------------------------------------------------- /2101-2200/2119. A Number After a Double Reversal.txt: -------------------------------------------------------------------------------- 1 | O(1). 2 | 3 | -------------------------------------------------------------------------------- /2101-2200/2121. Intervals Between Identical Elements.txt: -------------------------------------------------------------------------------- 1 | prefix sum. O(n). 2 | 3 | -------------------------------------------------------------------------------- /2101-2200/2124. Check if All A's Appears Before All B's.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2101-2200/2125. Number of Laser Beams in a Bank.txt: -------------------------------------------------------------------------------- 1 | O(nm). 2 | 3 | -------------------------------------------------------------------------------- /2101-2200/2129. Capitalize the Title.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2101-2200/2130. Maximum Twin Sum of a Linked List.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2101-2200/2138. Divide a String Into Groups of Size k.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2101-2200/2140. Solving Questions With Brainpower.txt: -------------------------------------------------------------------------------- 1 | DP. O(n). 2 | 3 | -------------------------------------------------------------------------------- /2101-2200/2145. Count the Hidden Sequences.txt: -------------------------------------------------------------------------------- 1 | prefix sum. O(n). 2 | 3 | -------------------------------------------------------------------------------- /2101-2200/2147. Number of Ways to Divide a Long Corridor.txt: -------------------------------------------------------------------------------- 1 | DP, O(n). 2 | 3 | -------------------------------------------------------------------------------- /2101-2200/2149. Rearrange Array Elements by Sign.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2101-2200/2150. Find All Lonely Numbers in the Array.txt: -------------------------------------------------------------------------------- 1 | hashing. O(n). 2 | 3 | -------------------------------------------------------------------------------- /2101-2200/2154. Keep Multiplying Found Values by Two.txt: -------------------------------------------------------------------------------- 1 | O(L). 2 | 3 | -------------------------------------------------------------------------------- /2101-2200/2161. Partition Array According to Given Pivot.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2101-2200/2165. Smallest Value of the Rearranged Number.txt: -------------------------------------------------------------------------------- 1 | O(log n). 2 | 3 | -------------------------------------------------------------------------------- /2101-2200/2166. Design Bitset.txt: -------------------------------------------------------------------------------- 1 | O(1) per operation. 2 | 3 | -------------------------------------------------------------------------------- /2101-2200/2169. Count Operations to Obtain Zero.txt: -------------------------------------------------------------------------------- 1 | gcd. O(log n). 2 | 3 | -------------------------------------------------------------------------------- /2101-2200/2180. Count Integers With Even Digit Sum.txt: -------------------------------------------------------------------------------- 1 | O(1). 2 | 3 | -------------------------------------------------------------------------------- /2101-2200/2181. Merge Nodes in Between Zeros.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2101-2200/2182. Construct String With Repeat Limit.txt: -------------------------------------------------------------------------------- 1 | greedy. O(n). 2 | 3 | -------------------------------------------------------------------------------- /2101-2200/2184. Number of Ways to Build Sturdy Brick Wall.txt: -------------------------------------------------------------------------------- 1 | bitmask DP. 2 | 3 | -------------------------------------------------------------------------------- /2101-2200/2185. Counting Words With a Given Prefix.txt: -------------------------------------------------------------------------------- 1 | O(L). 2 | 3 | -------------------------------------------------------------------------------- /2101-2200/2190. Most Frequent Number Following Key In an Array.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2101-2200/2191. Sort the Jumbled Numbers.txt: -------------------------------------------------------------------------------- 1 | radix sort. O(n log U). 2 | 3 | -------------------------------------------------------------------------------- /2101-2200/2194. Cells in a Range on an Excel Sheet.txt: -------------------------------------------------------------------------------- 1 | O(output). 2 | 3 | -------------------------------------------------------------------------------- /2101-2200/2196. Create Binary Tree From Descriptions.txt: -------------------------------------------------------------------------------- 1 | hashing. O(n). 2 | 3 | -------------------------------------------------------------------------------- /2101-2200/2200. Find All K-Distant Indices in an Array.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2201-2300/2201. Count Artifacts That Can Be Extracted.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2201-2300/2202. Maximize the Topmost Element After K Moves.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2201-2300/2206. Divide Array Into Equal Pairs.txt: -------------------------------------------------------------------------------- 1 | hashing. O(n). 2 | 3 | -------------------------------------------------------------------------------- /2201-2300/2207. Maximize Number of Subsequences in a String.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2201-2300/2210. Count Hills and Valleys in an Array.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2201-2300/2211. Count Collisions on a Road.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2201-2300/2214. Minimum Health to Beat Game.txt: -------------------------------------------------------------------------------- 1 | greedy. O(n). 2 | 3 | -------------------------------------------------------------------------------- /2201-2300/2215. Find the Difference of Two Arrays.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2201-2300/2216. Minimum Deletions to Make Array Beautiful.txt: -------------------------------------------------------------------------------- 1 | DP. O(n). 2 | 3 | -------------------------------------------------------------------------------- /2201-2300/2219. Maximum Sum Score of Array.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2201-2300/2222. Number of Ways to Select Buildings.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2201-2300/2223. Sum of Scores of Built Strings.txt: -------------------------------------------------------------------------------- 1 | kmp. O(n). 2 | 3 | -------------------------------------------------------------------------------- /2201-2300/2225. Find Players With Zero or One Losses.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2201-2300/2229. Check if an Array Is Consecutive.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2201-2300/2235. Add Two Integers.txt: -------------------------------------------------------------------------------- 1 | O(1). 2 | 3 | -------------------------------------------------------------------------------- /2201-2300/2236. Root Equals Sum of Children.txt: -------------------------------------------------------------------------------- 1 | O(1). 2 | 3 | -------------------------------------------------------------------------------- /2201-2300/2239. Find Closest Number to Zero.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2201-2300/2241. Design an ATM Machine.txt: -------------------------------------------------------------------------------- 1 | O(1) per operation. 2 | 3 | -------------------------------------------------------------------------------- /2201-2300/2243. Calculate Digit Sum of a String.txt: -------------------------------------------------------------------------------- 1 | simulation. O(n). 2 | 3 | -------------------------------------------------------------------------------- /2201-2300/2244. Minimum Rounds to Complete All Tasks.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2201-2300/2248. Intersection of Multiple Arrays.txt: -------------------------------------------------------------------------------- 1 | sorting. O(sort(n)). 2 | 3 | -------------------------------------------------------------------------------- /2201-2300/2255. Count Prefixes of a Given String.txt: -------------------------------------------------------------------------------- 1 | O(L). 2 | 3 | -------------------------------------------------------------------------------- /2201-2300/2256. Minimum Average Difference.txt: -------------------------------------------------------------------------------- 1 | prefix sum. O(n). 2 | 3 | -------------------------------------------------------------------------------- /2201-2300/2257. Count Unguarded Cells in the Grid.txt: -------------------------------------------------------------------------------- 1 | brute force. O(nm). 2 | 3 | -------------------------------------------------------------------------------- /2201-2300/2259. Remove Digit From Number to Maximize Result.txt: -------------------------------------------------------------------------------- 1 | LCP. O(n). 2 | 3 | -------------------------------------------------------------------------------- /2201-2300/2260. Minimum Consecutive Cards to Pick Up.txt: -------------------------------------------------------------------------------- 1 | hashing. O(n). 2 | 3 | -------------------------------------------------------------------------------- /2201-2300/2261. K Divisible Elements Subarrays.txt: -------------------------------------------------------------------------------- 1 | suffix tree. O(n). 2 | 3 | -------------------------------------------------------------------------------- /2201-2300/2264. Largest 3-Same-Digit Number in String.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2201-2300/2265. Count Nodes Equal to Average of Subtree.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2201-2300/2266. Count Number of Texts.txt: -------------------------------------------------------------------------------- 1 | DP. O(n). 2 | 3 | -------------------------------------------------------------------------------- /2201-2300/2268. Minimum Number of Keypresses.txt: -------------------------------------------------------------------------------- 1 | greedy. O(\Sigma). 2 | 3 | -------------------------------------------------------------------------------- /2201-2300/2269. Find the K-Beauty of a Number.txt: -------------------------------------------------------------------------------- 1 | O(log n). 2 | 3 | -------------------------------------------------------------------------------- /2201-2300/2270. Number of Ways to Split Array.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2201-2300/2277. Closest Node to Path in Tree.txt: -------------------------------------------------------------------------------- 1 | find LCA. O(1). 2 | 3 | -------------------------------------------------------------------------------- /2201-2300/2278. Percentage of Letter in String.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2201-2300/2280. Minimum Lines to Represent a Line Chart.txt: -------------------------------------------------------------------------------- 1 | O(sort(n)). 2 | 3 | -------------------------------------------------------------------------------- /2201-2300/2281. Sum of Total Strength of Wizards.txt: -------------------------------------------------------------------------------- 1 | monotone stack. O(n). 2 | 3 | -------------------------------------------------------------------------------- /2201-2300/2284. Sender With Largest Word Count.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2201-2300/2288. Apply Discount to Prices.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2201-2300/2290. Minimum Obstacle Removal to Reach Corner.txt: -------------------------------------------------------------------------------- 1 | bfs. O(nm). 2 | 3 | -------------------------------------------------------------------------------- /2201-2300/2291. Maximum Profit From Trading Stocks.txt: -------------------------------------------------------------------------------- 1 | knapsack. O~(nU). 2 | 3 | -------------------------------------------------------------------------------- /2201-2300/2293. Min Max Game.txt: -------------------------------------------------------------------------------- 1 | simulation. O(n). 2 | 3 | -------------------------------------------------------------------------------- /2201-2300/2295. Replace Elements in an Array.txt: -------------------------------------------------------------------------------- 1 | hashing. O(n). 2 | 3 | -------------------------------------------------------------------------------- /2201-2300/2299. Strong Password Checker II.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2301-2400/2303. Calculate Amount Paid in Taxes.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2301-2400/2304. Minimum Path Cost in a Grid.txt: -------------------------------------------------------------------------------- 1 | DP, O(mn^2). 2 | 3 | -------------------------------------------------------------------------------- /2301-2400/2309. Greatest English Letter in Upper and Lower Case.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2301-2400/2312. Selling Pieces of Wood.txt: -------------------------------------------------------------------------------- 1 | DP. O(nm(n+m)). 2 | 3 | -------------------------------------------------------------------------------- /2301-2400/2315. Count Asterisks.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2301-2400/2319. Check if Matrix Is X-Matrix.txt: -------------------------------------------------------------------------------- 1 | O(n^2). 2 | 3 | -------------------------------------------------------------------------------- /2301-2400/2325. Decode the Message.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2301-2400/2326. Spiral Matrix IV.txt: -------------------------------------------------------------------------------- 1 | O(nm). 2 | 3 | -------------------------------------------------------------------------------- /2301-2400/2330. Valid Palindrome IV.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2301-2400/2331. Evaluate Boolean Binary Tree.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n). 2 | 3 | -------------------------------------------------------------------------------- /2301-2400/2335. Minimum Amount of Time to Fill Cups.txt: -------------------------------------------------------------------------------- 1 | O(1). 2 | 3 | -------------------------------------------------------------------------------- /2301-2400/2340. Minimum Adjacent Swaps to Make a Valid Array.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2301-2400/2341. Maximum Number of Pairs in Array.txt: -------------------------------------------------------------------------------- 1 | hashing. O(n). 2 | 3 | -------------------------------------------------------------------------------- /2301-2400/2347. Best Poker Hand.txt: -------------------------------------------------------------------------------- 1 | O(1). 2 | 3 | -------------------------------------------------------------------------------- /2301-2400/2351. First Letter to Appear Twice.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2301-2400/2352. Equal Row and Column Pairs.txt: -------------------------------------------------------------------------------- 1 | hashing. O(n^2). 2 | 3 | -------------------------------------------------------------------------------- /2301-2400/2359. Find Closest Node to Given Two Nodes.txt: -------------------------------------------------------------------------------- 1 | bfs. O(n). 2 | 3 | -------------------------------------------------------------------------------- /2301-2400/2360. Longest Cycle in a Graph.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n). 2 | 3 | -------------------------------------------------------------------------------- /2301-2400/2361. Minimum Costs Using the Train Line.txt: -------------------------------------------------------------------------------- 1 | DP. O(n). 2 | 3 | -------------------------------------------------------------------------------- /2301-2400/2363. Merge Similar Items.txt: -------------------------------------------------------------------------------- 1 | O(sort(n)). 2 | 3 | -------------------------------------------------------------------------------- /2301-2400/2364. Count Number of Bad Pairs.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2301-2400/2365. Task Scheduler II.txt: -------------------------------------------------------------------------------- 1 | greedy/simulation. O(n). 2 | 3 | -------------------------------------------------------------------------------- /2301-2400/2367. Number of Arithmetic Triplets.txt: -------------------------------------------------------------------------------- 1 | hashing. O(n). 2 | 3 | -------------------------------------------------------------------------------- /2301-2400/2368. Reachable Nodes With Restrictions.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n). 2 | 3 | -------------------------------------------------------------------------------- /2301-2400/2370. Longest Ideal Subsequence.txt: -------------------------------------------------------------------------------- 1 | DP, range tree. O(n log k). 2 | 3 | -------------------------------------------------------------------------------- /2301-2400/2373. Largest Local Values in a Matrix.txt: -------------------------------------------------------------------------------- 1 | O(n^2). 2 | 3 | -------------------------------------------------------------------------------- /2301-2400/2374. Node With Highest Edge Score.txt: -------------------------------------------------------------------------------- 1 | O(n+m). 2 | 3 | -------------------------------------------------------------------------------- /2301-2400/2381. Shifting Letters II.txt: -------------------------------------------------------------------------------- 1 | prefix sum. O(n+m). 2 | 3 | -------------------------------------------------------------------------------- /2301-2400/2384. Largest Palindromic Number.txt: -------------------------------------------------------------------------------- 1 | greedy. O(n). 2 | 3 | -------------------------------------------------------------------------------- /2301-2400/2390. Removing Stars From a String.txt: -------------------------------------------------------------------------------- 1 | stack. O(n). 2 | 3 | -------------------------------------------------------------------------------- /2301-2400/2391. Minimum Amount of Time to Collect Garbage.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2301-2400/2393. Count Strictly Increasing Subarrays.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /2301-2400/2395. Find Subarrays With Equal Sum.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2301-2400/2399. Check Distances Between Same Letters.txt: -------------------------------------------------------------------------------- 1 | O(n+|Σ|). 2 | 3 | -------------------------------------------------------------------------------- /2401-2500/2402. Meeting Rooms III.txt: -------------------------------------------------------------------------------- 1 | priority queue. O(sort(m)). 2 | 3 | -------------------------------------------------------------------------------- /2401-2500/2404. Most Frequent Even Element.txt: -------------------------------------------------------------------------------- 1 | hashing. O(n). 2 | 3 | -------------------------------------------------------------------------------- /2401-2500/2405. Optimal Partition of String.txt: -------------------------------------------------------------------------------- 1 | greedy. O(n). 2 | 3 | -------------------------------------------------------------------------------- /2401-2500/2408. Design SQL.txt: -------------------------------------------------------------------------------- 1 | O(1) per operation. 2 | 3 | -------------------------------------------------------------------------------- /2401-2500/2409. Count Days Spent Together.txt: -------------------------------------------------------------------------------- 1 | O(1). 2 | 3 | -------------------------------------------------------------------------------- /2401-2500/2413. Smallest Even Multiple.txt: -------------------------------------------------------------------------------- 1 | lcm. O(1). 2 | 3 | -------------------------------------------------------------------------------- /2401-2500/2415. Reverse Odd Levels of Binary Tree.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2401-2500/2416. Sum of Prefix Scores of Strings.txt: -------------------------------------------------------------------------------- 1 | trie. O(L). 2 | 3 | -------------------------------------------------------------------------------- /2401-2500/2418. Sort the People.txt: -------------------------------------------------------------------------------- 1 | O(sort(n)). 2 | 3 | -------------------------------------------------------------------------------- /2401-2500/2420. Find All Good Indices.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2401-2500/2423. Remove Letter To Equalize Frequency.txt: -------------------------------------------------------------------------------- 1 | counting. O(n). 2 | 3 | -------------------------------------------------------------------------------- /2401-2500/2424. Longest Uploaded Prefix.txt: -------------------------------------------------------------------------------- 1 | monotone pointer. O(n). 2 | 3 | -------------------------------------------------------------------------------- /2401-2500/2427. Number of Common Factors.txt: -------------------------------------------------------------------------------- 1 | gcd. O(factor(U)). 2 | 3 | -------------------------------------------------------------------------------- /2401-2500/2428. Maximum Sum of an Hourglass.txt: -------------------------------------------------------------------------------- 1 | O(nm). 2 | 3 | -------------------------------------------------------------------------------- /2401-2500/2433. Find The Original Array of Prefix Xor.txt: -------------------------------------------------------------------------------- 1 | xor. O(n). 2 | 3 | -------------------------------------------------------------------------------- /2401-2500/2437. Number of Valid Clock Times.txt: -------------------------------------------------------------------------------- 1 | O(1). 2 | 3 | -------------------------------------------------------------------------------- /2401-2500/2445. Number of Nodes With Value One.txt: -------------------------------------------------------------------------------- 1 | dfs, O(n+q). 2 | 3 | -------------------------------------------------------------------------------- /2401-2500/2446. Determine if Two Events Have Conflict.txt: -------------------------------------------------------------------------------- 1 | O(1). 2 | 3 | -------------------------------------------------------------------------------- /2401-2500/2456. Most Popular Video Creator.txt: -------------------------------------------------------------------------------- 1 | hashing. O(L). 2 | 3 | -------------------------------------------------------------------------------- /2401-2500/2460. Apply Operations to an Array.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2401-2500/2467. Most Profitable Path in a Tree.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n). 2 | 3 | -------------------------------------------------------------------------------- /2401-2500/2469. Convert the Temperature.txt: -------------------------------------------------------------------------------- 1 | O(1). 2 | 3 | -------------------------------------------------------------------------------- /2401-2500/2475. Number of Unequal Triplets in Array.txt: -------------------------------------------------------------------------------- 1 | hashing. O(n). 2 | 3 | -------------------------------------------------------------------------------- /2401-2500/2481. Minimum Cuts to Divide a Circle.txt: -------------------------------------------------------------------------------- 1 | even and odd. O(1). 2 | 3 | -------------------------------------------------------------------------------- /2401-2500/2483. Minimum Penalty for a Shop.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2401-2500/2487. Remove Nodes From Linked List.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2401-2500/2490. Circular Sentence.txt: -------------------------------------------------------------------------------- 1 | O(L). 2 | 3 | -------------------------------------------------------------------------------- /2401-2500/2496. Maximum Value of a String in an Array.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2401-2500/2497. Maximum Star Sum of a Graph.txt: -------------------------------------------------------------------------------- 1 | nth_element. O(n+m). 2 | 3 | -------------------------------------------------------------------------------- /2501-2600/2502. Design Memory Allocator.txt: -------------------------------------------------------------------------------- 1 | BST. O(n log n). 2 | 3 | -------------------------------------------------------------------------------- /2501-2600/2509. Cycle Length Queries in a Tree.txt: -------------------------------------------------------------------------------- 1 | bit operation. O(q). 2 | 3 | -------------------------------------------------------------------------------- /2501-2600/2511. Maximum Enemy Forts That Can Be Captured.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2501-2600/2512. Reward Top K Students.txt: -------------------------------------------------------------------------------- 1 | counting + counting sort. O(L). 2 | 3 | -------------------------------------------------------------------------------- /2501-2600/2513. Minimize the Maximum of Two Arrays.txt: -------------------------------------------------------------------------------- 1 | math. O(1). 2 | 3 | -------------------------------------------------------------------------------- /2501-2600/2514. Count Anagrams.txt: -------------------------------------------------------------------------------- 1 | counting, binomial. O(n). 2 | 3 | -------------------------------------------------------------------------------- /2501-2600/2525. Categorize Box According to Criteria.txt: -------------------------------------------------------------------------------- 1 | O(1). 2 | 3 | -------------------------------------------------------------------------------- /2501-2600/2537. Count the Number of Good Subarrays.txt: -------------------------------------------------------------------------------- 1 | two pointers. O(n). 2 | 3 | -------------------------------------------------------------------------------- /2501-2600/2540. Minimum Common Value.txt: -------------------------------------------------------------------------------- 1 | two pointers. O(n). 2 | 3 | -------------------------------------------------------------------------------- /2501-2600/2541. Minimum Operations to Make Array Equal II.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2501-2600/2544. Alternating Digit Sum.txt: -------------------------------------------------------------------------------- 1 | O(log n). 2 | 3 | -------------------------------------------------------------------------------- /2501-2600/2553. Separate the Digits in an Array.txt: -------------------------------------------------------------------------------- 1 | O(n log U). 2 | 3 | -------------------------------------------------------------------------------- /2501-2600/2555. Maximize Win From Two Segments.txt: -------------------------------------------------------------------------------- 1 | two pointers. O(n). 2 | 3 | -------------------------------------------------------------------------------- /2501-2600/2559. Count Vowel Strings in Ranges.txt: -------------------------------------------------------------------------------- 1 | prefix sum. O(L). 2 | 3 | -------------------------------------------------------------------------------- /2501-2600/2566. Maximum Difference by Remapping a Digit.txt: -------------------------------------------------------------------------------- 1 | O(log U). 2 | 3 | -------------------------------------------------------------------------------- /2501-2600/2570. Merge Two 2D Arrays by Summing Values.txt: -------------------------------------------------------------------------------- 1 | merging. O(m). 2 | 3 | -------------------------------------------------------------------------------- /2501-2600/2574. Left and Right Sum Differences.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2501-2600/2575. Find the Divisibility Array of a String.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2501-2600/2578. Split With Minimum Sum.txt: -------------------------------------------------------------------------------- 1 | greedy. O(log n). 2 | 3 | -------------------------------------------------------------------------------- /2501-2600/2579. Count Total Number of Colored Cells.txt: -------------------------------------------------------------------------------- 1 | 2n^2-2n+1. O(1). 2 | 3 | -------------------------------------------------------------------------------- /2501-2600/2582. Pass the Pillow.txt: -------------------------------------------------------------------------------- 1 | O(1). 2 | 3 | -------------------------------------------------------------------------------- /2501-2600/2586. Count the Number of Vowel Strings in Range.txt: -------------------------------------------------------------------------------- 1 | O(L). 2 | 3 | -------------------------------------------------------------------------------- /2501-2600/2590. Design a Todo List.txt: -------------------------------------------------------------------------------- 1 | sorted list. 2 | 3 | -------------------------------------------------------------------------------- /2501-2600/2591. Distribute Money to Maximum Children.txt: -------------------------------------------------------------------------------- 1 | O(1). 2 | 3 | -------------------------------------------------------------------------------- /2501-2600/2595. Number of Even and Odd Bits.txt: -------------------------------------------------------------------------------- 1 | O(1). 2 | 3 | -------------------------------------------------------------------------------- /2501-2600/2596. Check Knight Tour Configuration.txt: -------------------------------------------------------------------------------- 1 | O(n^2). 2 | 3 | -------------------------------------------------------------------------------- /2501-2600/2600. K Items With the Maximum Sum.txt: -------------------------------------------------------------------------------- 1 | O(1). 2 | 3 | -------------------------------------------------------------------------------- /2601-2700/2605. Form Smallest Number From Two Digit Arrays.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2601-2700/2606. Find the Substring With Maximum Cost.txt: -------------------------------------------------------------------------------- 1 | DP. O(n). 2 | 3 | -------------------------------------------------------------------------------- /2601-2700/2610. Convert an Array Into a 2D Array With Conditions.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2601-2700/2611. Mice and Cheese.txt: -------------------------------------------------------------------------------- 1 | greedy. O(n). 2 | 3 | -------------------------------------------------------------------------------- /2601-2700/2614. Prime In Diagonal.txt: -------------------------------------------------------------------------------- 1 | O(n^2+n*polylog U). 2 | 3 | -------------------------------------------------------------------------------- /2601-2700/2615. Sum of Distances.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2601-2700/2639. Find the Width of Columns of a Grid.txt: -------------------------------------------------------------------------------- 1 | O(nm). 2 | 3 | -------------------------------------------------------------------------------- /2601-2700/2640. Find the Score of All Prefixes of an Array.txt: -------------------------------------------------------------------------------- 1 | O(nm). 2 | 3 | -------------------------------------------------------------------------------- /2601-2700/2641. Cousins in Binary Tree II.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2601-2700/2643. Row With Maximum Ones.txt: -------------------------------------------------------------------------------- 1 | O(nm). 2 | 3 | -------------------------------------------------------------------------------- /2601-2700/2645. Minimum Additions to Make Valid String.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2601-2700/2651. Calculate Delayed Arrival Time.txt: -------------------------------------------------------------------------------- 1 | O(1). 2 | 3 | -------------------------------------------------------------------------------- /2601-2700/2652. Sum Multiples.txt: -------------------------------------------------------------------------------- 1 | O(1). 2 | 3 | -------------------------------------------------------------------------------- /2601-2700/2655. Find Maximal Uncovered Ranges.txt: -------------------------------------------------------------------------------- 1 | sorting. O(sort(n)). 2 | 3 | -------------------------------------------------------------------------------- /2601-2700/2658. Maximum Number of Fish in a Grid.txt: -------------------------------------------------------------------------------- 1 | dfs. O(nm). 2 | 3 | -------------------------------------------------------------------------------- /2601-2700/2660. Determine the Winner of a Bowling Game.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2601-2700/2661. First Completely Painted Row or Column.txt: -------------------------------------------------------------------------------- 1 | O(nm). 2 | 3 | -------------------------------------------------------------------------------- /2601-2700/2670. Find the Distinct Difference Array.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2601-2700/2671. Frequency Tracker.txt: -------------------------------------------------------------------------------- 1 | O(1) per operation. 2 | 3 | -------------------------------------------------------------------------------- /2601-2700/2677. Chunk Array.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2601-2700/2678. Number of Senior Citizens.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2601-2700/2679. Sum in a Matrix.txt: -------------------------------------------------------------------------------- 1 | O(n*sort(m)). 2 | 3 | -------------------------------------------------------------------------------- /2601-2700/2680. Maximum OR.txt: -------------------------------------------------------------------------------- 1 | greedy. O(n). 2 | 3 | -------------------------------------------------------------------------------- /2601-2700/2682. Find the Losers of the Circular Game.txt: -------------------------------------------------------------------------------- 1 | simulation. O(n). 2 | 3 | -------------------------------------------------------------------------------- /2601-2700/2683. Neighboring Bitwise XOR.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2601-2700/2684. Maximum Number of Moves in a Grid.txt: -------------------------------------------------------------------------------- 1 | DP. O(nm). 2 | 3 | -------------------------------------------------------------------------------- /2601-2700/2685. Count the Number of Complete Components.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n+m). 2 | 3 | -------------------------------------------------------------------------------- /2601-2700/2697. Lexicographically Smallest Palindrome.txt: -------------------------------------------------------------------------------- 1 | greedy. O(n). 2 | 3 | -------------------------------------------------------------------------------- /2701-2800/2706. Buy Two Chocolates.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2701-2800/2708. Maximum Strength of a Group.txt: -------------------------------------------------------------------------------- 1 | greedy. O(n). 2 | 3 | -------------------------------------------------------------------------------- /2701-2800/2710. Remove Trailing Zeros From a String.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2701-2800/2716. Minimize String Length.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2701-2800/2717. Semi-Ordered Permutation.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2701-2800/2729. Check if The Number is Fascinating.txt: -------------------------------------------------------------------------------- 1 | O(1). 2 | 3 | -------------------------------------------------------------------------------- /2701-2800/2730. Find the Longest Semi-Repetitive Substring.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2701-2800/2736. Maximum Sum Queries.txt: -------------------------------------------------------------------------------- 1 | range searching. O((n+q) log n). 2 | 3 | -------------------------------------------------------------------------------- /2701-2800/2739. Total Distance Traveled.txt: -------------------------------------------------------------------------------- 1 | O(1). 2 | 3 | -------------------------------------------------------------------------------- /2701-2800/2740. Find the Value of the Partition.txt: -------------------------------------------------------------------------------- 1 | closest pair. O(n). 2 | 3 | -------------------------------------------------------------------------------- /2701-2800/2742. Painting the Walls.txt: -------------------------------------------------------------------------------- 1 | knapsack. O(nU). 2 | 3 | -------------------------------------------------------------------------------- /2701-2800/2744. Find Maximum Number of String Pairs.txt: -------------------------------------------------------------------------------- 1 | O(L). 2 | 3 | -------------------------------------------------------------------------------- /2701-2800/2748. Number of Beautiful Pairs.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2701-2800/2750. Ways to Split Array Into Good Subarrays.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2701-2800/2751. Robot Collisions.txt: -------------------------------------------------------------------------------- 1 | sorting + stack. O(sort(n)). 2 | 3 | -------------------------------------------------------------------------------- /2701-2800/2765. Longest Alternating Subarray.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2701-2800/2766. Relocate Marbles.txt: -------------------------------------------------------------------------------- 1 | hashing. O(n). 2 | 3 | -------------------------------------------------------------------------------- /2701-2800/2768. Number of Black Blocks.txt: -------------------------------------------------------------------------------- 1 | hashing. O(#black cells). 2 | 3 | -------------------------------------------------------------------------------- /2701-2800/2769. Find the Maximum Achievable Number.txt: -------------------------------------------------------------------------------- 1 | O(1). 2 | 3 | -------------------------------------------------------------------------------- /2701-2800/2778. Sum of Squares of Special Elements.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2701-2800/2798. Number of Employees Who Met the Target.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2801-2900/2801. Count Stepping Numbers in Range.txt: -------------------------------------------------------------------------------- 1 | DP. O(L). 2 | 3 | -------------------------------------------------------------------------------- /2801-2900/2806. Account Balance After Rounded Purchase.txt: -------------------------------------------------------------------------------- 1 | O(1). 2 | 3 | -------------------------------------------------------------------------------- /2801-2900/2810. Faulty Keyboard.txt: -------------------------------------------------------------------------------- 1 | deque. O(n). 2 | 3 | -------------------------------------------------------------------------------- /2801-2900/2815. Max Pair Sum in an Array.txt: -------------------------------------------------------------------------------- 1 | O(n log U). 2 | 3 | -------------------------------------------------------------------------------- /2801-2900/2816. Double a Number Represented as a Linked List.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2801-2900/2860. Happy Students.txt: -------------------------------------------------------------------------------- 1 | counting sort. O(n). 2 | 3 | -------------------------------------------------------------------------------- /2801-2900/2864. Maximum Odd Binary Number.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2801-2900/2866. Beautiful Towers II.txt: -------------------------------------------------------------------------------- 1 | monotone stack. O(n). 2 | 3 | -------------------------------------------------------------------------------- /2801-2900/2869. Minimum Operations to Collect Elements.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2801-2900/2870. Minimum Number of Operations to Make Array Empty.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /2901-3000/2906. Construct Product Matrix.txt: -------------------------------------------------------------------------------- 1 | 2D prefix product. O(nm). 2 | 3 | -------------------------------------------------------------------------------- /2901-3000/2923. Find Champion I.txt: -------------------------------------------------------------------------------- 1 | O(n^2). 2 | 3 | 4 | -------------------------------------------------------------------------------- /2901-3000/2924. Find Champion II.txt: -------------------------------------------------------------------------------- 1 | O(n+m). 2 | 3 | -------------------------------------------------------------------------------- /2901-3000/2942. Find Words Containing Character.txt: -------------------------------------------------------------------------------- 1 | O(L). 2 | 3 | -------------------------------------------------------------------------------- /2901-3000/2946. Matrix Similarity After Cyclic Shifts.txt: -------------------------------------------------------------------------------- 1 | O(nm). 2 | 3 | -------------------------------------------------------------------------------- /2901-3000/2951. Find the Peaks.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /3001-3100/3001. Minimum Moves to Capture The Queen.txt: -------------------------------------------------------------------------------- 1 | O(1). 2 | 3 | -------------------------------------------------------------------------------- /3001-3100/3005. Count Elements With Maximum Frequency.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /3001-3100/3006. Find Beautiful Indices in the Given Array I.txt: -------------------------------------------------------------------------------- 1 | kmp. O(n). 2 | 3 | -------------------------------------------------------------------------------- /3001-3100/3036. Number of Subarrays That Match a Pattern II.txt: -------------------------------------------------------------------------------- 1 | kmp. O(n). 2 | 3 | -------------------------------------------------------------------------------- /3001-3100/3046. Split the Array.txt: -------------------------------------------------------------------------------- 1 | hashing. O(n). 2 | 3 | -------------------------------------------------------------------------------- /3101-3200/3101. Count Alternating Subarrays.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /3101-3200/3110. Score of a String.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /3101-3200/3115. Maximum Prime Difference.txt: -------------------------------------------------------------------------------- 1 | O(n+U/log log U). 2 | 3 | -------------------------------------------------------------------------------- /3101-3200/3120. Count the Number of Special Characters I.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /3101-3200/3121. Count the Number of Special Characters II.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /3101-3200/3123. Find Edges in Shortest Paths.txt: -------------------------------------------------------------------------------- 1 | SSSP(n,m). 2 | 3 | -------------------------------------------------------------------------------- /3101-3200/3127. Make a Square with the Same Color.txt: -------------------------------------------------------------------------------- 1 | O(nm). 2 | 3 | -------------------------------------------------------------------------------- /3101-3200/3131. Find the Integer Added to Array I.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /3101-3200/3136. Valid Word.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /3101-3200/3142. Check if Grid Satisfies Conditions.txt: -------------------------------------------------------------------------------- 1 | O(nm). 2 | 3 | -------------------------------------------------------------------------------- /3101-3200/3146. Permutation Difference between Two Strings.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /3101-3200/3147. Taking Maximum Energy From the Mystic Dungeon.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /3101-3200/3148. Maximum Difference Score in a Grid.txt: -------------------------------------------------------------------------------- 1 | DP. O(nm). 2 | 3 | -------------------------------------------------------------------------------- /3101-3200/3151. Special Array I.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /3101-3200/3152. Special Array II.txt: -------------------------------------------------------------------------------- 1 | maintain maximal subarrays. O(n). 2 | 3 | -------------------------------------------------------------------------------- /3101-3200/3163. String Compression III.txt: -------------------------------------------------------------------------------- 1 | simulation. O(n). 2 | 3 | -------------------------------------------------------------------------------- /3201-3300/3206. Alternating Groups I.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /3201-3300/3208. Alternating Groups II.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /3201-3300/3210. Find the Encrypted String.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /3201-3300/3216. Lexicographically Smallest String After a Swap.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /3201-3300/3217. Delete Nodes From Linked List Present in Array.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /3201-3300/3222. Find the Winning Player in Coin Game.txt: -------------------------------------------------------------------------------- 1 | O(1). 2 | 3 | -------------------------------------------------------------------------------- /3201-3300/3232. Find if Digit Game Can Be Won.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /3201-3300/3290. Maximum Multiplication Score.txt: -------------------------------------------------------------------------------- 1 | DP. O(n). 2 | 3 | -------------------------------------------------------------------------------- /3201-3300/3295. Report Spam Message.txt: -------------------------------------------------------------------------------- 1 | hashing. O(L). 2 | 3 | -------------------------------------------------------------------------------- /3301-3400/3310. Remove Methods From Project.txt: -------------------------------------------------------------------------------- 1 | dfs. O(n+m). 2 | 3 | -------------------------------------------------------------------------------- /3301-3400/3319. K-th Largest Perfect Subtree Size in Binary Tree.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /3301-3400/3351. Sum of Good Subsequences.txt: -------------------------------------------------------------------------------- 1 | DP. O(n). 2 | 3 | -------------------------------------------------------------------------------- /3301-3400/3370. Smallest Number With All Set Bits.txt: -------------------------------------------------------------------------------- 1 | Clz. O(1). 2 | 3 | -------------------------------------------------------------------------------- /3301-3400/3379. Transformed Array.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /3301-3400/3386. Button with Longest Push Time.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /3401-3500/3407. Substring Matching Pattern.txt: -------------------------------------------------------------------------------- 1 | kmp, greedy. O(n+m). 2 | 3 | -------------------------------------------------------------------------------- /3401-3500/3408. Design Task Manager.txt: -------------------------------------------------------------------------------- 1 | heap. O(n log n). 2 | 3 | -------------------------------------------------------------------------------- /3401-3500/3417. Zigzag Grid Traversal With Skip.txt: -------------------------------------------------------------------------------- 1 | O(nm). 2 | 3 | -------------------------------------------------------------------------------- /3401-3500/3418. Maximum Amount of Money Robot Can Earn.txt: -------------------------------------------------------------------------------- 1 | DP. O(nm). 2 | 3 | -------------------------------------------------------------------------------- /3401-3500/3427. Sum of Variable Length Subarrays.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /3401-3500/3432. Count Partitions with Even Sum Difference.txt: -------------------------------------------------------------------------------- 1 | O(n). 2 | 3 | -------------------------------------------------------------------------------- /3401-3500/3433. Count Mentions Per User.txt: -------------------------------------------------------------------------------- 1 | simulation. O(sort(n)). 2 | 3 | --------------------------------------------------------------------------------