diff --git a/README.md b/README.md index 1f15ecb9..1432f6d7 100644 --- a/README.md +++ b/README.md @@ -88,1015 +88,1015 @@ Add the following lines to your .vscode/settings.json file: ## Accepted solutions -| № | Title | Solution | Difficulty | Time | Space | Tags | Notes | -| - | ----- | -------- | ---------- | ---- | ---- | ----- | ----- | -| 2908. | [Minimum Sum of Mountain Triplets I](https://leetcode.com/problems/minimum-sum-of-mountain-triplets-i/) | [C++](./solutions/minimum-sum-of-mountain-triplets-i/solution.hpp) | | | | | | -| 2903. | [Find Indices With Index and Value Difference I](https://leetcode.com/problems/find-indices-with-index-and-value-difference-i/) | [C++](./solutions/find-indices-with-index-and-value-difference-i/solution.hpp) | | | | | | -| 2899. | [Last Visited Integers](https://leetcode.com/problems/last-visited-integers/) | [C++](./solutions/last-visited-integers/solution.hpp) | | | | | | -| 2894. | [Divisible and Non-divisible Sums Difference](https://leetcode.com/problems/divisible-and-non-divisible-sums-difference/) | [C++](./solutions/divisible-and-non-divisible-sums-difference/solution.hpp) | | | | | | -| 2873. | [Maximum Value of an Ordered Triplet I](https://leetcode.com/problems/maximum-value-of-an-ordered-triplet-i/) | [C++](./solutions/maximum-value-of-an-ordered-triplet-i/solution.hpp) | | | | | | -| 2869. | [Minimum Operations to Collect Elements](https://leetcode.com/problems/minimum-operations-to-collect-elements/) | [C++](./solutions/minimum-operations-to-collect-elements/solution.hpp) | | | | | | -| 2864. | [Maximum Odd Binary Number](https://leetcode.com/problems/maximum-odd-binary-number/) | [C++](./solutions/maximum-odd-binary-number/solution.hpp) | | | | | | -| 2859. | [Sum of Values at Indices With K Set Bits](https://leetcode.com/problems/sum-of-values-at-indices-with-k-set-bits/) | [C++](./solutions/sum-of-values-at-indices-with-k-set-bits/solution.hpp) | | | | | | -| 2855. | [Minimum Right Shifts to Sort the Array](https://leetcode.com/problems/minimum-right-shifts-to-sort-the-array/) | [C++](./solutions/minimum-right-shifts-to-sort-the-array/solution.hpp) | | | | | | -| 2848. | [Points That Intersect With Cars](https://leetcode.com/problems/points-that-intersect-with-cars/) | [C++](./solutions/points-that-intersect-with-cars/solution.hpp) | | | | | | -| 2843. | [ Count Symmetric Integers](https://leetcode.com/problems/count-symmetric-integers/) | [C++](./solutions/count-symmetric-integers/solution.hpp) | | | | | | -| 2839. | [Check if Strings Can be Made Equal With Operations I](https://leetcode.com/problems/check-if-strings-can-be-made-equal-with-operations-i/) | [C++](./solutions/check-if-strings-can-be-made-equal-with-operations-i/solution.hpp) | | | | | | -| 2833. | [Furthest Point From Origin](https://leetcode.com/problems/furthest-point-from-origin/) | [C++](./solutions/furthest-point-from-origin/solution.hpp) | | | | | | -| 2828. | [Check if a String Is an Acronym of Words](https://leetcode.com/problems/check-if-a-string-is-an-acronym-of-words/) | [C++](./solutions/check-if-a-string-is-an-acronym-of-words/solution.hpp) | | | | | | -| 2824. | [Count Pairs Whose Sum is Less than Target](https://leetcode.com/problems/count-pairs-whose-sum-is-less-than-target/) | [C++](./solutions/count-pairs-whose-sum-is-less-than-target/solution.hpp) | | | | | | -| 2815. | [Max Pair Sum in an Array](https://leetcode.com/problems/max-pair-sum-in-an-array/) | [C++](./solutions/max-pair-sum-in-an-array/solution.hpp) | | | | | | -| 2810. | [Faulty Keyboard](https://leetcode.com/problems/faulty-keyboard/) | [C++](./solutions/faulty-keyboard/solution.hpp) | | | | | | -| 2806. | [Account Balance After Rounded Purchase](https://leetcode.com/problems/account-balance-after-rounded-purchase/) | [C++](./solutions/account-balance-after-rounded-purchase/solution.hpp) | | | | | | -| 2798. | [Number of Employees Who Met the Target](https://leetcode.com/problems/number-of-employees-who-met-the-target/) | [C++](./solutions/number-of-employees-who-met-the-target/solution.hpp) | | | | | | -| 2788. | [Split Strings by Separator](https://leetcode.com/problems/split-strings-by-separator/) | [C++](./solutions/split-strings-by-separator/solution.hpp) | | | | | | -| 2784. | [Check if Array is Good](https://leetcode.com/problems/check-if-array-is-good/) | [C++](./solutions/check-if-array-is-good/solution.hpp) | | | | | | -| 2778. | [Sum of Squares of Special Elements ](https://leetcode.com/problems/sum-of-squares-of-special-elements/) | [C++](./solutions/sum-of-squares-of-special-elements/solution.hpp) | | | | | | -| 2769. | [Find the Maximum Achievable Number](https://leetcode.com/problems/find-the-maximum-achievable-number/) | [C++](./solutions/find-the-maximum-achievable-number/solution.hpp) | | | | | | -| 2765. | [Longest Alternating Subarray](https://leetcode.com/problems/longest-alternating-subarray/) | [C++](./solutions/longest-alternating-subarray/solution.hpp) | | | | | | -| 2760. | [Longest Even Odd Subarray With Threshold](https://leetcode.com/problems/longest-even-odd-subarray-with-threshold/) | [C++](./solutions/longest-even-odd-subarray-with-threshold/solution.hpp) | | | | | | -| 2748. | [Number of Beautiful Pairs](https://leetcode.com/problems/number-of-beautiful-pairs/) | [C++](./solutions/number-of-beautiful-pairs/solution.hpp) | | | | | | -| 2744. | [Find Maximum Number of String Pairs](https://leetcode.com/problems/find-maximum-number-of-string-pairs/) | [C++](./solutions/find-maximum-number-of-string-pairs/solution.hpp) | | | | | | -| 2742. | [Painting the Walls](https://leetcode.com/problems/painting-the-walls/) | [C++](./solutions/painting-the-walls/solution.hpp) | | | | | | -| 2739. | [Total Distance Traveled](https://leetcode.com/problems/total-distance-traveled/) | [C++](./solutions/total-distance-traveled/solution.hpp) | | | | | | -| 2733. | [Neither Minimum nor Maximum](https://leetcode.com/problems/neither-minimum-nor-maximum/) | [C++](./solutions/neither-minimum-nor-maximum/solution.hpp) | | | | | | -| 2729. | [Check if The Number is Fascinating](https://leetcode.com/problems/check-if-the-number-is-fascinating/) | [C++](./solutions/check-if-the-number-is-fascinating/solution.hpp) | | | | | | -| 2717. | [Semi-Ordered Permutation](https://leetcode.com/problems/semi-ordered-permutation/) | [C++](./solutions/semi-ordered-permutation/solution.hpp) | | | | | | -| 2716. | [Minimize String Length](https://leetcode.com/problems/minimize-string-length/) | [C++](./solutions/minimize-string-length/solution.hpp) | | | | | | -| 2710. | [Remove Trailing Zeros From a String](https://leetcode.com/problems/remove-trailing-zeros-from-a-string/) | [C++](./solutions/remove-trailing-zeros-from-a-string/solution.hpp) | | | | | | -| 2707. | [Extra Characters in a String](https://leetcode.com/problems/extra-characters-in-a-string/) | [C++](./solutions/extra-characters-in-a-string/solution.hpp) | | | | | | -| 2706. | [Buy Two Chocolates](https://leetcode.com/problems/buy-two-chocolates/) | [C++](./solutions/buy-two-chocolates/solution.hpp) | | | | | | -| 2697. | [Lexicographically Smallest Palindrome](https://leetcode.com/problems/lexicographically-smallest-palindrome/) | [C++](./solutions/lexicographically-smallest-palindrome/solution.hpp) | | | | | | -| 2696. | [Minimum String Length After Removing Substrings](https://leetcode.com/problems/minimum-string-length-after-removing-substrings/) | [C++](./solutions/minimum-string-length-after-removing-substrings/solution.hpp) | | | | | | -| 2682. | [Find the Losers of the Circular Game](https://leetcode.com/problems/find-the-losers-of-the-circular-game/) | [C++](./solutions/find-the-losers-of-the-circular-game/solution.hpp) | | | | | | -| 2678. | [Number of Senior Citizens](https://leetcode.com/problems/number-of-senior-citizens/) | [C++](./solutions/number-of-senior-citizens/solution.hpp) | | | | | | -| 2670. | [Find the Distinct Difference Array](https://leetcode.com/problems/find-the-distinct-difference-array/) | [C++](./solutions/find-the-distinct-difference-array/solution.hpp) | | | | | | -| 2660. | [Determine the Winner of a Bowling Game](https://leetcode.com/problems/determine-the-winner-of-a-bowling-game/) | [C++](./solutions/determine-the-winner-of-a-bowling-game/solution.hpp) | | | | | | -| 2656. | [Maximum Sum With Exactly K Elements ](https://leetcode.com/problems/maximum-sum-with-exactly-k-elements/) | [C++](./solutions/maximum-sum-with-exactly-k-elements/solution.hpp) | | | | | | -| 2652. | [Sum Multiples](https://leetcode.com/problems/sum-multiples/) | [C++](./solutions/sum-multiples/solution.hpp) | | | | | | -| 2651. | [Calculate Delayed Arrival Time](https://leetcode.com/problems/calculate-delayed-arrival-time/) | [C++](./solutions/calculate-delayed-arrival-time/solution.hpp) | | | | | | -| 2644. | [Find the Maximum Divisibility Score](https://leetcode.com/problems/find-the-maximum-divisibility-score/) | [C++](./solutions/find-the-maximum-divisibility-score/solution.hpp) | | | | | | -| 2643. | [Row With Maximum Ones](https://leetcode.com/problems/row-with-maximum-ones/) | [C++](./solutions/row-with-maximum-ones/solution.hpp) | | | | | | -| 2639. | [Find the Width of Columns of a Grid](https://leetcode.com/problems/find-the-width-of-columns-of-a-grid/) | [C++](./solutions/find-the-width-of-columns-of-a-grid/solution.hpp) | | | | | | -| 2616. | [Minimize the Maximum Difference of Pairs](https://leetcode.com/problems/minimize-the-maximum-difference-of-pairs/) | [C++](./solutions/minimize-the-maximum-difference-of-pairs/solution.hpp) | | | | | | -| 2614. | [Prime In Diagonal](https://leetcode.com/problems/prime-in-diagonal/) | [C++](./solutions/prime-in-diagonal/solution.hpp) | | | | | | -| 2609. | [Find the Longest Balanced Substring of a Binary String](https://leetcode.com/problems/find-the-longest-balanced-substring-of-a-binary-string/) | [C++](./solutions/find-the-longest-balanced-substring-of-a-binary-string/solution.hpp) | | | | | | -| 2605. | [Form Smallest Number From Two Digit Arrays](https://leetcode.com/problems/form-smallest-number-from-two-digit-arrays/) | [C++](./solutions/form-smallest-number-from-two-digit-arrays/solution.hpp) | | | | | | -| 2600. | [K Items With the Maximum Sum](https://leetcode.com/problems/k-items-with-the-maximum-sum/) | [C++](./solutions/k-items-with-the-maximum-sum/solution.hpp) | | | | | | -| 2595. | [Number of Even and Odd Bits](https://leetcode.com/problems/number-of-even-and-odd-bits/) | [C++](./solutions/number-of-even-and-odd-bits/solution.hpp) | | | | | | -| 2591. | [Distribute Money to Maximum Children](https://leetcode.com/problems/distribute-money-to-maximum-children/) | [C++](./solutions/distribute-money-to-maximum-children/solution.hpp) | | | | | | -| 2586. | [Count the Number of Vowel Strings in Range](https://leetcode.com/problems/count-the-number-of-vowel-strings-in-range/) | [C++](./solutions/count-the-number-of-vowel-strings-in-range/solution.hpp) | | | | | | -| 2582. | [Pass the Pillow](https://leetcode.com/problems/pass-the-pillow/) | [C++](./solutions/pass-the-pillow/solution.hpp) | | | | | | -| 2578. | [Split With Minimum Sum](https://leetcode.com/problems/split-with-minimum-sum/) | [C++](./solutions/split-with-minimum-sum/solution.hpp) | | | | | | -| 2577. | [Minimum Time to Visit a Cell In a Grid](https://leetcode.com/problems/minimum-time-to-visit-a-cell-in-a-grid/) | [C++](./solutions/minimum-time-to-visit-a-cell-in-a-grid/solution.hpp) | | | | | | -| 2576. | [Find the Maximum Number of Marked Indices](https://leetcode.com/problems/find-the-maximum-number-of-marked-indices/) | [C++](./solutions/find-the-maximum-number-of-marked-indices/solution.hpp) | | | | | | -| 2575. | [Find the Divisibility Array of a String](https://leetcode.com/problems/find-the-divisibility-array-of-a-string/) | [C++](./solutions/find-the-divisibility-array-of-a-string/solution.hpp) | | | | | | -| 2574. | [Left and Right Sum Differences](https://leetcode.com/problems/left-and-right-sum-differences/) | [C++](./solutions/left-and-right-sum-differences/solution.hpp) | | | | | | -| 2570. | [Merge Two 2D Arrays by Summing Values](https://leetcode.com/problems/merge-two-2d-arrays-by-summing-values/) | [C++](./solutions/merge-two-2d-arrays-by-summing-values/solution.hpp) | | | | | | -| 2566. | [Maximum Difference by Remapping a Digit](https://leetcode.com/problems/maximum-difference-by-remapping-a-digit/) | [C++](./solutions/maximum-difference-by-remapping-a-digit/solution.hpp) | | | | | | -| 2562. | [Find the Array Concatenation Value](https://leetcode.com/problems/find-the-array-concatenation-value/) | [C++](./solutions/find-the-array-concatenation-value/solution.hpp) | | | | | | -| 2558. | [Take Gifts From the Richest Pile](https://leetcode.com/problems/take-gifts-from-the-richest-pile/) | [C++](./solutions/take-gifts-from-the-richest-pile/solution.hpp) | | | | | | -| 2553. | [Separate the Digits in an Array](https://leetcode.com/problems/separate-the-digits-in-an-array/) | [C++](./solutions/separate-the-digits-in-an-array/solution.hpp) | | | | | | -| 2551. | [Put Marbles in Bags](https://leetcode.com/problems/put-marbles-in-bags/) | [C++](./solutions/put-marbles-in-bags/solution.hpp) | | | | | | -| 2549. | [Count Distinct Numbers on Board](https://leetcode.com/problems/count-distinct-numbers-on-board/) | [C++](./solutions/count-distinct-numbers-on-board/solution.hpp) | | | | | | -| 2544. | [Alternating Digit Sum](https://leetcode.com/problems/alternating-digit-sum/) | [C++](./solutions/alternating-digit-sum/solution.hpp) | | | | | | -| 2542. | [Maximum Subsequence Score](https://leetcode.com/problems/maximum-subsequence-score/) | [C++](./solutions/maximum-subsequence-score/solution.hpp) | | | | | | -| 2540. | [Minimum Common Value](https://leetcode.com/problems/minimum-common-value/) | [C++](./solutions/minimum-common-value/solution.hpp) | | | | | | -| 2536. | [Increment Submatrices by One](https://leetcode.com/problems/increment-submatrices-by-one/) | [C++](./solutions/increment-submatrices-by-one/solution.hpp) | | | | | | -| 2535. | [Difference Between Element Sum and Digit Sum of an Array](https://leetcode.com/problems/difference-between-element-sum-and-digit-sum-of-an-array/) | [C++](./solutions/difference-between-element-sum-and-digit-sum-of-an-array/solution.hpp) | | | | | | -| 2529. | [Maximum Count of Positive Integer and Negative Integer](https://leetcode.com/problems/maximum-count-of-positive-integer-and-negative-integer/) | [C++](./solutions/maximum-count-of-positive-integer-and-negative-integer/solution.hpp) | | | | | | -| 2525. | [Categorize Box According to Criteria](https://leetcode.com/problems/categorize-box-according-to-criteria/) | [C++](./solutions/categorize-box-according-to-criteria/solution.hpp) | | | | | | -| 2520. | [Count the Digits That Divide a Number](https://leetcode.com/problems/count-the-digits-that-divide-a-number/) | [C++](./solutions/count-the-digits-that-divide-a-number/solution.hpp) | | | | | | -| 2515. | [Shortest Distance to Target String in a Circular Array](https://leetcode.com/problems/shortest-distance-to-target-string-in-a-circular-array/) | [C++](./solutions/shortest-distance-to-target-string-in-a-circular-array/solution.hpp) | | | | | | -| 2511. | [Maximum Enemy Forts That Can Be Captured](https://leetcode.com/problems/maximum-enemy-forts-that-can-be-captured/) | [C++](./solutions/maximum-enemy-forts-that-can-be-captured/solution.hpp) | | | | | | -| 2506. | [Count Pairs Of Similar Strings](https://leetcode.com/problems/count-pairs-of-similar-strings/) | [C++](./solutions/count-pairs-of-similar-strings/solution.hpp) | | | | | | -| 2500. | [Delete Greatest Value in Each Row](https://leetcode.com/problems/delete-greatest-value-in-each-row/) | [C++](./solutions/delete-greatest-value-in-each-row/solution.hpp) | | | | | | -| 2496. | [Maximum Value of a String in an Array](https://leetcode.com/problems/maximum-value-of-a-string-in-an-array/) | [C++](./solutions/maximum-value-of-a-string-in-an-array/solution.hpp) | | | | | | -| 2492. | [Minimum Score of a Path Between Two Cities](https://leetcode.com/problems/minimum-score-of-a-path-between-two-cities/) | [C++](./solutions/minimum-score-of-a-path-between-two-cities/solution.hpp) | | | | | | -| 2490. | [Circular Sentence](https://leetcode.com/problems/circular-sentence/) | [C++](./solutions/circular-sentence/solution.hpp) | | | | | | -| 2485. | [Find the Pivot Integer](https://leetcode.com/problems/find-the-pivot-integer/) | [C++](./solutions/find-the-pivot-integer/solution.hpp) | | | | | | -| 2483. | [Minimum Penalty for a Shop](https://leetcode.com/problems/minimum-penalty-for-a-shop/) | [C++](./solutions/minimum-penalty-for-a-shop/solution.hpp) | | | | | | -| 2481. | [Minimum Cuts to Divide a Circle](https://leetcode.com/problems/minimum-cuts-to-divide-a-circle/) | [C++](./solutions/minimum-cuts-to-divide-a-circle/solution.hpp) | | | | | | -| 2475. | [Number of Unequal Triplets in Array](https://leetcode.com/problems/number-of-unequal-triplets-in-array/) | [C++](./solutions/number-of-unequal-triplets-in-array/solution.hpp) | | | | | | -| 2469. | [Convert the Temperature](https://leetcode.com/problems/convert-the-temperature/) | [C++](./solutions/convert-the-temperature/solution.hpp) | | | | | | -| 2466. | [Count Ways To Build Good Strings](https://leetcode.com/problems/count-ways-to-build-good-strings/) | [C++](./solutions/count-ways-to-build-good-strings/solution.hpp) | | | | | | -| 2465. | [Number of Distinct Averages](https://leetcode.com/problems/number-of-distinct-averages/) | [C++](./solutions/number-of-distinct-averages/solution.hpp) | | | | | | -| 2462. | [Total Cost to Hire K Workers](https://leetcode.com/problems/total-cost-to-hire-k-workers/) | [C++](./solutions/total-cost-to-hire-k-workers/solution.hpp) | | | | | | -| 2460. | [Apply Operations to an Array](https://leetcode.com/problems/apply-operations-to-an-array/) | [C++](./solutions/apply-operations-to-an-array/solution.hpp) | | | | | | -| 2455. | [Average Value of Even Numbers That Are Divisible by Three](https://leetcode.com/problems/average-value-of-even-numbers-that-are-divisible-by-three/) | [C++](./solutions/average-value-of-even-numbers-that-are-divisible-by-three/solution.hpp) | | | | | | -| 2451. | [Odd String Difference](https://leetcode.com/problems/odd-string-difference/) | [C++](./solutions/odd-string-difference/solution.hpp) | | | | | | -| 2448. | [Minimum Cost to Make Array Equal](https://leetcode.com/problems/minimum-cost-to-make-array-equal/) | [C++](./solutions/minimum-cost-to-make-array-equal/solution.hpp) | | | | | | -| 2446. | [Determine if Two Events Have Conflict](https://leetcode.com/problems/determine-if-two-events-have-conflict/) | [C++](./solutions/determine-if-two-events-have-conflict/solution.hpp) | | | | | | -| 2444. | [Count Subarrays With Fixed Bounds](https://leetcode.com/problems/count-subarrays-with-fixed-bounds/) | [C++](./solutions/count-subarrays-with-fixed-bounds/solution.hpp) | | | | | | -| 2441. | [Largest Positive Integer That Exists With Its Negative](https://leetcode.com/problems/largest-positive-integer-that-exists-with-its-negative/) | [C++](./solutions/largest-positive-integer-that-exists-with-its-negative/solution.hpp) | | | | | | -| 2439. | [Minimize Maximum of Array](https://leetcode.com/problems/minimize-maximum-of-array/) | [C++](./solutions/minimize-maximum-of-array/solution.hpp) | | | | | | -| 2437. | [Number of Valid Clock Times](https://leetcode.com/problems/number-of-valid-clock-times/) | [C++](./solutions/number-of-valid-clock-times/solution.hpp) | | | | | | -| 2432. | [The Employee That Worked on the Longest Task](https://leetcode.com/problems/the-employee-that-worked-on-the-longest-task/) | [C++](./solutions/the-employee-that-worked-on-the-longest-task/solution.hpp) | | | | | | -| 2427. | [Number of Common Factors](https://leetcode.com/problems/number-of-common-factors/) | [C++](./solutions/number-of-common-factors/solution.hpp) | | | | | | -| 2425. | [Bitwise XOR of All Pairings](https://leetcode.com/problems/bitwise-xor-of-all-pairings/) | [C++](./solutions/bitwise-xor-of-all-pairings/solution.hpp) | | | | | | -| 2423. | [Remove Letter To Equalize Frequency](https://leetcode.com/problems/remove-letter-to-equalize-frequency/) | [C++](./solutions/remove-letter-to-equalize-frequency/solution.hpp) | | | | | | -| 2418. | [Sort the People](https://leetcode.com/problems/sort-the-people/) | [C++](./solutions/sort-the-people/solution.hpp) | | | | | | -| 2413. | [Smallest Even Multiple](https://leetcode.com/problems/smallest-even-multiple/) | [C++](./solutions/smallest-even-multiple/solution.hpp) | | | | | | -| 2409. | [Count Days Spent Together](https://leetcode.com/problems/count-days-spent-together/) | [C++](./solutions/count-days-spent-together/solution.hpp) | | | | | | -| 2405. | [Optimal Partition of String](https://leetcode.com/problems/optimal-partition-of-string/) | [C++](./solutions/optimal-partition-of-string/solution.hpp) | | | | | | -| 2404. | [Most Frequent Even Element](https://leetcode.com/problems/most-frequent-even-element/) | [C++](./solutions/most-frequent-even-element/solution.hpp) | | | | | | -| 2399. | [Check Distances Between Same Letters](https://leetcode.com/problems/check-distances-between-same-letters/) | [C++](./solutions/check-distances-between-same-letters/solution.hpp) | | | | | | -| 2395. | [Find Subarrays With Equal Sum](https://leetcode.com/problems/find-subarrays-with-equal-sum/) | [C++](./solutions/find-subarrays-with-equal-sum/solution.hpp) | | | | | | -| 2390. | [Removing Stars From a String](https://leetcode.com/problems/removing-stars-from-a-string/) | [C++](./solutions/removing-stars-from-a-string/solution.hpp) | | | | | | -| 2389. | [Longest Subsequence With Limited Sum](https://leetcode.com/problems/longest-subsequence-with-limited-sum/) | [C++](./solutions/longest-subsequence-with-limited-sum/solution.hpp) | | | | | | -| 2383. | [Minimum Hours of Training to Win a Competition](https://leetcode.com/problems/minimum-hours-of-training-to-win-a-competition/) | [C++](./solutions/minimum-hours-of-training-to-win-a-competition/solution.hpp) | | | | | | -| 2379. | [Minimum Recolors to Get K Consecutive Black Blocks](https://leetcode.com/problems/minimum-recolors-to-get-k-consecutive-black-blocks/) | [C++](./solutions/minimum-recolors-to-get-k-consecutive-black-blocks/solution.hpp) | | | | | | -| 2373. | [Largest Local Values in a Matrix](https://leetcode.com/problems/largest-local-values-in-a-matrix/) | [C++](./solutions/largest-local-values-in-a-matrix/solution.hpp) | | | | | | -| 2370. | [Longest Ideal Subsequence](https://leetcode.com/problems/longest-ideal-subsequence/) | [C++](./solutions/longest-ideal-subsequence/solution.hpp) | | | | | | -| 2369. | [Check if There is a Valid Partition For The Array](https://leetcode.com/problems/check-if-there-is-a-valid-partition-for-the-array/) | [C++](./solutions/check-if-there-is-a-valid-partition-for-the-array/solution.hpp) | | | | | | -| 2367. | [Number of Arithmetic Triplets](https://leetcode.com/problems/number-of-arithmetic-triplets/) | [C++](./solutions/number-of-arithmetic-triplets/solution.hpp) | | | | | | -| 2366. | [Minimum Replacements to Sort the Array](https://leetcode.com/problems/minimum-replacements-to-sort-the-array/) | [C++](./solutions/minimum-replacements-to-sort-the-array/solution.hpp) | | | | | | -| 2363. | [Merge Similar Items](https://leetcode.com/problems/merge-similar-items/) | [C++](./solutions/merge-similar-items/solution.hpp) | | | | | | -| 2360. | [Longest Cycle in a Graph](https://leetcode.com/problems/longest-cycle-in-a-graph/) | [C++](./solutions/longest-cycle-in-a-graph/solution.hpp) | | | | | | -| 2357. | [Make Array Zero by Subtracting Equal Amounts](https://leetcode.com/problems/make-array-zero-by-subtracting-equal-amounts/) | [C++](./solutions/make-array-zero-by-subtracting-equal-amounts/solution.hpp) | | | | | | -| 2352. | [Equal Row and Column Pairs](https://leetcode.com/problems/equal-row-and-column-pairs/) | [C++](./solutions/equal-row-and-column-pairs/solution.hpp) | | | | | | -| 2351. | [First Letter to Appear Twice](https://leetcode.com/problems/first-letter-to-appear-twice/) | [C++](./solutions/first-letter-to-appear-twice/solution.hpp) | | | | | | -| 2350. | [Shortest Impossible Sequence of Rolls](https://leetcode.com/problems/shortest-impossible-sequence-of-rolls/) | [C++](./solutions/shortest-impossible-sequence-of-rolls/solution.hpp) | | | | | | -| 2348. | [Number of Zero-Filled Subarrays](https://leetcode.com/problems/number-of-zero-filled-subarrays/) | [C++](./solutions/number-of-zero-filled-subarrays/solution.hpp) | | | | | | -| 2347. | [Best Poker Hand](https://leetcode.com/problems/best-poker-hand/) | [C++](./solutions/best-poker-hand/solution.hpp) | | | | | | -| 2341. | [Maximum Number of Pairs in Array](https://leetcode.com/problems/maximum-number-of-pairs-in-array/) | [C++](./solutions/maximum-number-of-pairs-in-array/solution.hpp) | | | | | | -| 2336. | [Smallest Number in Infinite Set](https://leetcode.com/problems/smallest-number-in-infinite-set/) | [C++](./solutions/smallest-number-in-infinite-set/solution.hpp) | | | | | | -| 2335. | [Minimum Amount of Time to Fill Cups](https://leetcode.com/problems/minimum-amount-of-time-to-fill-cups/) | [C++](./solutions/minimum-amount-of-time-to-fill-cups/solution.hpp) | | | | | | -| 2331. | [Evaluate Boolean Binary Tree](https://leetcode.com/problems/evaluate-boolean-binary-tree/) | [C++](./solutions/evaluate-boolean-binary-tree/solution.hpp) | | | | | | -| 2328. | [Number of Increasing Paths in a Grid](https://leetcode.com/problems/number-of-increasing-paths-in-a-grid/) | [C++](./solutions/number-of-increasing-paths-in-a-grid/solution.hpp) | | | | | | -| 2325. | [Decode the Message](https://leetcode.com/problems/decode-the-message/) | [C++](./solutions/decode-the-message/solution.hpp) | | | | | | -| 2319. | [Check if Matrix Is X-Matrix](https://leetcode.com/problems/check-if-matrix-is-x-matrix/) | [C++](./solutions/check-if-matrix-is-x-matrix/solution.hpp) | | | | | | -| 2316. | [Count Unreachable Pairs of Nodes in an Undirected Graph](https://leetcode.com/problems/count-unreachable-pairs-of-nodes-in-an-undirected-graph/) | [C++](./solutions/count-unreachable-pairs-of-nodes-in-an-undirected-graph/solution.hpp) | | | | | | -| 2315. | [Count Asterisks](https://leetcode.com/problems/count-asterisks/) | [C++](./solutions/count-asterisks/solution.hpp) | | | | | | -| 2309. | [Greatest English Letter in Upper and Lower Case](https://leetcode.com/problems/greatest-english-letter-in-upper-and-lower-case/) | [C++](./solutions/greatest-english-letter-in-upper-and-lower-case/solution.hpp) | | | | | | -| 2305. | [Fair Distribution of Cookies](https://leetcode.com/problems/fair-distribution-of-cookies/) | [C++](./solutions/fair-distribution-of-cookies/solution.hpp) | | | | | | -| 2303. | [Calculate Amount Paid in Taxes](https://leetcode.com/problems/calculate-amount-paid-in-taxes/) | [C++](./solutions/calculate-amount-paid-in-taxes/solution.hpp) | | | | | | -| 2300. | [Successful Pairs of Spells and Potions](https://leetcode.com/problems/successful-pairs-of-spells-and-potions/) | [C++](./solutions/successful-pairs-of-spells-and-potions/solution.hpp) | | | | | | -| 2299. | [Strong Password Checker II](https://leetcode.com/problems/strong-password-checker-ii/) | [C++](./solutions/strong-password-checker-ii/solution.hpp) | | | | | | -| 2293. | [Min Max Game](https://leetcode.com/problems/min-max-game/) | [C++](./solutions/min-max-game/solution.hpp) | | | | | | -| 2287. | [Rearrange Characters to Make Target String](https://leetcode.com/problems/rearrange-characters-to-make-target-string/) | [C++](./solutions/rearrange-characters-to-make-target-string/solution.hpp) | | | | | | -| 2283. | [Check if Number Has Equal Digit Count and Digit Value](https://leetcode.com/problems/check-if-number-has-equal-digit-count-and-digit-value/) | [C++](./solutions/check-if-number-has-equal-digit-count-and-digit-value/solution.hpp) | | | | | | -| 2278. | [Percentage of Letter in String](https://leetcode.com/problems/percentage-of-letter-in-string/) | [C++](./solutions/percentage-of-letter-in-string/solution.hpp) | | | | | | -| 2273. | [Find Resultant Array After Removing Anagrams](https://leetcode.com/problems/find-resultant-array-after-removing-anagrams/) | [C++](./solutions/find-resultant-array-after-removing-anagrams/solution.hpp) | | | | | | -| 2272. | [Substring With Largest Variance](https://leetcode.com/problems/substring-with-largest-variance/) | [C++](./solutions/substring-with-largest-variance/solution.hpp) | | | | | | -| 2269. | [Find the K-Beauty of a Number](https://leetcode.com/problems/find-the-k-beauty-of-a-number/) | [C++](./solutions/find-the-k-beauty-of-a-number/solution.hpp) | | | | | | -| 2264. | [Largest 3-Same-Digit Number in String](https://leetcode.com/problems/largest-3-same-digit-number-in-string/) | [C++](./solutions/largest-3-same-digit-number-in-string/solution.hpp) | | | | | | -| 2259. | [Remove Digit From Number to Maximize Result](https://leetcode.com/problems/remove-digit-from-number-to-maximize-result/) | [C++](./solutions/remove-digit-from-number-to-maximize-result/solution.hpp) | | | | | | -| 2255. | [Count Prefixes of a Given String](https://leetcode.com/problems/count-prefixes-of-a-given-string/) | [C++](./solutions/count-prefixes-of-a-given-string/solution.hpp) | | | | | | -| 2251. | [Number of Flowers in Full Bloom](https://leetcode.com/problems/number-of-flowers-in-full-bloom/) | [C++](./solutions/number-of-flowers-in-full-bloom/solution.hpp) | | | | | | -| 2248. | [Intersection of Multiple Arrays](https://leetcode.com/problems/intersection-of-multiple-arrays/) | [C++](./solutions/intersection-of-multiple-arrays/solution.hpp) | | | | | | -| 2246. | [Longest Path With Different Adjacent Characters](https://leetcode.com/problems/longest-path-with-different-adjacent-characters/) | [C++](./solutions/longest-path-with-different-adjacent-characters/solution.hpp) | | | | | | -| 2243. | [Calculate Digit Sum of a String](https://leetcode.com/problems/calculate-digit-sum-of-a-string/) | [C++](./solutions/calculate-digit-sum-of-a-string/solution.hpp) | | | | | | -| 2239. | [Find Closest Number to Zero](https://leetcode.com/problems/find-closest-number-to-zero/) | [C++](./solutions/find-closest-number-to-zero/solution.hpp) | | | | | | -| 2236. | [Root Equals Sum of Children](https://leetcode.com/problems/root-equals-sum-of-children/) | [C++](./solutions/root-equals-sum-of-children/solution.hpp) | | | | | | -| 2235. | [Add Two Integers](https://leetcode.com/problems/add-two-integers/) | [C++](./solutions/add-two-integers/solution.hpp) | | | | | | -| 2231. | [Largest Number After Digit Swaps by Parity](https://leetcode.com/problems/largest-number-after-digit-swaps-by-parity/) | [C++](./solutions/largest-number-after-digit-swaps-by-parity/solution.hpp) | | | | | | -| 2224. | [Minimum Number of Operations to Convert Time](https://leetcode.com/problems/minimum-number-of-operations-to-convert-time/) | [C++](./solutions/minimum-number-of-operations-to-convert-time/solution.hpp) | | | | | | -| 2220. | [Minimum Bit Flips to Convert Number](https://leetcode.com/problems/minimum-bit-flips-to-convert-number/) | [C++](./solutions/minimum-bit-flips-to-convert-number/solution.hpp) | | | | | | -| 2218. | [Maximum Value of K Coins From Piles](https://leetcode.com/problems/maximum-value-of-k-coins-from-piles/) | [C++](./solutions/maximum-value-of-k-coins-from-piles/solution.hpp) | | | | | | -| 2215. | [Find the Difference of Two Arrays](https://leetcode.com/problems/find-the-difference-of-two-arrays/) | [C++](./solutions/find-the-difference-of-two-arrays/solution.hpp) | | | | | | -| 2210. | [Count Hills and Valleys in an Array](https://leetcode.com/problems/count-hills-and-valleys-in-an-array/) | [C++](./solutions/count-hills-and-valleys-in-an-array/solution.hpp) | | | | | | -| 2206. | [Divide Array Into Equal Pairs](https://leetcode.com/problems/divide-array-into-equal-pairs/) | [C++](./solutions/divide-array-into-equal-pairs/solution.hpp) | | | | | | -| 2200. | [Find All K-Distant Indices in an Array](https://leetcode.com/problems/find-all-k-distant-indices-in-an-array/) | [C++](./solutions/find-all-k-distant-indices-in-an-array/solution.hpp) | | | | | | -| 2196. | [Create Binary Tree From Descriptions](https://leetcode.com/problems/create-binary-tree-from-descriptions/) | [C++](./solutions/create-binary-tree-from-descriptions/solution.hpp) | | | | | | -| 2194. | [Cells in a Range on an Excel Sheet](https://leetcode.com/problems/cells-in-a-range-on-an-excel-sheet/) | [C++](./solutions/cells-in-a-range-on-an-excel-sheet/solution.hpp) | | | | | | -| 2190. | [Most Frequent Number Following Key In an Array](https://leetcode.com/problems/most-frequent-number-following-key-in-an-array/) | [C++](./solutions/most-frequent-number-following-key-in-an-array/solution.hpp) | | | | | | -| 2187. | [Minimum Time to Complete Trips](https://leetcode.com/problems/minimum-time-to-complete-trips/) | [C++](./solutions/minimum-time-to-complete-trips/solution.hpp) | | | | | | -| 2185. | [Counting Words With a Given Prefix](https://leetcode.com/problems/counting-words-with-a-given-prefix/) | [C++](./solutions/counting-words-with-a-given-prefix/solution.hpp) | | | | | | -| 2180. | [Count Integers With Even Digit Sum](https://leetcode.com/problems/count-integers-with-even-digit-sum/) | [C++](./solutions/count-integers-with-even-digit-sum/solution.hpp) | | | | | | -| 2176. | [Count Equal and Divisible Pairs in an Array](https://leetcode.com/problems/count-equal-and-divisible-pairs-in-an-array/) | [C++](./solutions/count-equal-and-divisible-pairs-in-an-array/solution.hpp) | | | | | | -| 2169. | [Count Operations to Obtain Zero](https://leetcode.com/problems/count-operations-to-obtain-zero/) | [C++](./solutions/count-operations-to-obtain-zero/solution.hpp) | | | | | | -| 2164. | [Sort Even and Odd Indices Independently](https://leetcode.com/problems/sort-even-and-odd-indices-independently/) | [C++](./solutions/sort-even-and-odd-indices-independently/solution.hpp) | | | | | | -| 2160. | [Minimum Sum of Four Digit Number After Splitting Digits](https://leetcode.com/problems/minimum-sum-of-four-digit-number-after-splitting-digits/) | [C++](./solutions/minimum-sum-of-four-digit-number-after-splitting-digits/solution.hpp) | | | | | | -| 2154. | [Keep Multiplying Found Values by Two](https://leetcode.com/problems/keep-multiplying-found-values-by-two/) | [C++](./solutions/keep-multiplying-found-values-by-two/solution.hpp) | | | | | | -| 2150. | [Find All Lonely Numbers in the Array](https://leetcode.com/problems/find-all-lonely-numbers-in-the-array/) | [C++](./solutions/find-all-lonely-numbers-in-the-array/solution.hpp) | | | | | | -| 2148. | [Count Elements With Strictly Smaller and Greater Elements ](https://leetcode.com/problems/count-elements-with-strictly-smaller-and-greater-elements/) | [C++](./solutions/count-elements-with-strictly-smaller-and-greater-elements/solution.hpp) | | | | | | -| 2144. | [Minimum Cost of Buying Candies With Discount](https://leetcode.com/problems/minimum-cost-of-buying-candies-with-discount/) | [C++](./solutions/minimum-cost-of-buying-candies-with-discount/solution.hpp) | | | | | | -| 2141. | [Maximum Running Time of N Computers](https://leetcode.com/problems/maximum-running-time-of-n-computers/) | [C++](./solutions/maximum-running-time-of-n-computers/solution.hpp) | | | | | | -| 2140. | [Solving Questions With Brainpower](https://leetcode.com/problems/solving-questions-with-brainpower/) | [C++](./solutions/solving-questions-with-brainpower/solution.hpp) | | | | | | -| 2138. | [Divide a String Into Groups of Size k](https://leetcode.com/problems/divide-a-string-into-groups-of-size-k/) | [C++](./solutions/divide-a-string-into-groups-of-size-k/solution.hpp) | | | | | | -| 2136. | [Earliest Possible Day of Full Bloom](https://leetcode.com/problems/earliest-possible-day-of-full-bloom/) | [C++](./solutions/earliest-possible-day-of-full-bloom/solution.hpp) | | | | | | -| 2133. | [Check if Every Row and Column Contains All Numbers](https://leetcode.com/problems/check-if-every-row-and-column-contains-all-numbers/) | [C++](./solutions/check-if-every-row-and-column-contains-all-numbers/solution.hpp) | | | | | | -| 2131. | [Longest Palindrome by Concatenating Two Letter Words](https://leetcode.com/problems/longest-palindrome-by-concatenating-two-letter-words/) | [C++](./solutions/longest-palindrome-by-concatenating-two-letter-words/solution.hpp) | | | | | | -| 2130. | [Maximum Twin Sum of a Linked List](https://leetcode.com/problems/maximum-twin-sum-of-a-linked-list/) | [C++](./solutions/maximum-twin-sum-of-a-linked-list/solution.hpp) | | | | | | -| 2129. | [Capitalize the Title](https://leetcode.com/problems/capitalize-the-title/) | [C++](./solutions/capitalize-the-title/solution.hpp) | | | | | | -| 2124. | [Check if All A's Appears Before All B's](https://leetcode.com/problems/check-if-all-as-appears-before-all-bs/) | [C++](./solutions/check-if-all-as-appears-before-all-bs/solution.hpp) | | | | | | -| 2119. | [A Number After a Double Reversal](https://leetcode.com/problems/a-number-after-a-double-reversal/) | [C++](./solutions/a-number-after-a-double-reversal/solution.hpp) | | | | | | -| 2114. | [Maximum Number of Words Found in Sentences](https://leetcode.com/problems/maximum-number-of-words-found-in-sentences/) | [C++](./solutions/maximum-number-of-words-found-in-sentences/solution.hpp) | | | | | | -| 2108. | [Find First Palindromic String in the Array](https://leetcode.com/problems/find-first-palindromic-string-in-the-array/) | [C++](./solutions/find-first-palindromic-string-in-the-array/solution.hpp) | | | | | | -| 2103. | [Rings and Rods](https://leetcode.com/problems/rings-and-rods/) | [C++](./solutions/rings-and-rods/solution.hpp) | | | | | | -| 2102. | [Sequentially Ordinal Rank Tracker](https://leetcode.com/problems/sequentially-ordinal-rank-tracker/) | [C++](./solutions/sequentially-ordinal-rank-tracker/solution.hpp) | | | | | | -| 2101. | [Detonate the Maximum Bombs](https://leetcode.com/problems/detonate-the-maximum-bombs/) | [C++](./solutions/detonate-the-maximum-bombs/solution.hpp) | | | | | | -| 2099. | [Find Subsequence of Length K With the Largest Sum](https://leetcode.com/problems/find-subsequence-of-length-k-with-the-largest-sum/) | [C++](./solutions/find-subsequence-of-length-k-with-the-largest-sum/solution.hpp) | | | | | | -| 2095. | [Delete the Middle Node of a Linked List](https://leetcode.com/problems/delete-the-middle-node-of-a-linked-list/) | [C++](./solutions/delete-the-middle-node-of-a-linked-list/solution.hpp) | | | | | | -| 2094. | [Finding 3-Digit Even Numbers](https://leetcode.com/problems/finding-3-digit-even-numbers/) | [C++](./solutions/finding-3-digit-even-numbers/solution.hpp) | | | | | | -| 2090. | [K Radius Subarray Averages](https://leetcode.com/problems/k-radius-subarray-averages/) | [C++](./solutions/k-radius-subarray-averages/solution.hpp) | | | | | | -| 2089. | [Find Target Indices After Sorting Array](https://leetcode.com/problems/find-target-indices-after-sorting-array/) | [C++](./solutions/find-target-indices-after-sorting-array/solution.hpp) | | | | | | -| 2085. | [Count Common Words With One Occurrence](https://leetcode.com/problems/count-common-words-with-one-occurrence/) | [C++](./solutions/count-common-words-with-one-occurrence/solution.hpp) | | | | | | -| 2078. | [Two Furthest Houses With Different Colors](https://leetcode.com/problems/two-furthest-houses-with-different-colors/) | [C++](./solutions/two-furthest-houses-with-different-colors/solution.hpp) | | | | | | -| 2073. | [Time Needed to Buy Tickets](https://leetcode.com/problems/time-needed-to-buy-tickets/) | [C++](./solutions/time-needed-to-buy-tickets/solution.hpp) | | | | | | -| 2068. | [Check Whether Two Strings are Almost Equivalent](https://leetcode.com/problems/check-whether-two-strings-are-almost-equivalent/) | [C++](./solutions/check-whether-two-strings-are-almost-equivalent/solution.hpp) | | | | | | -| 2062. | [Count Vowel Substrings of a String](https://leetcode.com/problems/count-vowel-substrings-of-a-string/) | [C++](./solutions/count-vowel-substrings-of-a-string/solution.hpp) | | | | | | -| 2058. | [Find the Minimum and Maximum Number of Nodes Between Critical Points](https://leetcode.com/problems/find-the-minimum-and-maximum-number-of-nodes-between-critical-points/) | [C++](./solutions/find-the-minimum-and-maximum-number-of-nodes-between-critical-points/solution.hpp) | | | | | | -| 2057. | [Smallest Index With Equal Value](https://leetcode.com/problems/smallest-index-with-equal-value/) | [C++](./solutions/smallest-index-with-equal-value/solution.hpp) | | | | | | -| 2053. | [Kth Distinct String in an Array](https://leetcode.com/problems/kth-distinct-string-in-an-array/) | [C++](./solutions/kth-distinct-string-in-an-array/solution.hpp) | | | | | | -| 2050. | [Parallel Courses III](https://leetcode.com/problems/parallel-courses-iii/) | [C++](./solutions/parallel-courses-iii/solution.hpp) | | | | | | -| 2047. | [Number of Valid Words in a Sentence](https://leetcode.com/problems/number-of-valid-words-in-a-sentence/) | [C++](./solutions/number-of-valid-words-in-a-sentence/solution.hpp) | | | | | | -| 2042. | [Check if Numbers Are Ascending in a Sentence](https://leetcode.com/problems/check-if-numbers-are-ascending-in-a-sentence/) | [C++](./solutions/check-if-numbers-are-ascending-in-a-sentence/solution.hpp) | | | | | | -| 2038. | [Remove Colored Pieces if Both Neighbors are the Same Color](https://leetcode.com/problems/remove-colored-pieces-if-both-neighbors-are-the-same-color/) | [C++](./solutions/remove-colored-pieces-if-both-neighbors-are-the-same-color/solution.hpp) | | | | | | -| 2037. | [Minimum Number of Moves to Seat Everyone](https://leetcode.com/problems/minimum-number-of-moves-to-seat-everyone/) | [C++](./solutions/minimum-number-of-moves-to-seat-everyone/solution.hpp) | | | | | | -| 2032. | [Two Out of Three](https://leetcode.com/problems/two-out-of-three/) | [C++](./solutions/two-out-of-three/solution.hpp) | | | | | | -| 2027. | [Minimum Moves to Convert String](https://leetcode.com/problems/minimum-moves-to-convert-string/) | [C++](./solutions/minimum-moves-to-convert-string/solution.hpp) | | | | | | -| 2024. | [Maximize the Confusion of an Exam](https://leetcode.com/problems/maximize-the-confusion-of-an-exam/) | [C++](./solutions/maximize-the-confusion-of-an-exam/solution.hpp) | | | | | | -| 2022. | [Convert 1D Array Into 2D Array](https://leetcode.com/problems/convert-1d-array-into-2d-array/) | [C++](./solutions/convert-1d-array-into-2d-array/solution.hpp) | | | | | | -| 2016. | [Maximum Difference Between Increasing Elements](https://leetcode.com/problems/maximum-difference-between-increasing-elements/) | [C++](./solutions/maximum-difference-between-increasing-elements/solution.hpp) | | | | | | -| 2011. | [Final Value of Variable After Performing Operations](https://leetcode.com/problems/final-value-of-variable-after-performing-operations/) | [C++](./solutions/final-value-of-variable-after-performing-operations/solution.hpp) | | | | | | -| 2009. | [Minimum Number of Operations to Make Array Continuous](https://leetcode.com/problems/minimum-number-of-operations-to-make-array-continuous/) | [C++](./solutions/minimum-number-of-operations-to-make-array-continuous/solution.hpp) | | | | | | -| 2006. | [Count Number of Pairs With Absolute Difference K](https://leetcode.com/problems/count-number-of-pairs-with-absolute-difference-k/) | [C++](./solutions/count-number-of-pairs-with-absolute-difference-k/solution.hpp) | | | | | | -| 2000. | [Reverse Prefix of Word](https://leetcode.com/problems/reverse-prefix-of-word/) | [C++](./solutions/reverse-prefix-of-word/solution.hpp) | | | | | | -| 1995. | [Count Special Quadruplets](https://leetcode.com/problems/count-special-quadruplets/) | [C++](./solutions/count-special-quadruplets/solution.hpp) | | | | | | -| 1991. | [Find the Middle Index in Array](https://leetcode.com/problems/find-the-middle-index-in-array/) | [C++](./solutions/find-the-middle-index-in-array/solution.hpp) | | | | | | -| 1984. | [Minimum Difference Between Highest and Lowest of K Scores](https://leetcode.com/problems/minimum-difference-between-highest-and-lowest-of-k-scores/) | [C++](./solutions/minimum-difference-between-highest-and-lowest-of-k-scores/solution.hpp) | | | | | | -| 1979. | [Find Greatest Common Divisor of Array](https://leetcode.com/problems/find-greatest-common-divisor-of-array/) | [C++](./solutions/find-greatest-common-divisor-of-array/solution.hpp) | | | | | | -| 1974. | [Minimum Time to Type Word Using Special Typewriter](https://leetcode.com/problems/minimum-time-to-type-word-using-special-typewriter/) | [C++](./solutions/minimum-time-to-type-word-using-special-typewriter/solution.hpp) | | | | | | -| 1971. | [Find if Path Exists in Graph](https://leetcode.com/problems/find-if-path-exists-in-graph/) | [C++](./solutions/find-if-path-exists-in-graph/solution.hpp) | | | | | | -| 1970. | [Last Day Where You Can Still Cross](https://leetcode.com/problems/last-day-where-you-can-still-cross/) | [C++](./solutions/last-day-where-you-can-still-cross/solution.hpp) | | | | | | -| 1967. | [Number of Strings That Appear as Substrings in Word](https://leetcode.com/problems/number-of-strings-that-appear-as-substrings-in-word/) | [C++](./solutions/number-of-strings-that-appear-as-substrings-in-word/solution.hpp) | | | | | | -| 1964. | [Find the Longest Valid Obstacle Course at Each Position](https://leetcode.com/problems/find-the-longest-valid-obstacle-course-at-each-position/) | [C++](./solutions/find-the-longest-valid-obstacle-course-at-each-position/solution.hpp) | | | | | | -| 1961. | [Check If String Is a Prefix of Array](https://leetcode.com/problems/check-if-string-is-a-prefix-of-array/) | [C++](./solutions/check-if-string-is-a-prefix-of-array/solution.hpp) | | | | | | -| 1957. | [Delete Characters to Make Fancy String](https://leetcode.com/problems/delete-characters-to-make-fancy-string/) | [C++](./solutions/delete-characters-to-make-fancy-string/solution.hpp) | | | | | | -| 1952. | [Three Divisors](https://leetcode.com/problems/three-divisors/) | [C++](./solutions/three-divisors/solution.hpp) | | | | | | -| 1945. | [Sum of Digits of String After Convert](https://leetcode.com/problems/sum-of-digits-of-string-after-convert/) | [C++](./solutions/sum-of-digits-of-string-after-convert/solution.hpp) | | | | | | -| 1944. | [Number of Visible People in a Queue](https://leetcode.com/problems/number-of-visible-people-in-a-queue/) | [C++](./solutions/number-of-visible-people-in-a-queue/solution.hpp) | | | | | | -| 1941. | [Check if All Characters Have Equal Number of Occurrences](https://leetcode.com/problems/check-if-all-characters-have-equal-number-of-occurrences/) | [C++](./solutions/check-if-all-characters-have-equal-number-of-occurrences/solution.hpp) | | | | | | -| 1935. | [Maximum Number of Words You Can Type](https://leetcode.com/problems/maximum-number-of-words-you-can-type/) | [C++](./solutions/maximum-number-of-words-you-can-type/solution.hpp) | | | | | | -| 1929. | [Concatenation of Array](https://leetcode.com/problems/concatenation-of-array/) | [C++](./solutions/concatenation-of-array/solution.hpp) | | | | | | -| 1926. | [Nearest Exit from Entrance in Maze](https://leetcode.com/problems/nearest-exit-from-entrance-in-maze/) | [C++](./solutions/nearest-exit-from-entrance-in-maze/solution.hpp) | | | | | | -| 1925. | [Count Square Sum Triples](https://leetcode.com/problems/count-square-sum-triples/) | [C++](./solutions/count-square-sum-triples/solution.hpp) | | | | | | -| 1920. | [Build Array from Permutation](https://leetcode.com/problems/build-array-from-permutation/) | [C++](./solutions/build-array-from-permutation/solution.hpp) | | | | | | -| 1913. | [Maximum Product Difference Between Two Pairs](https://leetcode.com/problems/maximum-product-difference-between-two-pairs/) | [C++](./solutions/maximum-product-difference-between-two-pairs/solution.hpp) | | | | | | -| 1909. | [Remove One Element to Make the Array Strictly Increasing](https://leetcode.com/problems/remove-one-element-to-make-the-array-strictly-increasing/) | [C++](./solutions/remove-one-element-to-make-the-array-strictly-increasing/solution.hpp) | | | | | | -| 1905. | [Count Sub Islands](https://leetcode.com/problems/count-sub-islands/) | [C++](./solutions/count-sub-islands/solution.hpp) | | | | | | -| 1903. | [Largest Odd Number in String](https://leetcode.com/problems/largest-odd-number-in-string/) | [C++](./solutions/largest-odd-number-in-string/solution.hpp) | | | | | | -| 1901. | [Find a Peak Element II](https://leetcode.com/problems/find-a-peak-element-ii/) | [C++](./solutions/find-a-peak-element-ii/solution.hpp) | | | | | | -| 1898. | [Maximum Number of Removable Characters](https://leetcode.com/problems/maximum-number-of-removable-characters/) | [C++](./solutions/maximum-number-of-removable-characters/solution.hpp) | | | | | | -| 1897. | [Redistribute Characters to Make All Strings Equal](https://leetcode.com/problems/redistribute-characters-to-make-all-strings-equal/) | [C++](./solutions/redistribute-characters-to-make-all-strings-equal/solution.hpp) | | | | | | -| 1894. | [Find the Student that Will Replace the Chalk](https://leetcode.com/problems/find-the-student-that-will-replace-the-chalk/) | [C++](./solutions/find-the-student-that-will-replace-the-chalk/solution.hpp) | | | | | | -| 1893. | [Check if All the Integers in a Range Are Covered](https://leetcode.com/problems/check-if-all-the-integers-in-a-range-are-covered/) | [C++](./solutions/check-if-all-the-integers-in-a-range-are-covered/solution.hpp) | | | | | | -| 1886. | [Determine Whether Matrix Can Be Obtained By Rotation](https://leetcode.com/problems/determine-whether-matrix-can-be-obtained-by-rotation/) | [C++](./solutions/determine-whether-matrix-can-be-obtained-by-rotation/solution.hpp) | | | | | | -| 1880. | [Check if Word Equals Summation of Two Words](https://leetcode.com/problems/check-if-word-equals-summation-of-two-words/) | [C++](./solutions/check-if-word-equals-summation-of-two-words/solution.hpp) | | | | | | -| 1876. | [Substrings of Size Three with Distinct Characters](https://leetcode.com/problems/substrings-of-size-three-with-distinct-characters/) | [C++](./solutions/substrings-of-size-three-with-distinct-characters/solution.hpp) | | | | | | -| 1870. | [Minimum Speed to Arrive on Time](https://leetcode.com/problems/minimum-speed-to-arrive-on-time/) | [C++](./solutions/minimum-speed-to-arrive-on-time/solution.hpp) | | | | | | -| 1869. | [Longer Contiguous Segments of Ones than Zeros](https://leetcode.com/problems/longer-contiguous-segments-of-ones-than-zeros/) | [C++](./solutions/longer-contiguous-segments-of-ones-than-zeros/solution.hpp) | | | | | | -| 1863. | [Sum of All Subset XOR Totals](https://leetcode.com/problems/sum-of-all-subset-xor-totals/) | [C++](./solutions/sum-of-all-subset-xor-totals/solution.hpp) | | | | | | -| 1859. | [Sorting the Sentence](https://leetcode.com/problems/sorting-the-sentence/) | [C++](./solutions/sorting-the-sentence/solution.hpp) | | | | | | -| 1857. | [Largest Color Value in a Directed Graph](https://leetcode.com/problems/largest-color-value-in-a-directed-graph/) | [C++](./solutions/largest-color-value-in-a-directed-graph/solution.hpp) | | | | | | -| 1855. | [Maximum Distance Between a Pair of Values](https://leetcode.com/problems/maximum-distance-between-a-pair-of-values/) | [C++](./solutions/maximum-distance-between-a-pair-of-values/solution.hpp) | | | | | | -| 1854. | [Maximum Population Year](https://leetcode.com/problems/maximum-population-year/) | [C++](./solutions/maximum-population-year/solution.hpp) | | | | | | -| 1848. | [Minimum Distance to the Target Element](https://leetcode.com/problems/minimum-distance-to-the-target-element/) | [C++](./solutions/minimum-distance-to-the-target-element/solution.hpp) | | | | | | -| 1845. | [Seat Reservation Manager](https://leetcode.com/problems/seat-reservation-manager/) | [C++](./solutions/seat-reservation-manager/solution.hpp) | | | | | | -| 1844. | [Replace All Digits with Characters](https://leetcode.com/problems/replace-all-digits-with-characters/) | [C++](./solutions/replace-all-digits-with-characters/solution.hpp) | | | | | | -| 1838. | [Frequency of the Most Frequent Element](https://leetcode.com/problems/frequency-of-the-most-frequent-element/) | [C++](./solutions/frequency-of-the-most-frequent-element/solution.hpp) | | | | | | -| 1837. | [Sum of Digits in Base K](https://leetcode.com/problems/sum-of-digits-in-base-k/) | [C++](./solutions/sum-of-digits-in-base-k/solution.hpp) | | | | | | -| 1832. | [Check if the Sentence Is Pangram](https://leetcode.com/problems/check-if-the-sentence-is-pangram/) | [C++](./solutions/check-if-the-sentence-is-pangram/solution.hpp) | | | | | | -| 1827. | [Minimum Operations to Make the Array Increasing](https://leetcode.com/problems/minimum-operations-to-make-the-array-increasing/) | [C++](./solutions/minimum-operations-to-make-the-array-increasing/solution.hpp) | | | | | | -| 1823. | [Find the Winner of the Circular Game](https://leetcode.com/problems/find-the-winner-of-the-circular-game/) | [C++](./solutions/find-the-winner-of-the-circular-game/solution.hpp) | | | | | | -| 1822. | [Sign of the Product of an Array](https://leetcode.com/problems/sign-of-the-product-of-an-array/) | [C++](./solutions/sign-of-the-product-of-an-array/solution.hpp) | | | | | | -| 1818. | [Minimum Absolute Sum Difference](https://leetcode.com/problems/minimum-absolute-sum-difference/) | [C++](./solutions/minimum-absolute-sum-difference/solution.hpp) | | | | | | -| 1816. | [Truncate Sentence](https://leetcode.com/problems/truncate-sentence/) | [C++](./solutions/truncate-sentence/solution.hpp) | | | | | | -| 1812. | [Determine Color of a Chessboard Square](https://leetcode.com/problems/determine-color-of-a-chessboard-square/) | [C++](./solutions/determine-color-of-a-chessboard-square/solution.hpp) | | | | | | -| 1805. | [Number of Different Integers in a String](https://leetcode.com/problems/number-of-different-integers-in-a-string/) | [C++](./solutions/number-of-different-integers-in-a-string/solution.hpp) | | | | | | -| 1802. | [Maximum Value at a Given Index in a Bounded Array](https://leetcode.com/problems/maximum-value-at-a-given-index-in-a-bounded-array/) | [C++](./solutions/maximum-value-at-a-given-index-in-a-bounded-array/solution.hpp) | | | | | | -| 1800. | [Maximum Ascending Subarray Sum](https://leetcode.com/problems/maximum-ascending-subarray-sum/) | [C++](./solutions/maximum-ascending-subarray-sum/solution.hpp) | | | | | | -| 1799. | [Maximize Score After N Operations](https://leetcode.com/problems/maximize-score-after-n-operations/) | [C++](./solutions/maximize-score-after-n-operations/solution.hpp) | | | | | | -| 1797. | [Design Authentication Manager](https://leetcode.com/problems/design-authentication-manager/) | [C++](./solutions/design-authentication-manager/solution.hpp) | | | | | | -| 1796. | [Second Largest Digit in a String](https://leetcode.com/problems/second-largest-digit-in-a-string/) | [C++](./solutions/second-largest-digit-in-a-string/solution.hpp) | | | | | | -| 1793. | [Maximum Score of a Good Subarray](https://leetcode.com/problems/maximum-score-of-a-good-subarray/) | [C++](./solutions/maximum-score-of-a-good-subarray/solution.hpp) | | | | | | -| 1791. | [Find Center of Star Graph](https://leetcode.com/problems/find-center-of-star-graph/) | [C++](./solutions/find-center-of-star-graph/solution.hpp) | | | | | | -| 1790. | [Check if One String Swap Can Make Strings Equal](https://leetcode.com/problems/check-if-one-string-swap-can-make-strings-equal/) | [C++](./solutions/check-if-one-string-swap-can-make-strings-equal/solution.hpp) | | | | | | -| 1784. | [Check if Binary String Has at Most One Segment of Ones](https://leetcode.com/problems/check-if-binary-string-has-at-most-one-segment-of-ones/) | [C++](./solutions/check-if-binary-string-has-at-most-one-segment-of-ones/solution.hpp) | | | | | | -| 1779. | [Find Nearest Point That Has the Same X or Y Coordinate](https://leetcode.com/problems/find-nearest-point-that-has-the-same-x-or-y-coordinate/) | [C++](./solutions/find-nearest-point-that-has-the-same-x-or-y-coordinate/solution.hpp) | | | | | | -| 1773. | [Count Items Matching a Rule](https://leetcode.com/problems/count-items-matching-a-rule/) | [C++](./solutions/count-items-matching-a-rule/solution.hpp) | | | | | | -| 1768. | [Merge Strings Alternately](https://leetcode.com/problems/merge-strings-alternately/) | [C++](./solutions/merge-strings-alternately/solution.hpp) | | | | | | -| 1763. | [Longest Nice Substring](https://leetcode.com/problems/longest-nice-substring/) | [C++](./solutions/longest-nice-substring/solution.hpp) | | | | | | -| 1760. | [Minimum Limit of Balls in a Bag](https://leetcode.com/problems/minimum-limit-of-balls-in-a-bag/) | [C++](./solutions/minimum-limit-of-balls-in-a-bag/solution.hpp) | | | | | | -| 1758. | [Minimum Changes To Make Alternating Binary String](https://leetcode.com/problems/minimum-changes-to-make-alternating-binary-string/) | [C++](./solutions/minimum-changes-to-make-alternating-binary-string/solution.hpp) | | | | | | -| 1752. | [Check if Array Is Sorted and Rotated](https://leetcode.com/problems/check-if-array-is-sorted-and-rotated/) | [C++](./solutions/check-if-array-is-sorted-and-rotated/solution.hpp) | | | | | | -| 1751. | [Maximum Number of Events That Can Be Attended II](https://leetcode.com/problems/maximum-number-of-events-that-can-be-attended-ii/) | [C++](./solutions/maximum-number-of-events-that-can-be-attended-ii/solution.hpp) | | | | | | -| 1748. | [Sum of Unique Elements](https://leetcode.com/problems/sum-of-unique-elements/) | [C++](./solutions/sum-of-unique-elements/solution.hpp) | | | | | | -| 1742. | [Maximum Number of Balls in a Box](https://leetcode.com/problems/maximum-number-of-balls-in-a-box/) | [C++](./solutions/maximum-number-of-balls-in-a-box/solution.hpp) | | | | | | -| 1736. | [Latest Time by Replacing Hidden Digits](https://leetcode.com/problems/latest-time-by-replacing-hidden-digits/) | [C++](./solutions/latest-time-by-replacing-hidden-digits/solution.hpp) | | | | | | -| 1732. | [Find the Highest Altitude](https://leetcode.com/problems/find-the-highest-altitude/) | [C++](./solutions/find-the-highest-altitude/solution.hpp) | | | | | | -| 1725. | [Number Of Rectangles That Can Form The Largest Square](https://leetcode.com/problems/number-of-rectangles-that-can-form-the-largest-square/) | [C++](./solutions/number-of-rectangles-that-can-form-the-largest-square/solution.hpp) | | | | | | -| 1721. | [Swapping Nodes in a Linked List](https://leetcode.com/problems/swapping-nodes-in-a-linked-list/) | [C++](./solutions/swapping-nodes-in-a-linked-list/solution.hpp) | | | | | | -| 1720. | [Decode XORed Array](https://leetcode.com/problems/decode-xored-array/) | [C++](./solutions/decode-xored-array/solution.hpp) | | | | | | -| 1716. | [Calculate Money in Leetcode Bank](https://leetcode.com/problems/calculate-money-in-leetcode-bank/) | [C++](./solutions/calculate-money-in-leetcode-bank/solution.hpp) | | | | | | -| 1712. | [Ways to Split Array Into Three Subarrays](https://leetcode.com/problems/ways-to-split-array-into-three-subarrays/) | [C++](./solutions/ways-to-split-array-into-three-subarrays/solution.hpp) | | | | | | -| 1710. | [Maximum Units on a Truck](https://leetcode.com/problems/maximum-units-on-a-truck/) | [C++](./solutions/maximum-units-on-a-truck/solution.hpp) | | | | | | -| 1706. | [Where Will the Ball Fall](https://leetcode.com/problems/where-will-the-ball-fall/) | [C++](./solutions/where-will-the-ball-fall/solution.hpp) | | | | | | -| 1704. | [Determine if String Halves Are Alike](https://leetcode.com/problems/determine-if-string-halves-are-alike/) | [C++](./solutions/determine-if-string-halves-are-alike/solution.hpp) | | | | | | -| 1700. | [Number of Students Unable to Eat Lunch](https://leetcode.com/problems/number-of-students-unable-to-eat-lunch/) | [C++](./solutions/number-of-students-unable-to-eat-lunch/solution.hpp) | | | | | | -| 1697. | [Checking Existence of Edge Length Limited Paths](https://leetcode.com/problems/checking-existence-of-edge-length-limited-paths/) | [C++](./solutions/checking-existence-of-edge-length-limited-paths/solution.hpp) | | | | | | -| 1694. | [Reformat Phone Number](https://leetcode.com/problems/reformat-phone-number/) | [C++](./solutions/reformat-phone-number/solution.hpp) | | | | | | -| 1688. | [Count of Matches in Tournament](https://leetcode.com/problems/count-of-matches-in-tournament/) | [C++](./solutions/count-of-matches-in-tournament/solution.hpp) | | | | | | -| 1684. | [Count the Number of Consistent Strings](https://leetcode.com/problems/count-the-number-of-consistent-strings/) | [C++](./solutions/count-the-number-of-consistent-strings/solution.hpp) | | | | | | -| 1679. | [Max Number of K-Sum Pairs](https://leetcode.com/problems/max-number-of-k-sum-pairs/) | [C++](./solutions/max-number-of-k-sum-pairs/solution.hpp) | | | | | | -| 1678. | [Goal Parser Interpretation](https://leetcode.com/problems/goal-parser-interpretation/) | [C++](./solutions/goal-parser-interpretation/solution.hpp) | | | | | | -| 1675. | [Minimize Deviation in Array](https://leetcode.com/problems/minimize-deviation-in-array/) | [C++](./solutions/minimize-deviation-in-array/solution.hpp) | | | | | | -| 1672. | [Richest Customer Wealth](https://leetcode.com/problems/richest-customer-wealth/) | [C++](./solutions/richest-customer-wealth/solution.hpp) | | | | | | -| 1668. | [Maximum Repeating Substring](https://leetcode.com/problems/maximum-repeating-substring/) | [C++](./solutions/maximum-repeating-substring/solution.hpp) | | | | | | -| 1662. | [Check If Two String Arrays are Equivalent](https://leetcode.com/problems/check-if-two-string-arrays-are-equivalent/) | [C++](./solutions/check-if-two-string-arrays-are-equivalent/solution.hpp) | | | | | | -| 1658. | [Minimum Operations to Reduce X to Zero](https://leetcode.com/problems/minimum-operations-to-reduce-x-to-zero/) | [C++](./solutions/minimum-operations-to-reduce-x-to-zero/solution.hpp) | | | | | | -| 1657. | [Determine if Two Strings Are Close](https://leetcode.com/problems/determine-if-two-strings-are-close/) | [C++](./solutions/determine-if-two-strings-are-close/solution.hpp) | | | | | | -| 1656. | [Design an Ordered Stream](https://leetcode.com/problems/design-an-ordered-stream/) | [C++](./solutions/design-an-ordered-stream/solution.hpp) | | | | | | -| 1654. | [Minimum Jumps to Reach Home](https://leetcode.com/problems/minimum-jumps-to-reach-home/) | [C++](./solutions/minimum-jumps-to-reach-home/solution.hpp) | | | | | | -| 1652. | [Defuse the Bomb](https://leetcode.com/problems/defuse-the-bomb/) | [C++](./solutions/defuse-the-bomb/solution.hpp) | | | | | | -| 1648. | [Sell Diminishing-Valued Colored Balls](https://leetcode.com/problems/sell-diminishing-valued-colored-balls/) | [C++](./solutions/sell-diminishing-valued-colored-balls/solution.hpp) | | | | | | -| 1647. | [Minimum Deletions to Make Character Frequencies Unique](https://leetcode.com/problems/minimum-deletions-to-make-character-frequencies-unique/) | [C++](./solutions/minimum-deletions-to-make-character-frequencies-unique/solution.hpp) | | | | | | -| 1646. | [Get Maximum in Generated Array](https://leetcode.com/problems/get-maximum-in-generated-array/) | [C++](./solutions/get-maximum-in-generated-array/solution.hpp) | | | | | | -| 1640. | [Check Array Formation Through Concatenation](https://leetcode.com/problems/check-array-formation-through-concatenation/) | [C++](./solutions/check-array-formation-through-concatenation/solution.hpp) | | | | | | -| 1639. | [Number of Ways to Form a Target String Given a Dictionary](https://leetcode.com/problems/number-of-ways-to-form-a-target-string-given-a-dictionary/) | [C++](./solutions/number-of-ways-to-form-a-target-string-given-a-dictionary/solution.hpp) | | | | | | -| 1636. | [Sort Array by Increasing Frequency](https://leetcode.com/problems/sort-array-by-increasing-frequency/) | [C++](./solutions/sort-array-by-increasing-frequency/solution.hpp) | | | | | | -| 1631. | [Path With Minimum Effort](https://leetcode.com/problems/path-with-minimum-effort/) | [C++](./solutions/path-with-minimum-effort/solution.hpp) | | | | | | -| 1630. | [Arithmetic Subarrays](https://leetcode.com/problems/arithmetic-subarrays/) | [C++](./solutions/arithmetic-subarrays/solution.hpp) | | | | | | -| 1629. | [Slowest Key](https://leetcode.com/problems/slowest-key/) | [C++](./solutions/slowest-key/solution.hpp) | | | | | | -| 1624. | [Largest Substring Between Two Equal Characters](https://leetcode.com/problems/largest-substring-between-two-equal-characters/) | [C++](./solutions/largest-substring-between-two-equal-characters/solution.hpp) | | | | | | -| 1619. | [Mean of Array After Removing Some Elements](https://leetcode.com/problems/mean-of-array-after-removing-some-elements/) | [C++](./solutions/mean-of-array-after-removing-some-elements/solution.hpp) | | | | | | -| 1617. | [Count Subtrees With Max Distance Between Cities](https://leetcode.com/problems/count-subtrees-with-max-distance-between-cities/) | [C++](./solutions/count-subtrees-with-max-distance-between-cities/solution.hpp) | | | | | | -| 1615. | [Maximal Network Rank](https://leetcode.com/problems/maximal-network-rank/) | [C++](./solutions/maximal-network-rank/solution.hpp) | | | | | | -| 1614. | [Maximum Nesting Depth of the Parentheses](https://leetcode.com/problems/maximum-nesting-depth-of-the-parentheses/) | [C++](./solutions/maximum-nesting-depth-of-the-parentheses/solution.hpp) | | | | | | -| 1611. | [Minimum One Bit Operations to Make Integers Zero](https://leetcode.com/problems/minimum-one-bit-operations-to-make-integers-zero/) | [C++](./solutions/minimum-one-bit-operations-to-make-integers-zero/solution.hpp) | | | | | | -| 1608. | [Special Array With X Elements Greater Than or Equal X](https://leetcode.com/problems/special-array-with-x-elements-greater-than-or-equal-x/) | [C++](./solutions/special-array-with-x-elements-greater-than-or-equal-x/solution.hpp) | | | | | | -| 1603. | [Design Parking System](https://leetcode.com/problems/design-parking-system/) | [C++](./solutions/design-parking-system/solution.hpp) | | | | | | -| 1601. | [Maximum Number of Achievable Transfer Requests](https://leetcode.com/problems/maximum-number-of-achievable-transfer-requests/) | [C++](./solutions/maximum-number-of-achievable-transfer-requests/solution.hpp) | | | | | | -| 1598. | [Crawler Log Folder](https://leetcode.com/problems/crawler-log-folder/) | [C++](./solutions/crawler-log-folder/solution.hpp) | | | | | | -| 1592. | [Rearrange Spaces Between Words](https://leetcode.com/problems/rearrange-spaces-between-words/) | [C++](./solutions/rearrange-spaces-between-words/solution.hpp) | | | | | | -| 1588. | [Sum of All Odd Length Subarrays](https://leetcode.com/problems/sum-of-all-odd-length-subarrays/) | [C++](./solutions/sum-of-all-odd-length-subarrays/solution.hpp) | | | | | | -| 1584. | [Min Cost to Connect All Points](https://leetcode.com/problems/min-cost-to-connect-all-points/) | [C++](./solutions/min-cost-to-connect-all-points/solution.hpp) | | | | | | -| 1582. | [Special Positions in a Binary Matrix](https://leetcode.com/problems/special-positions-in-a-binary-matrix/) | [C++](./solutions/special-positions-in-a-binary-matrix/solution.hpp) | | | | | | -| 1579. | [Remove Max Number of Edges to Keep Graph Fully Traversable](https://leetcode.com/problems/remove-max-number-of-edges-to-keep-graph-fully-traversable/) | [C++](./solutions/remove-max-number-of-edges-to-keep-graph-fully-traversable/solution.hpp) | | | | | | -| 1576. | [Replace All ?'s to Avoid Consecutive Repeating Characters](https://leetcode.com/problems/replace-all-s-to-avoid-consecutive-repeating-characters/) | [C++](./solutions/replace-all-s-to-avoid-consecutive-repeating-characters/solution.hpp) | | | | | | -| 1575. | [Count All Possible Routes](https://leetcode.com/problems/count-all-possible-routes/) | [C++](./solutions/count-all-possible-routes/solution.hpp) | | | | | | -| 1574. | [Shortest Subarray to be Removed to Make Array Sorted](https://leetcode.com/problems/shortest-subarray-to-be-removed-to-make-array-sorted/) | [C++](./solutions/shortest-subarray-to-be-removed-to-make-array-sorted/solution.hpp) | | | | | | -| 1572. | [Matrix Diagonal Sum](https://leetcode.com/problems/matrix-diagonal-sum/) | [C++](./solutions/matrix-diagonal-sum/solution.hpp) | | | | | | -| 1569. | [Number of Ways to Reorder Array to Get Same BST](https://leetcode.com/problems/number-of-ways-to-reorder-array-to-get-same-bst/) | [C++](./solutions/number-of-ways-to-reorder-array-to-get-same-bst/solution.hpp) | | | | | | -| 1567. | [Maximum Length of Subarray With Positive Product](https://leetcode.com/problems/maximum-length-of-subarray-with-positive-product/) | [C++](./solutions/maximum-length-of-subarray-with-positive-product/solution.hpp) | | | | | | -| 1566. | [Detect Pattern of Length M Repeated K or More Times](https://leetcode.com/problems/detect-pattern-of-length-m-repeated-k-or-more-times/) | [C++](./solutions/detect-pattern-of-length-m-repeated-k-or-more-times/solution.hpp) | | | | | | -| 1562. | [Find Latest Group of Size M](https://leetcode.com/problems/find-latest-group-of-size-m/) | [C++](./solutions/find-latest-group-of-size-m/solution.hpp) | | | | | | -| 1560. | [Most Visited Sector in a Circular Track](https://leetcode.com/problems/most-visited-sector-in-a-circular-track/) | [C++](./solutions/most-visited-sector-in-a-circular-track/solution.hpp) | | | | | | -| 1557. | [Minimum Number of Vertices to Reach All Nodes](https://leetcode.com/problems/minimum-number-of-vertices-to-reach-all-nodes/) | [C++](./solutions/minimum-number-of-vertices-to-reach-all-nodes/solution.hpp) | | | | | | -| 1556. | [Thousand Separator](https://leetcode.com/problems/thousand-separator/) | [C++](./solutions/thousand-separator/solution.hpp) | | | | | | -| 1552. | [Magnetic Force Between Two Balls](https://leetcode.com/problems/magnetic-force-between-two-balls/) | [C++](./solutions/magnetic-force-between-two-balls/solution.hpp) | | | | | | -| 1550. | [Three Consecutive Odds](https://leetcode.com/problems/three-consecutive-odds/) | [C++](./solutions/three-consecutive-odds/solution.hpp) | | | | | | -| 1547. | [Minimum Cost to Cut a Stick](https://leetcode.com/problems/minimum-cost-to-cut-a-stick/) | [C++](./solutions/minimum-cost-to-cut-a-stick/solution.hpp) | | | | | | -| 1544. | [Make The String Great](https://leetcode.com/problems/make-the-string-great/) | [C++](./solutions/make-the-string-great/solution.hpp) | | | | | | -| 1539. | [Kth Missing Positive Number](https://leetcode.com/problems/kth-missing-positive-number/) | [C++](./solutions/kth-missing-positive-number/solution.hpp) | | | | | | -| 1534. | [Count Good Triplets](https://leetcode.com/problems/count-good-triplets/) | [C++](./solutions/count-good-triplets/solution.hpp) | | | | | | -| 1528. | [Shuffle String](https://leetcode.com/problems/shuffle-string/) | [C++](./solutions/shuffle-string/solution.hpp) | | | | | | -| 1526. | [Minimum Number of Increments on Subarrays to Form a Target Array](https://leetcode.com/problems/minimum-number-of-increments-on-subarrays-to-form-a-target-array/) | [C++](./solutions/minimum-number-of-increments-on-subarrays-to-form-a-target-array/solution.hpp) | | | | | | -| 1523. | [Count Odd Numbers in an Interval Range](https://leetcode.com/problems/count-odd-numbers-in-an-interval-range/) | [C++](./solutions/count-odd-numbers-in-an-interval-range/solution.hpp) | | | | | | -| 1518. | [Water Bottles](https://leetcode.com/problems/water-bottles/) | [C++](./solutions/water-bottles/solution.hpp) | | | | | | -| 1514. | [Path with Maximum Probability](https://leetcode.com/problems/path-with-maximum-probability/) | [C++](./solutions/path-with-maximum-probability/solution.hpp) | | | | | | -| 1512. | [Number of Good Pairs](https://leetcode.com/problems/number-of-good-pairs/) | [C++](./solutions/number-of-good-pairs/solution.hpp) | | | | | | -| 1508. | [Range Sum of Sorted Subarray Sums](https://leetcode.com/problems/range-sum-of-sorted-subarray-sums/) | [C++](./solutions/range-sum-of-sorted-subarray-sums/solution.hpp) | | | | | | -| 1507. | [Reformat Date](https://leetcode.com/problems/reformat-date/) | [C++](./solutions/reformat-date/solution.hpp) | | | | | | -| 1502. | [Can Make Arithmetic Progression From Sequence](https://leetcode.com/problems/can-make-arithmetic-progression-from-sequence/) | [C++](./solutions/can-make-arithmetic-progression-from-sequence/solution.hpp) | | | | | | -| 1498. | [Number of Subsequences That Satisfy the Given Sum Condition](https://leetcode.com/problems/number-of-subsequences-that-satisfy-the-given-sum-condition/) | [C++](./solutions/number-of-subsequences-that-satisfy-the-given-sum-condition/solution.hpp) | | | | | | -| 1496. | [Path Crossing](https://leetcode.com/problems/path-crossing/) | [C++](./solutions/path-crossing/solution.hpp) | | | | | | -| 1494. | [Parallel Courses II](https://leetcode.com/problems/parallel-courses-ii/) | [C++](./solutions/parallel-courses-ii/solution.hpp) | | | | | | -| 1493. | [Longest Subarray of 1's After Deleting One Element](https://leetcode.com/problems/longest-subarray-of-1s-after-deleting-one-element/) | [C++](./solutions/longest-subarray-of-1s-after-deleting-one-element/solution.hpp) | | | | | | -| 1491. | [Average Salary Excluding the Minimum and Maximum Salary](https://leetcode.com/problems/average-salary-excluding-the-minimum-and-maximum-salary/) | [C++](./solutions/average-salary-excluding-the-minimum-and-maximum-salary/solution.hpp) | | | | | | -| 1489. | [Find Critical and Pseudo-Critical Edges in Minimum Spanning Tree](https://leetcode.com/problems/find-critical-and-pseudo-critical-edges-in-minimum-spanning-tree/) | [C++](./solutions/find-critical-and-pseudo-critical-edges-in-minimum-spanning-tree/solution.hpp) | | | | | | -| 1488. | [Avoid Flood in The City](https://leetcode.com/problems/avoid-flood-in-the-city/) | [C++](./solutions/avoid-flood-in-the-city/solution.hpp) | | | | | | -| 1486. | [XOR Operation in an Array](https://leetcode.com/problems/xor-operation-in-an-array/) | [C++](./solutions/xor-operation-in-an-array/solution.hpp) | | | | | | -| 1482. | [Minimum Number of Days to Make m Bouquets](https://leetcode.com/problems/minimum-number-of-days-to-make-m-bouquets/) | [C++](./solutions/minimum-number-of-days-to-make-m-bouquets/solution.hpp) | | | | | | -| 1480. | [Running Sum of 1d Array](https://leetcode.com/problems/running-sum-of-1d-array/) | [C++](./solutions/running-sum-of-1d-array/solution.hpp) | | | | | | -| 1475. | [Final Prices With a Special Discount in a Shop](https://leetcode.com/problems/final-prices-with-a-special-discount-in-a-shop/) | [C++](./solutions/final-prices-with-a-special-discount-in-a-shop/solution.hpp) | | | | | | -| 1472. | [Design Browser History](https://leetcode.com/problems/design-browser-history/) | [C++](./solutions/design-browser-history/solution.hpp) | | | | | | -| 1470. | [Shuffle the Array](https://leetcode.com/problems/shuffle-the-array/) | [C++](./solutions/shuffle-the-array/solution.hpp) | | | | | | -| 1466. | [Reorder Routes to Make All Paths Lead to the City Zero](https://leetcode.com/problems/reorder-routes-to-make-all-paths-lead-to-the-city-zero/) | [C++](./solutions/reorder-routes-to-make-all-paths-lead-to-the-city-zero/solution.hpp) | | | | | | -| 1464. | [Maximum Product of Two Elements in an Array](https://leetcode.com/problems/maximum-product-of-two-elements-in-an-array/) | [C++](./solutions/maximum-product-of-two-elements-in-an-array/solution.hpp) | | | | | | -| 1463. | [Cherry Pickup II](https://leetcode.com/problems/cherry-pickup-ii/) | [C++](./solutions/cherry-pickup-ii/solution.hpp) | | | | | | -| 1460. | [Make Two Arrays Equal by Reversing Subarrays](https://leetcode.com/problems/make-two-arrays-equal-by-reversing-subarrays/) | [C++](./solutions/make-two-arrays-equal-by-reversing-subarrays/solution.hpp) | | | | | | -| 1458. | [Max Dot Product of Two Subsequences](https://leetcode.com/problems/max-dot-product-of-two-subsequences/) | [C++](./solutions/max-dot-product-of-two-subsequences/solution.hpp) | | | | | | -| 1456. | [Maximum Number of Vowels in a Substring of Given Length](https://leetcode.com/problems/maximum-number-of-vowels-in-a-substring-of-given-length/) | [C++](./solutions/maximum-number-of-vowels-in-a-substring-of-given-length/solution.hpp) | | | | | | -| 1455. | [Check If a Word Occurs As a Prefix of Any Word in a Sentence](https://leetcode.com/problems/check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence/) | [C++](./solutions/check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence/solution.hpp) | | | | | | -| 1450. | [Number of Students Doing Homework at a Given Time](https://leetcode.com/problems/number-of-students-doing-homework-at-a-given-time/) | [C++](./solutions/number-of-students-doing-homework-at-a-given-time/solution.hpp) | | | | | | -| 1448. | [Count Good Nodes in Binary Tree](https://leetcode.com/problems/count-good-nodes-in-binary-tree/) | [C++](./solutions/count-good-nodes-in-binary-tree/solution.hpp) | | | | | | -| 1446. | [Consecutive Characters](https://leetcode.com/problems/consecutive-characters/) | [C++](./solutions/consecutive-characters/solution.hpp) | | | | | | -| 1444. | [Number of Ways of Cutting a Pizza](https://leetcode.com/problems/number-of-ways-of-cutting-a-pizza/) | [C++](./solutions/number-of-ways-of-cutting-a-pizza/solution.hpp) | | | | | | -| 1437. | [Check If All 1's Are at Least Length K Places Away](https://leetcode.com/problems/check-if-all-1s-are-at-least-length-k-places-away/) | [C++](./solutions/check-if-all-1s-are-at-least-length-k-places-away/solution.hpp) | | | | | | -| 1436. | [Destination City](https://leetcode.com/problems/destination-city/) | [C++](./solutions/destination-city/solution.hpp) | | | | | | -| 1431. | [Kids With the Greatest Number of Candies](https://leetcode.com/problems/kids-with-the-greatest-number-of-candies/) | [C++](./solutions/kids-with-the-greatest-number-of-candies/solution.hpp) | | | | | | -| 1425. | [Constrained Subsequence Sum](https://leetcode.com/problems/constrained-subsequence-sum/) | [C++](./solutions/constrained-subsequence-sum/solution.hpp) | | | | | | -| 1422. | [Maximum Score After Splitting a String](https://leetcode.com/problems/maximum-score-after-splitting-a-string/) | [C++](./solutions/maximum-score-after-splitting-a-string/solution.hpp) | | | | | | -| 1420. | [Build Array Where You Can Find The Maximum Exactly K Comparisons](https://leetcode.com/problems/build-array-where-you-can-find-the-maximum-exactly-k-comparisons/) | [C++](./solutions/build-array-where-you-can-find-the-maximum-exactly-k-comparisons/solution.hpp) | | | | | | -| 1417. | [Reformat The String](https://leetcode.com/problems/reformat-the-string/) | [C++](./solutions/reformat-the-string/solution.hpp) | | | | | | -| 1416. | [Restore The Array](https://leetcode.com/problems/restore-the-array/) | [C++](./solutions/restore-the-array/solution.hpp) | | | | | | -| 1413. | [Minimum Value to Get Positive Step by Step Sum](https://leetcode.com/problems/minimum-value-to-get-positive-step-by-step-sum/) | [C++](./solutions/minimum-value-to-get-positive-step-by-step-sum/solution.hpp) | | | | | | -| 1408. | [String Matching in an Array](https://leetcode.com/problems/string-matching-in-an-array/) | [C++](./solutions/string-matching-in-an-array/solution.hpp) | | | | | | -| 1406. | [Stone Game III](https://leetcode.com/problems/stone-game-iii/) | [C++](./solutions/stone-game-iii/solution.hpp) | | | | | | -| 1403. | [Minimum Subsequence in Non-Increasing Order](https://leetcode.com/problems/minimum-subsequence-in-non-increasing-order/) | [C++](./solutions/minimum-subsequence-in-non-increasing-order/solution.hpp) | | | | | | -| 1402. | [Reducing Dishes](https://leetcode.com/problems/reducing-dishes/) | [C++](./solutions/reducing-dishes/solution.hpp) | | | | | | -| 1399. | [Count Largest Group](https://leetcode.com/problems/count-largest-group/) | [C++](./solutions/count-largest-group/solution.hpp) | | | | | | -| 1396. | [Design Underground System](https://leetcode.com/problems/design-underground-system/) | [C++](./solutions/design-underground-system/solution.hpp) | | | | | | -| 1394. | [Find Lucky Integer in an Array](https://leetcode.com/problems/find-lucky-integer-in-an-array/) | [C++](./solutions/find-lucky-integer-in-an-array/solution.hpp) | | | | | | -| 1389. | [Create Target Array in the Given Order](https://leetcode.com/problems/create-target-array-in-the-given-order/) | [C++](./solutions/create-target-array-in-the-given-order/solution.hpp) | | | | | | -| 1385. | [Find the Distance Value Between Two Arrays](https://leetcode.com/problems/find-the-distance-value-between-two-arrays/) | [C++](./solutions/find-the-distance-value-between-two-arrays/solution.hpp) | | | | | | -| 1383. | [Maximum Performance of a Team](https://leetcode.com/problems/maximum-performance-of-a-team/) | [C++](./solutions/maximum-performance-of-a-team/solution.hpp) | | | | | | -| 1380. | [Lucky Numbers in a Matrix](https://leetcode.com/problems/lucky-numbers-in-a-matrix/) | [C++](./solutions/lucky-numbers-in-a-matrix/solution.hpp) | | | | | | -| 1379. | [Find a Corresponding Node of a Binary Tree in a Clone of That Tree](https://leetcode.com/problems/find-a-corresponding-node-of-a-binary-tree-in-a-clone-of-that-tree/) | [C++](./solutions/find-a-corresponding-node-of-a-binary-tree-in-a-clone-of-that-tree/solution.hpp) | | | | | | -| 1376. | [Time Needed to Inform All Employees](https://leetcode.com/problems/time-needed-to-inform-all-employees/) | [C++](./solutions/time-needed-to-inform-all-employees/solution.hpp) | | | | | | -| 1374. | [Generate a String With Characters That Have Odd Counts](https://leetcode.com/problems/generate-a-string-with-characters-that-have-odd-counts/) | [C++](./solutions/generate-a-string-with-characters-that-have-odd-counts/solution.hpp) | | | | | | -| 1372. | [Longest ZigZag Path in a Binary Tree](https://leetcode.com/problems/longest-zigzag-path-in-a-binary-tree/) | [C++](./solutions/longest-zigzag-path-in-a-binary-tree/solution.hpp) | | | | | | -| 1370. | [Increasing Decreasing String](https://leetcode.com/problems/increasing-decreasing-string/) | [C++](./solutions/increasing-decreasing-string/solution.hpp) | | | | | | -| 1367. | [Linked List in Binary Tree](https://leetcode.com/problems/linked-list-in-binary-tree/) | [C++](./solutions/linked-list-in-binary-tree/solution.hpp) | | | | | | -| 1365. | [How Many Numbers Are Smaller Than the Current Number](https://leetcode.com/problems/how-many-numbers-are-smaller-than-the-current-number/) | [C++](./solutions/how-many-numbers-are-smaller-than-the-current-number/solution.hpp) | | | | | | -| 1361. | [Validate Binary Tree Nodes](https://leetcode.com/problems/validate-binary-tree-nodes/) | [C++](./solutions/validate-binary-tree-nodes/solution.hpp) | | | | | | -| 1360. | [Number of Days Between Two Dates](https://leetcode.com/problems/number-of-days-between-two-dates/) | [C++](./solutions/number-of-days-between-two-dates/solution.hpp) | | | | | | -| 1359. | [Count All Valid Pickup and Delivery Options](https://leetcode.com/problems/count-all-valid-pickup-and-delivery-options/) | [C++](./solutions/count-all-valid-pickup-and-delivery-options/solution.hpp) | | | | | | -| 1356. | [Sort Integers by The Number of 1 Bits](https://leetcode.com/problems/sort-integers-by-the-number-of-1-bits/) | [C++](./solutions/sort-integers-by-the-number-of-1-bits/solution.hpp) | | | | | | -| 1352. | [Product of the Last K Numbers](https://leetcode.com/problems/product-of-the-last-k-numbers/) | [C++](./solutions/product-of-the-last-k-numbers/solution.hpp) | | | | | | -| 1351. | [Count Negative Numbers in a Sorted Matrix](https://leetcode.com/problems/count-negative-numbers-in-a-sorted-matrix/) | [C++](./solutions/count-negative-numbers-in-a-sorted-matrix/solution.hpp) | | | | | | -| 1346. | [Check If N and Its Double Exist](https://leetcode.com/problems/check-if-n-and-its-double-exist/) | [C++](./solutions/check-if-n-and-its-double-exist/solution.hpp) | | | | | | -| 1345. | [Jump Game IV](https://leetcode.com/problems/jump-game-iv/) | [C++](./solutions/jump-game-iv/solution.hpp) | | | | | | -| 1342. | [Number of Steps to Reduce a Number to Zero](https://leetcode.com/problems/number-of-steps-to-reduce-a-number-to-zero/) | [C++](./solutions/number-of-steps-to-reduce-a-number-to-zero/solution.hpp) | | | | | | -| 1337. | [The K Weakest Rows in a Matrix](https://leetcode.com/problems/the-k-weakest-rows-in-a-matrix/) | [C++](./solutions/the-k-weakest-rows-in-a-matrix/solution.hpp) | | | | | | -| 1332. | [Remove Palindromic Subsequences](https://leetcode.com/problems/remove-palindromic-subsequences/) | [C++](./solutions/remove-palindromic-subsequences/solution.hpp) | | | | | | -| 1331. | [Rank Transform of an Array](https://leetcode.com/problems/rank-transform-of-an-array/) | [C++](./solutions/rank-transform-of-an-array/solution.hpp) | | | | | | -| 1326. | [Minimum Number of Taps to Open to Water a Garden](https://leetcode.com/problems/minimum-number-of-taps-to-open-to-water-a-garden/) | [C++](./solutions/minimum-number-of-taps-to-open-to-water-a-garden/solution.hpp) | | | | | | -| 1323. | [Maximum 69 Number](https://leetcode.com/problems/maximum-69-number/) | [C++](./solutions/maximum-69-number/solution.hpp) | | | | | | -| 1319. | [Number of Operations to Make Network Connected](https://leetcode.com/problems/number-of-operations-to-make-network-connected/) | [C++](./solutions/number-of-operations-to-make-network-connected/solution.hpp) | | | | | | -| 1318. | [Minimum Flips to Make a OR b Equal to c](https://leetcode.com/problems/minimum-flips-to-make-a-or-b-equal-to-c/) | [C++](./solutions/minimum-flips-to-make-a-or-b-equal-to-c/solution.hpp) | | | | | | -| 1317. | [Convert Integer to the Sum of Two No-Zero Integers](https://leetcode.com/problems/convert-integer-to-the-sum-of-two-no-zero-integers/) | [C++](./solutions/convert-integer-to-the-sum-of-two-no-zero-integers/solution.hpp) | | | | | | -| 1314. | [Matrix Block Sum](https://leetcode.com/problems/matrix-block-sum/) | [C++](./solutions/matrix-block-sum/solution.hpp) | | | | | | -| 1313. | [Decompress Run-Length Encoded List](https://leetcode.com/problems/decompress-run-length-encoded-list/) | [C++](./solutions/decompress-run-length-encoded-list/solution.hpp) | | | | | | -| 1312. | [Minimum Insertion Steps to Make a String Palindrome](https://leetcode.com/problems/minimum-insertion-steps-to-make-a-string-palindrome/) | [C++](./solutions/minimum-insertion-steps-to-make-a-string-palindrome/solution.hpp) | | | | | | -| 1309. | [Decrypt String from Alphabet to Integer Mapping](https://leetcode.com/problems/decrypt-string-from-alphabet-to-integer-mapping/) | [C++](./solutions/decrypt-string-from-alphabet-to-integer-mapping/solution.hpp) | | | | | | -| 1306. | [Jump Game III](https://leetcode.com/problems/jump-game-iii/) | [C++](./solutions/jump-game-iii/solution.hpp) | | | | | | -| 1304. | [Find N Unique Integers Sum up to Zero](https://leetcode.com/problems/find-n-unique-integers-sum-up-to-zero/) | [C++](./solutions/find-n-unique-integers-sum-up-to-zero/solution.hpp) | | | | | | -| 1300. | [Sum of Mutated Array Closest to Target](https://leetcode.com/problems/sum-of-mutated-array-closest-to-target/) | [C++](./solutions/sum-of-mutated-array-closest-to-target/solution.hpp) | | | | | | -| 1299. | [Replace Elements with Greatest Element on Right Side](https://leetcode.com/problems/replace-elements-with-greatest-element-on-right-side/) | [C++](./solutions/replace-elements-with-greatest-element-on-right-side/solution.hpp) | | | | | | -| 1295. | [Find Numbers with Even Number of Digits](https://leetcode.com/problems/find-numbers-with-even-number-of-digits/) | [C++](./solutions/find-numbers-with-even-number-of-digits/solution.hpp) | | | | | | -| 1292. | [Maximum Side Length of a Square with Sum Less than or Equal to Threshold](https://leetcode.com/problems/maximum-side-length-of-a-square-with-sum-less-than-or-equal-to-threshold/) | [C++](./solutions/maximum-side-length-of-a-square-with-sum-less-than-or-equal-to-threshold/solution.hpp) | | | | | | -| 1290. | [Convert Binary Number in a Linked List to Integer](https://leetcode.com/problems/convert-binary-number-in-a-linked-list-to-integer/) | [C++](./solutions/convert-binary-number-in-a-linked-list-to-integer/solution.hpp) | | | | | | -| 1287. | [Element Appearing More Than 25% In Sorted Array](https://leetcode.com/problems/element-appearing-more-than-25-in-sorted-array/) | [C++](./solutions/element-appearing-more-than-25-in-sorted-array/solution.hpp) | | | | | | -| 1284. | [Minimum Number of Flips to Convert Binary Matrix to Zero Matrix](https://leetcode.com/problems/minimum-number-of-flips-to-convert-binary-matrix-to-zero-matrix/) | [C++](./solutions/minimum-number-of-flips-to-convert-binary-matrix-to-zero-matrix/solution.hpp) | | | | | | -| 1283. | [Find the Smallest Divisor Given a Threshold](https://leetcode.com/problems/find-the-smallest-divisor-given-a-threshold/) | [C++](./solutions/find-the-smallest-divisor-given-a-threshold/solution.hpp) | | | | | | -| 1282. | [Group the People Given the Group Size They Belong To](https://leetcode.com/problems/group-the-people-given-the-group-size-they-belong-to/) | [C++](./solutions/group-the-people-given-the-group-size-they-belong-to/solution.hpp) | | | | | | -| 1281. | [Subtract the Product and Sum of Digits of an Integer](https://leetcode.com/problems/subtract-the-product-and-sum-of-digits-of-an-integer/) | [C++](./solutions/subtract-the-product-and-sum-of-digits-of-an-integer/solution.hpp) | | | | | | -| 1275. | [Find Winner on a Tic Tac Toe Game](https://leetcode.com/problems/find-winner-on-a-tic-tac-toe-game/) | [C++](./solutions/find-winner-on-a-tic-tac-toe-game/solution.hpp) | | | | | | -| 1269. | [Number of Ways to Stay in the Same Place After Some Steps](https://leetcode.com/problems/number-of-ways-to-stay-in-the-same-place-after-some-steps/) | [C++](./solutions/number-of-ways-to-stay-in-the-same-place-after-some-steps/solution.hpp) | | | | | | -| 1268. | [Search Suggestions System](https://leetcode.com/problems/search-suggestions-system/) | [C++](./solutions/search-suggestions-system/solution.hpp) | | | | | | -| 1266. | [Minimum Time Visiting All Points](https://leetcode.com/problems/minimum-time-visiting-all-points/) | [C++](./solutions/minimum-time-visiting-all-points/solution.hpp) | | | | | | -| 1260. | [Shift 2D Grid](https://leetcode.com/problems/shift-2d-grid/) | [C++](./solutions/shift-2d-grid/solution.hpp) | | | | | | -| 1255. | [Maximum Score Words Formed by Letters](https://leetcode.com/problems/maximum-score-words-formed-by-letters/) | [C++](./solutions/maximum-score-words-formed-by-letters/solution.hpp) | | | | | | -| 1254. | [Number of Closed Islands](https://leetcode.com/problems/number-of-closed-islands/) | [C++](./solutions/number-of-closed-islands/solution.hpp) | | | | | | -| 1252. | [Cells with Odd Values in a Matrix](https://leetcode.com/problems/cells-with-odd-values-in-a-matrix/) | [C++](./solutions/cells-with-odd-values-in-a-matrix/solution.hpp) | | | | | | -| 1249. | [Minimum Remove to Make Valid Parentheses](https://leetcode.com/problems/minimum-remove-to-make-valid-parentheses/) | [C++](./solutions/minimum-remove-to-make-valid-parentheses/solution.hpp) | | | | | | -| 1235. | [Maximum Profit in Job Scheduling](https://leetcode.com/problems/maximum-profit-in-job-scheduling/) | [C++](./solutions/maximum-profit-in-job-scheduling/solution.hpp) | | | | | | -| 1232. | [Check If It Is a Straight Line](https://leetcode.com/problems/check-if-it-is-a-straight-line/) | [C++](./solutions/check-if-it-is-a-straight-line/solution.hpp) | | | | | | -| 1221. | [Split a String in Balanced Strings](https://leetcode.com/problems/split-a-string-in-balanced-strings/) | [C++](./solutions/split-a-string-in-balanced-strings/solution.hpp) | | | | | | -| 1218. | [Longest Arithmetic Subsequence of Given Difference](https://leetcode.com/problems/longest-arithmetic-subsequence-of-given-difference/) | [C++](./solutions/longest-arithmetic-subsequence-of-given-difference/solution.hpp) | | | | | | -| 1217. | [Minimum Cost to Move Chips to The Same Position](https://leetcode.com/problems/minimum-cost-to-move-chips-to-the-same-position/) | [C++](./solutions/minimum-cost-to-move-chips-to-the-same-position/solution.hpp) | | | | | | -| 1207. | [Unique Number of Occurrences](https://leetcode.com/problems/unique-number-of-occurrences/) | [C++](./solutions/unique-number-of-occurrences/solution.hpp) | | | | | | -| 1203. | [Sort Items by Groups Respecting Dependencies](https://leetcode.com/problems/sort-items-by-groups-respecting-dependencies/) | [C++](./solutions/sort-items-by-groups-respecting-dependencies/solution.hpp) | | | | | | -| 1201. | [Ugly Number III](https://leetcode.com/problems/ugly-number-iii/) | [C++](./solutions/ugly-number-iii/solution.hpp) | | | | | | -| 1200. | [Minimum Absolute Difference](https://leetcode.com/problems/minimum-absolute-difference/) | [C++](./solutions/minimum-absolute-difference/solution.hpp) | | | | | | -| 1189. | [Maximum Number of Balloons](https://leetcode.com/problems/maximum-number-of-balloons/) | [C++](./solutions/maximum-number-of-balloons/solution.hpp) | | | | | | -| 1187. | [Make Array Strictly Increasing](https://leetcode.com/problems/make-array-strictly-increasing/) | [C++](./solutions/make-array-strictly-increasing/solution.hpp) | | | | | | -| 1185. | [Day of the Week](https://leetcode.com/problems/day-of-the-week/) | [C++](./solutions/day-of-the-week/solution.hpp) | | | | | | -| 1184. | [Distance Between Bus Stops](https://leetcode.com/problems/distance-between-bus-stops/) | [C++](./solutions/distance-between-bus-stops/solution.hpp) | | | | | | -| 1175. | [Prime Arrangements](https://leetcode.com/problems/prime-arrangements/) | [C++](./solutions/prime-arrangements/solution.hpp) | | | | | | -| 1162. | [As Far from Land as Possible](https://leetcode.com/problems/as-far-from-land-as-possible/) | [C++](./solutions/as-far-from-land-as-possible/solution.hpp) | | | | | | -| 1161. | [Maximum Level Sum of a Binary Tree](https://leetcode.com/problems/maximum-level-sum-of-a-binary-tree/) | [C++](./solutions/maximum-level-sum-of-a-binary-tree/solution.hpp) | | | | | | -| 1160. | [Find Words That Can Be Formed by Characters](https://leetcode.com/problems/find-words-that-can-be-formed-by-characters/) | [C++](./solutions/find-words-that-can-be-formed-by-characters/solution.hpp) | | | | | | -| 1154. | [Day of the Year](https://leetcode.com/problems/day-of-the-year/) | [C++](./solutions/day-of-the-year/solution.hpp) | | | | | | -| 1146. | [Snapshot Array](https://leetcode.com/problems/snapshot-array/) | [C++](./solutions/snapshot-array/solution.hpp) | | | | | | -| 1143. | [Longest Common Subsequence](https://leetcode.com/problems/longest-common-subsequence/) | [C++](./solutions/longest-common-subsequence/solution.hpp) | | | | | | -| 1140. | [Stone Game II](https://leetcode.com/problems/stone-game-ii/) | [C++](./solutions/stone-game-ii/solution.hpp) | | | | | | -| 1137. | [N-th Tribonacci Number](https://leetcode.com/problems/n-th-tribonacci-number/) | [C++](./solutions/n-th-tribonacci-number/solution.hpp) | | | | | | -| 1129. | [Shortest Path with Alternating Colors](https://leetcode.com/problems/shortest-path-with-alternating-colors/) | [C++](./solutions/shortest-path-with-alternating-colors/solution.hpp) | | | | | | -| 1128. | [Number of Equivalent Domino Pairs](https://leetcode.com/problems/number-of-equivalent-domino-pairs/) | [C++](./solutions/number-of-equivalent-domino-pairs/solution.hpp) | | | | | | -| 1125. | [Smallest Sufficient Team](https://leetcode.com/problems/smallest-sufficient-team/) | [C++](./solutions/smallest-sufficient-team/solution.hpp) | | | | | | -| 1122. | [Relative Sort Array](https://leetcode.com/problems/relative-sort-array/) | [C++](./solutions/relative-sort-array/solution.hpp) | | | | | | -| 1108. | [Defanging an IP Address](https://leetcode.com/problems/defanging-an-ip-address/) | [C++](./solutions/defanging-an-ip-address/solution.hpp) | | | | | | -| 1103. | [Distribute Candies to People](https://leetcode.com/problems/distribute-candies-to-people/) | [C++](./solutions/distribute-candies-to-people/solution.hpp) | | | | | | -| 1095. | [Find in Mountain Array](https://leetcode.com/problems/find-in-mountain-array/) | [C++](./solutions/find-in-mountain-array/solution.hpp) | | | | | | -| 1091. | [Shortest Path in Binary Matrix](https://leetcode.com/problems/shortest-path-in-binary-matrix/) | [C++](./solutions/shortest-path-in-binary-matrix/solution.hpp) | | | | | | -| 1089. | [Duplicate Zeros](https://leetcode.com/problems/duplicate-zeros/) | [C++](./solutions/duplicate-zeros/solution.hpp) | | | | | | -| 1081. | [Smallest Subsequence of Distinct Characters](https://leetcode.com/problems/smallest-subsequence-of-distinct-characters/) | [C++](./solutions/smallest-subsequence-of-distinct-characters/solution.hpp) | | | | | | -| 1078. | [Occurrences After Bigram](https://leetcode.com/problems/occurrences-after-bigram/) | [C++](./solutions/occurrences-after-bigram/solution.hpp) | | | | | | -| 1074. | [Number of Submatrices That Sum to Target](https://leetcode.com/problems/number-of-submatrices-that-sum-to-target/) | [C++](./solutions/number-of-submatrices-that-sum-to-target/solution.hpp) | | | | | | -| 1071. | [Greatest Common Divisor of Strings](https://leetcode.com/problems/greatest-common-divisor-of-strings/) | [C++](./solutions/greatest-common-divisor-of-strings/solution.hpp) | | | | | | -| 1051. | [Height Checker](https://leetcode.com/problems/height-checker/) | [C++](./solutions/height-checker/solution.hpp) | | | | | | -| 1048. | [Longest String Chain](https://leetcode.com/problems/longest-string-chain/) | [C++](./solutions/longest-string-chain/solution.hpp) | | | | | | -| 1047. | [Remove All Adjacent Duplicates In String](https://leetcode.com/problems/remove-all-adjacent-duplicates-in-string/) | [C++](./solutions/remove-all-adjacent-duplicates-in-string/solution.hpp) | | | | | | -| 1046. | [Last Stone Weight](https://leetcode.com/problems/last-stone-weight/) | [C++](./solutions/last-stone-weight/solution.hpp) | | | | | | -| 1037. | [Valid Boomerang](https://leetcode.com/problems/valid-boomerang/) | [C++](./solutions/valid-boomerang/solution.hpp) | | | | | | -| 1035. | [Uncrossed Lines](https://leetcode.com/problems/uncrossed-lines/) | [C++](./solutions/uncrossed-lines/solution.hpp) | | | | | | -| 1030. | [Matrix Cells in Distance Order](https://leetcode.com/problems/matrix-cells-in-distance-order/) | [C++](./solutions/matrix-cells-in-distance-order/solution.hpp) | | | | | | -| 1028. | [Recover a Tree From Preorder Traversal](https://leetcode.com/problems/recover-a-tree-from-preorder-traversal/) | [C++](./solutions/recover-a-tree-from-preorder-traversal/solution.hpp) | | | | | | -| 1027. | [Longest Arithmetic Subsequence](https://leetcode.com/problems/longest-arithmetic-subsequence/) | [C++](./solutions/longest-arithmetic-subsequence/solution.hpp) | | | | | | -| 1025. | [Divisor Game](https://leetcode.com/problems/divisor-game/) | [C++](./solutions/divisor-game/solution.hpp) | | | | | | -| 1022. | [Sum of Root To Leaf Binary Numbers](https://leetcode.com/problems/sum-of-root-to-leaf-binary-numbers/) | [C++](./solutions/sum-of-root-to-leaf-binary-numbers/solution.hpp) | | | | | | -| 1021. | [Remove Outermost Parentheses](https://leetcode.com/problems/remove-outermost-parentheses/) | [C++](./solutions/remove-outermost-parentheses/solution.hpp) | | | | | | -| 1020. | [Number of Enclaves](https://leetcode.com/problems/number-of-enclaves/) | [C++](./solutions/number-of-enclaves/solution.hpp) | | | | | | -| 1018. | [Binary Prefix Divisible By 5](https://leetcode.com/problems/binary-prefix-divisible-by-5/) | [C++](./solutions/binary-prefix-divisible-by-5/solution.hpp) | | | | | | -| 1014. | [Best Sightseeing Pair](https://leetcode.com/problems/best-sightseeing-pair/) | [C++](./solutions/best-sightseeing-pair/solution.hpp) | | | | | | -| 1013. | [Partition Array Into Three Parts With Equal Sum](https://leetcode.com/problems/partition-array-into-three-parts-with-equal-sum/) | [C++](./solutions/partition-array-into-three-parts-with-equal-sum/solution.hpp) | | | | | | -| 1011. | [Capacity To Ship Packages Within D Days](https://leetcode.com/problems/capacity-to-ship-packages-within-d-days/) | [C++](./solutions/capacity-to-ship-packages-within-d-days/solution.hpp) | | | | | | -| 1009. | [Complement of Base 10 Integer](https://leetcode.com/problems/complement-of-base-10-integer/) | [C++](./solutions/complement-of-base-10-integer/solution.hpp) | | | | | | -| 1005. | [Maximize Sum Of Array After K Negations](https://leetcode.com/problems/maximize-sum-of-array-after-k-negations/) | [C++](./solutions/maximize-sum-of-array-after-k-negations/solution.hpp) | | | | | | -| 1004. | [Max Consecutive Ones III](https://leetcode.com/problems/max-consecutive-ones-iii/) | [C++](./solutions/max-consecutive-ones-iii/solution.hpp) | | | | | | -| 1002. | [Find Common Characters](https://leetcode.com/problems/find-common-characters/) | [C++](./solutions/find-common-characters/solution.hpp) | | | | | | -| 999. | [Available Captures for Rook](https://leetcode.com/problems/available-captures-for-rook/) | [C++](./solutions/available-captures-for-rook/solution.hpp) | | | | | | -| 997. | [Find the Town Judge](https://leetcode.com/problems/find-the-town-judge/) | [C++](./solutions/find-the-town-judge/solution.hpp) | | | | | | -| 994. | [Rotting Oranges](https://leetcode.com/problems/rotting-oranges/) | [C++](./solutions/rotting-oranges/solution.hpp) | | | | | | -| 993. | [Cousins in Binary Tree](https://leetcode.com/problems/cousins-in-binary-tree/) | [C++](./solutions/cousins-in-binary-tree/solution.hpp) | | | | | | -| 989. | [Add to Array-Form of Integer](https://leetcode.com/problems/add-to-array-form-of-integer/) | [C++](./solutions/add-to-array-form-of-integer/solution.hpp) | | | | | | -| 986. | [Interval List Intersections](https://leetcode.com/problems/interval-list-intersections/) | [C++](./solutions/interval-list-intersections/solution.hpp) | | | | | | -| 983. | [Minimum Cost For Tickets](https://leetcode.com/problems/minimum-cost-for-tickets/) | [C++](./solutions/minimum-cost-for-tickets/solution.hpp) | | | | | | -| 981. | [Time Based Key-Value Store](https://leetcode.com/problems/time-based-key-value-store/) | [C++](./solutions/time-based-key-value-store/solution.hpp) | | | | | | -| 980. | [Unique Paths III](https://leetcode.com/problems/unique-paths-iii/) | [C++](./solutions/unique-paths-iii/solution.hpp) | | | | | | -| 977. | [Squares of a Sorted Array](https://leetcode.com/problems/squares-of-a-sorted-array/) | [C++](./solutions/squares-of-a-sorted-array/solution.hpp) | | | | | | -| 976. | [Largest Perimeter Triangle](https://leetcode.com/problems/largest-perimeter-triangle/) | [C++](./solutions/largest-perimeter-triangle/solution.hpp) | | | | | | -| 973. | [K Closest Points to Origin](https://leetcode.com/problems/k-closest-points-to-origin/) | [C++](./solutions/k-closest-points-to-origin/solution.hpp) | | | | | | -| 965. | [Univalued Binary Tree](https://leetcode.com/problems/univalued-binary-tree/) | [C++](./solutions/univalued-binary-tree/solution.hpp) | | | | | | -| 961. | [N-Repeated Element in Size 2N Array](https://leetcode.com/problems/n-repeated-element-in-size-2n-array/) | [C++](./solutions/n-repeated-element-in-size-2n-array/solution.hpp) | | | | | | -| 958. | [Check Completeness of a Binary Tree](https://leetcode.com/problems/check-completeness-of-a-binary-tree/) | [C++](./solutions/check-completeness-of-a-binary-tree/solution.hpp) | | | | | | -| 956. | [Tallest Billboard](https://leetcode.com/problems/tallest-billboard/) | [C++](./solutions/tallest-billboard/solution.hpp) | | | | | | -| 953. | [Verifying an Alien Dictionary](https://leetcode.com/problems/verifying-an-alien-dictionary/) | [C++](./solutions/verifying-an-alien-dictionary/solution.hpp) | | | | | | -| 949. | [Largest Time for Given Digits](https://leetcode.com/problems/largest-time-for-given-digits/) | [C++](./solutions/largest-time-for-given-digits/solution.hpp) | | | | | | -| 947. | [Most Stones Removed with Same Row or Column](https://leetcode.com/problems/most-stones-removed-with-same-row-or-column/) | [C++](./solutions/most-stones-removed-with-same-row-or-column/solution.hpp) | | | | | | -| 946. | [Validate Stack Sequences](https://leetcode.com/problems/validate-stack-sequences/) | [C++](./solutions/validate-stack-sequences/solution.hpp) | | | | | | -| 944. | [Delete Columns to Make Sorted](https://leetcode.com/problems/delete-columns-to-make-sorted/) | [C++](./solutions/delete-columns-to-make-sorted/solution.hpp) | | | | | | -| 942. | [DI String Match](https://leetcode.com/problems/di-string-match/) | [C++](./solutions/di-string-match/solution.hpp) | | | | | | -| 941. | [Valid Mountain Array](https://leetcode.com/problems/valid-mountain-array/) | [C++](./solutions/valid-mountain-array/solution.hpp) | | | | | | -| 938. | [Range Sum of BST](https://leetcode.com/problems/range-sum-of-bst/) | [C++](./solutions/range-sum-of-bst/solution.hpp) | | | | | | -| 934. | [Shortest Bridge](https://leetcode.com/problems/shortest-bridge/) | [C++](./solutions/shortest-bridge/solution.hpp) | | | | | | -| 933. | [Number of Recent Calls](https://leetcode.com/problems/number-of-recent-calls/) | [C++](./solutions/number-of-recent-calls/solution.hpp) | | | | | | -| 931. | [Minimum Falling Path Sum](https://leetcode.com/problems/minimum-falling-path-sum/) | [C++](./solutions/minimum-falling-path-sum/solution.hpp) | | | | | | -| 929. | [Unique Email Addresses](https://leetcode.com/problems/unique-email-addresses/) | [C++](./solutions/unique-email-addresses/solution.hpp) | | | | | | -| 925. | [Long Pressed Name](https://leetcode.com/problems/long-pressed-name/) | [C++](./solutions/long-pressed-name/solution.hpp) | | | | | | -| 922. | [Sort Array By Parity II](https://leetcode.com/problems/sort-array-by-parity-ii/) | [C++](./solutions/sort-array-by-parity-ii/solution.hpp) | | | | | | -| 920. | [Number of Music Playlists](https://leetcode.com/problems/number-of-music-playlists/) | [C++](./solutions/number-of-music-playlists/solution.hpp) | | | | | | -| 918. | [Maximum Sum Circular Subarray](https://leetcode.com/problems/maximum-sum-circular-subarray/) | [C++](./solutions/maximum-sum-circular-subarray/solution.hpp) | | | | | | -| 917. | [Reverse Only Letters](https://leetcode.com/problems/reverse-only-letters/) | [C++](./solutions/reverse-only-letters/solution.hpp) | | | | | | -| 914. | [X of a Kind in a Deck of Cards](https://leetcode.com/problems/x-of-a-kind-in-a-deck-of-cards/) | [C++](./solutions/x-of-a-kind-in-a-deck-of-cards/solution.hpp) | | | | | | -| 912. | [Sort an Array](https://leetcode.com/problems/sort-an-array/) | [C++](./solutions/sort-an-array/solution.hpp) | | | | | | -| 911. | [Online Election](https://leetcode.com/problems/online-election/) | [C++](./solutions/online-election/solution.hpp) | | | | | | -| 910. | [Smallest Range II](https://leetcode.com/problems/smallest-range-ii/) | [C++](./solutions/smallest-range-ii/solution.hpp) | | | | | | -| 909. | [Snakes and Ladders](https://leetcode.com/problems/snakes-and-ladders/) | [C++](./solutions/snakes-and-ladders/solution.hpp) | | | | | | -| 908. | [Smallest Range I](https://leetcode.com/problems/smallest-range-i/) | [C++](./solutions/smallest-range-i/solution.hpp) | | | | | | -| 905. | [Sort Array By Parity](https://leetcode.com/problems/sort-array-by-parity/) | [C++](./solutions/sort-array-by-parity/solution.hpp) | | | | | | -| 901. | [Online Stock Span](https://leetcode.com/problems/online-stock-span/) | [C++](./solutions/online-stock-span/solution.hpp) | | | | | | -| 899. | [Orderly Queue](https://leetcode.com/problems/orderly-queue/) | [C++](./solutions/orderly-queue/solution.hpp) | | | | | | -| 897. | [Increasing Order Search Tree](https://leetcode.com/problems/increasing-order-search-tree/) | [C++](./solutions/increasing-order-search-tree/solution.hpp) | | | | | | -| 896. | [Monotonic Array](https://leetcode.com/problems/monotonic-array/) | [C++](./solutions/monotonic-array/solution.hpp) | | | | | | -| 895. | [Maximum Frequency Stack](https://leetcode.com/problems/maximum-frequency-stack/) | [C++](./solutions/maximum-frequency-stack/solution.hpp) | | | | | | -| 894. | [All Possible Full Binary Trees](https://leetcode.com/problems/all-possible-full-binary-trees/) | [C++](./solutions/all-possible-full-binary-trees/solution.hpp) | | | | | | -| 892. | [Surface Area of 3D Shapes](https://leetcode.com/problems/surface-area-of-3d-shapes/) | [C++](./solutions/surface-area-of-3d-shapes/solution.hpp) | | | | | | -| 888. | [Fair Candy Swap](https://leetcode.com/problems/fair-candy-swap/) | [C++](./solutions/fair-candy-swap/solution.hpp) | | | | | | -| 886. | [Possible Bipartition](https://leetcode.com/problems/possible-bipartition/) | [C++](./solutions/possible-bipartition/solution.hpp) | | | | | | -| 884. | [Uncommon Words from Two Sentences](https://leetcode.com/problems/uncommon-words-from-two-sentences/) | [C++](./solutions/uncommon-words-from-two-sentences/solution.hpp) | | | | | | -| 883. | [Projection Area of 3D Shapes](https://leetcode.com/problems/projection-area-of-3d-shapes/) | [C++](./solutions/projection-area-of-3d-shapes/solution.hpp) | | | | | | -| 881. | [Boats to Save People](https://leetcode.com/problems/boats-to-save-people/) | [C++](./solutions/boats-to-save-people/solution.hpp) | | | | | | -| 880. | [Decoded String at Index](https://leetcode.com/problems/decoded-string-at-index/) | [C++](./solutions/decoded-string-at-index/solution.hpp) | | | | | | -| 879. | [Profitable Schemes](https://leetcode.com/problems/profitable-schemes/) | [C++](./solutions/profitable-schemes/solution.hpp) | | | | | | -| 876. | [Middle of the Linked List](https://leetcode.com/problems/middle-of-the-linked-list/) | [C++](./solutions/middle-of-the-linked-list/solution.hpp) | | | | | | -| 875. | [Koko Eating Bananas](https://leetcode.com/problems/koko-eating-bananas/) | [C++](./solutions/koko-eating-bananas/solution.hpp) | | | | | | -| 872. | [Leaf-Similar Trees](https://leetcode.com/problems/leaf-similar-trees/) | [C++](./solutions/leaf-similar-trees/solution.hpp) | | | | | | -| 868. | [Binary Gap](https://leetcode.com/problems/binary-gap/) | [C++](./solutions/binary-gap/solution.hpp) | | | | | | -| 867. | [Transpose Matrix](https://leetcode.com/problems/transpose-matrix/) | [C++](./solutions/transpose-matrix/solution.hpp) | | | | | | -| 864. | [Shortest Path to Get All Keys](https://leetcode.com/problems/shortest-path-to-get-all-keys/) | [C++](./solutions/shortest-path-to-get-all-keys/solution.hpp) | | | | | | -| 863. | [All Nodes Distance K in Binary Tree](https://leetcode.com/problems/all-nodes-distance-k-in-binary-tree/) | [C++](./solutions/all-nodes-distance-k-in-binary-tree/solution.hpp) | | | | | | -| 860. | [Lemonade Change](https://leetcode.com/problems/lemonade-change/) | [C++](./solutions/lemonade-change/solution.hpp) | | | | | | -| 859. | [Buddy Strings](https://leetcode.com/problems/buddy-strings/) | [C++](./solutions/buddy-strings/solution.hpp) | | | | | | -| 852. | [Peak Index in a Mountain Array](https://leetcode.com/problems/peak-index-in-a-mountain-array/) | [C++](./solutions/peak-index-in-a-mountain-array/solution.hpp) | | | | | | -| 847. | [Shortest Path Visiting All Nodes](https://leetcode.com/problems/shortest-path-visiting-all-nodes/) | [C++](./solutions/shortest-path-visiting-all-nodes/solution.hpp) | | | | | | -| 844. | [Backspace String Compare](https://leetcode.com/problems/backspace-string-compare/) | [C++](./solutions/backspace-string-compare/solution.hpp) | | | | | | -| 843. | [Guess the Word](https://leetcode.com/problems/guess-the-word/) | [C++](./solutions/guess-the-word/solution.hpp) | | | | | | -| 841. | [Keys and Rooms](https://leetcode.com/problems/keys-and-rooms/) | [C++](./solutions/keys-and-rooms/solution.hpp) | | | | | | -| 839. | [Similar String Groups](https://leetcode.com/problems/similar-string-groups/) | [C++](./solutions/similar-string-groups/solution.hpp) | | | | | | -| 837. | [New 21 Game](https://leetcode.com/problems/new-21-game/) | [C++](./solutions/new-21-game/solution.hpp) | | | | | | -| 836. | [Rectangle Overlap](https://leetcode.com/problems/rectangle-overlap/) | [C++](./solutions/rectangle-overlap/solution.hpp) | | | | | | -| 832. | [Flipping an Image](https://leetcode.com/problems/flipping-an-image/) | [C++](./solutions/flipping-an-image/solution.hpp) | | | | | | -| 830. | [Positions of Large Groups](https://leetcode.com/problems/positions-of-large-groups/) | [C++](./solutions/positions-of-large-groups/solution.hpp) | | | | | | -| 826. | [Most Profit Assigning Work](https://leetcode.com/problems/most-profit-assigning-work/) | [C++](./solutions/most-profit-assigning-work/solution.hpp) | | | | | | -| 824. | [Goat Latin](https://leetcode.com/problems/goat-latin/) | [C++](./solutions/goat-latin/solution.hpp) | | | | | | -| 823. | [Binary Trees With Factors](https://leetcode.com/problems/binary-trees-with-factors/) | [C++](./solutions/binary-trees-with-factors/solution.hpp) | | | | | | -| 821. | [Shortest Distance to a Character](https://leetcode.com/problems/shortest-distance-to-a-character/) | [C++](./solutions/shortest-distance-to-a-character/solution.hpp) | | | | | | -| 819. | [Most Common Word](https://leetcode.com/problems/most-common-word/) | [C++](./solutions/most-common-word/solution.hpp) | | | | | | -| 815. | [Bus Routes](https://leetcode.com/problems/bus-routes/) | [C++](./solutions/bus-routes/solution.hpp) | | | | | | -| 812. | [Largest Triangle Area](https://leetcode.com/problems/largest-triangle-area/) | [C++](./solutions/largest-triangle-area/solution.hpp) | | | | | | -| 808. | [Soup Servings](https://leetcode.com/problems/soup-servings/) | [C++](./solutions/soup-servings/solution.hpp) | | | | | | -| 806. | [Number of Lines To Write String](https://leetcode.com/problems/number-of-lines-to-write-string/) | [C++](./solutions/number-of-lines-to-write-string/solution.hpp) | | | | | | -| 804. | [Unique Morse Code Words](https://leetcode.com/problems/unique-morse-code-words/) | [C++](./solutions/unique-morse-code-words/solution.hpp) | | | | | | -| 802. | [Find Eventual Safe States](https://leetcode.com/problems/find-eventual-safe-states/) | [C++](./solutions/find-eventual-safe-states/solution.hpp) | | | | | | -| 799. | [Champagne Tower](https://leetcode.com/problems/champagne-tower/) | [C++](./solutions/champagne-tower/solution.hpp) | | | | | | -| 797. | [All Paths From Source to Target](https://leetcode.com/problems/all-paths-from-source-to-target/) | [C++](./solutions/all-paths-from-source-to-target/solution.hpp) | | | | | | -| 796. | [Rotate String](https://leetcode.com/problems/rotate-string/) | [C++](./solutions/rotate-string/solution.hpp) | | | | | | -| 790. | [Domino and Tromino Tiling](https://leetcode.com/problems/domino-and-tromino-tiling/) | [C++](./solutions/domino-and-tromino-tiling/solution.hpp) | | | | | | -| 787. | [Cheapest Flights Within K Stops](https://leetcode.com/problems/cheapest-flights-within-k-stops/) | [C++](./solutions/cheapest-flights-within-k-stops/solution.hpp) | | | | | | -| 785. | [Is Graph Bipartite?](https://leetcode.com/problems/is-graph-bipartite/) | [C++](./solutions/is-graph-bipartite/solution.hpp) | | | | | | -| 784. | [Letter Case Permutation](https://leetcode.com/problems/letter-case-permutation/) | [C++](./solutions/letter-case-permutation/solution.hpp) | | | | | | -| 783. | [Minimum Distance Between BST Nodes](https://leetcode.com/problems/minimum-distance-between-bst-nodes/) | [C++](./solutions/minimum-distance-between-bst-nodes/solution.hpp) | | | | | | -| 779. | [K-th Symbol in Grammar](https://leetcode.com/problems/k-th-symbol-in-grammar/) | [C++](./solutions/k-th-symbol-in-grammar/solution.hpp) | | | | | | -| 773. | [Sliding Puzzle](https://leetcode.com/problems/sliding-puzzle/) | [C++](./solutions/sliding-puzzle/solution.hpp) | | | | | | -| 771. | [Jewels and Stones](https://leetcode.com/problems/jewels-and-stones/) | [C++](./solutions/jewels-and-stones/solution.hpp) | | | | | | -| 767. | [Reorganize String](https://leetcode.com/problems/reorganize-string/) | [C++](./solutions/reorganize-string/solution.hpp) | | | | | | -| 766. | [Toeplitz Matrix](https://leetcode.com/problems/toeplitz-matrix/) | [C++](./solutions/toeplitz-matrix/solution.hpp) | | | | | | -| 763. | [Partition Labels](https://leetcode.com/problems/partition-labels/) | [C++](./solutions/partition-labels/solution.hpp) | | | | | | -| 762. | [Prime Number of Set Bits in Binary Representation](https://leetcode.com/problems/prime-number-of-set-bits-in-binary-representation/) | [C++](./solutions/prime-number-of-set-bits-in-binary-representation/solution.hpp) | | | | | | -| 752. | [Open the Lock](https://leetcode.com/problems/open-the-lock/) | [C++](./solutions/open-the-lock/solution.hpp) | | | | | | -| 748. | [Shortest Completing Word](https://leetcode.com/problems/shortest-completing-word/) | [C++](./solutions/shortest-completing-word/solution.hpp) | | | | | | -| 747. | [Largest Number At Least Twice of Others](https://leetcode.com/problems/largest-number-at-least-twice-of-others/) | [C++](./solutions/largest-number-at-least-twice-of-others/solution.hpp) | | | | | | -| 746. | [Min Cost Climbing Stairs](https://leetcode.com/problems/min-cost-climbing-stairs/) | [C++](./solutions/min-cost-climbing-stairs/solution.hpp) | | | | | | -| 744. | [Find Smallest Letter Greater Than Target](https://leetcode.com/problems/find-smallest-letter-greater-than-target/) | [C++](./solutions/find-smallest-letter-greater-than-target/solution.hpp) | | | | | | -| 741. | [Cherry Pickup](https://leetcode.com/problems/cherry-pickup/) | [C++](./solutions/cherry-pickup/solution.hpp) | | | | | | -| 740. | [Delete and Earn](https://leetcode.com/problems/delete-and-earn/) | [C++](./solutions/delete-and-earn/solution.hpp) | | | | | | -| 739. | [Daily Temperatures](https://leetcode.com/problems/daily-temperatures/) | [C++](./solutions/daily-temperatures/solution.hpp) | | | | | | -| 735. | [Asteroid Collision](https://leetcode.com/problems/asteroid-collision/) | [C++](./solutions/asteroid-collision/solution.hpp) | | | | | | -| 733. | [Flood Fill](https://leetcode.com/problems/flood-fill/) | [C++](./solutions/flood-fill/solution.hpp) | | | | | | -| 732. | [My Calendar III](https://leetcode.com/problems/my-calendar-iii/) | [C++](./solutions/my-calendar-iii/solution.hpp) | | | | | | -| 731. | [My Calendar II](https://leetcode.com/problems/my-calendar-ii/) | [C++](./solutions/my-calendar-ii/solution.hpp) | | | | | | -| 729. | [My Calendar I](https://leetcode.com/problems/my-calendar-i/) | [C++](./solutions/my-calendar-i/solution.hpp) | | | | | | -| 728. | [Self Dividing Numbers](https://leetcode.com/problems/self-dividing-numbers/) | [C++](./solutions/self-dividing-numbers/solution.hpp) | | | | | | -| 725. | [Split Linked List in Parts](https://leetcode.com/problems/split-linked-list-in-parts/) | [C++](./solutions/split-linked-list-in-parts/solution.hpp) | | | | | | -| 724. | [Find Pivot Index](https://leetcode.com/problems/find-pivot-index/) | [C++](./solutions/find-pivot-index/solution.hpp) | | | | | | -| 717. | [1-bit and 2-bit Characters](https://leetcode.com/problems/1-bit-and-2-bit-characters/) | [C++](./solutions/1-bit-and-2-bit-characters/solution.hpp) | | | | | | -| 714. | [Best Time to Buy and Sell Stock with Transaction Fee](https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-transaction-fee/) | [C++](./solutions/best-time-to-buy-and-sell-stock-with-transaction-fee/solution.hpp) | | | | | | -| 713. | [Subarray Product Less Than K](https://leetcode.com/problems/subarray-product-less-than-k/) | [C++](./solutions/subarray-product-less-than-k/solution.hpp) | | | | | | -| 712. | [Minimum ASCII Delete Sum for Two Strings](https://leetcode.com/problems/minimum-ascii-delete-sum-for-two-strings/) | [C++](./solutions/minimum-ascii-delete-sum-for-two-strings/solution.hpp) | | | | | | -| 709. | [To Lower Case](https://leetcode.com/problems/to-lower-case/) | [C++](./solutions/to-lower-case/solution.hpp) | | | | | | -| 707. | [Design Linked List](https://leetcode.com/problems/design-linked-list/) | [C++](./solutions/design-linked-list/solution.hpp) | | | | | | -| 706. | [Design HashMap](https://leetcode.com/problems/design-hashmap/) | [C++](./solutions/design-hashmap/solution.hpp) | | | | | | -| 705. | [Design HashSet](https://leetcode.com/problems/design-hashset/) | [C++](./solutions/design-hashset/solution.hpp) | | | | | | -| 704. | [Binary Search](https://leetcode.com/problems/binary-search/) | [C++](./solutions/binary-search/solution.hpp) | | | | | | -| 703. | [Kth Largest Element in a Stream](https://leetcode.com/problems/kth-largest-element-in-a-stream/) | [C++](./solutions/kth-largest-element-in-a-stream/solution.hpp) | | | | | | -| 701. | [Insert into a Binary Search Tree](https://leetcode.com/problems/insert-into-a-binary-search-tree/) | [C++](./solutions/insert-into-a-binary-search-tree/solution.hpp) | | | | | | -| 700. | [Search in a Binary Search Tree](https://leetcode.com/problems/search-in-a-binary-search-tree/) | [C++](./solutions/search-in-a-binary-search-tree/solution.hpp) | | | | | | -| 697. | [Degree of an Array](https://leetcode.com/problems/degree-of-an-array/) | [C++](./solutions/degree-of-an-array/solution.hpp) | | | | | | -| 696. | [Count Binary Substrings](https://leetcode.com/problems/count-binary-substrings/) | [C++](./solutions/count-binary-substrings/solution.hpp) | | | | | | -| 695. | [Max Area of Island](https://leetcode.com/problems/max-area-of-island/) | [C++](./solutions/max-area-of-island/solution.hpp) | | | | | | -| 693. | [Binary Number with Alternating Bits](https://leetcode.com/problems/binary-number-with-alternating-bits/) | [C++](./solutions/binary-number-with-alternating-bits/solution.hpp) | | | | | | -| 692. | [Top K Frequent Words](https://leetcode.com/problems/top-k-frequent-words/) | [C++](./solutions/top-k-frequent-words/solution.hpp) | | | | | | -| 688. | [Knight Probability in Chessboard](https://leetcode.com/problems/knight-probability-in-chessboard/) | [C++](./solutions/knight-probability-in-chessboard/solution.hpp) | | | | | | -| 686. | [Repeated String Match](https://leetcode.com/problems/repeated-string-match/) | [C++](./solutions/repeated-string-match/solution.hpp) | | | | | | -| 682. | [Baseball Game](https://leetcode.com/problems/baseball-game/) | [C++](./solutions/baseball-game/solution.hpp) | | | | | | -| 680. | [Valid Palindrome II](https://leetcode.com/problems/valid-palindrome-ii/) | [C++](./solutions/valid-palindrome-ii/solution.hpp) | | | | | | -| 674. | [Longest Continuous Increasing Subsequence](https://leetcode.com/problems/longest-continuous-increasing-subsequence/) | [C++](./solutions/longest-continuous-increasing-subsequence/solution.hpp) | | | | | | -| 673. | [Number of Longest Increasing Subsequence](https://leetcode.com/problems/number-of-longest-increasing-subsequence/) | [C++](./solutions/number-of-longest-increasing-subsequence/solution.hpp) | | | | | | -| 671. | [Second Minimum Node In a Binary Tree](https://leetcode.com/problems/second-minimum-node-in-a-binary-tree/) | [C++](./solutions/second-minimum-node-in-a-binary-tree/solution.hpp) | | | | | | -| 664. | [Strange Printer](https://leetcode.com/problems/strange-printer/) | [C++](./solutions/strange-printer/solution.hpp) | | | | | | -| 662. | [Maximum Width of Binary Tree](https://leetcode.com/problems/maximum-width-of-binary-tree/) | [C++](./solutions/maximum-width-of-binary-tree/solution.hpp) | | | | | | -| 661. | [Image Smoother](https://leetcode.com/problems/image-smoother/) | [C++](./solutions/image-smoother/solution.hpp) | | | | | | -| 658. | [Find K Closest Elements](https://leetcode.com/problems/find-k-closest-elements/) | [C++](./solutions/find-k-closest-elements/solution.hpp) | | | | | | -| 657. | [Robot Return to Origin](https://leetcode.com/problems/robot-return-to-origin/) | [C++](./solutions/robot-return-to-origin/solution.hpp) | | | | | | -| 653. | [Two Sum IV - Input is a BST](https://leetcode.com/problems/two-sum-iv-input-is-a-bst/) | [C++](./solutions/two-sum-iv-input-is-a-bst/solution.hpp) | | | | | | -| 652. | [Find Duplicate Subtrees](https://leetcode.com/problems/find-duplicate-subtrees/) | [C++](./solutions/find-duplicate-subtrees/solution.hpp) | | | | | | -| 649. | [Dota2 Senate](https://leetcode.com/problems/dota2-senate/) | [C++](./solutions/dota2-senate/solution.hpp) | | | | | | -| 646. | [Maximum Length of Pair Chain](https://leetcode.com/problems/maximum-length-of-pair-chain/) | [C++](./solutions/maximum-length-of-pair-chain/solution.hpp) | | | | | | -| 645. | [Set Mismatch](https://leetcode.com/problems/set-mismatch/) | [C++](./solutions/set-mismatch/solution.hpp) | | | | | | -| 643. | [Maximum Average Subarray I](https://leetcode.com/problems/maximum-average-subarray-i/) | [C++](./solutions/maximum-average-subarray-i/solution.hpp) | | | | | | -| 637. | [Average of Levels in Binary Tree](https://leetcode.com/problems/average-of-levels-in-binary-tree/) | [C++](./solutions/average-of-levels-in-binary-tree/solution.hpp) | | | | | | -| 633. | [Sum of Square Numbers](https://leetcode.com/problems/sum-of-square-numbers/) | [C++](./solutions/sum-of-square-numbers/solution.hpp) | | | | | | -| 628. | [Maximum Product of Three Numbers](https://leetcode.com/problems/maximum-product-of-three-numbers/) | [C++](./solutions/maximum-product-of-three-numbers/solution.hpp) | | | | | | -| 622. | [Design Circular Queue](https://leetcode.com/problems/design-circular-queue/) | [C++](./solutions/design-circular-queue/solution.hpp) | | | | | | -| 621. | [Task Scheduler](https://leetcode.com/problems/task-scheduler/) | [C++](./solutions/task-scheduler/solution.hpp) | | | | | | -| 617. | [Merge Two Binary Trees](https://leetcode.com/problems/merge-two-binary-trees/) | [C++](./solutions/merge-two-binary-trees/solution.hpp) | | | | | | -| 611. | [Valid Triangle Number](https://leetcode.com/problems/valid-triangle-number/) | [C++](./solutions/valid-triangle-number/solution.hpp) | | | | | | -| 606. | [Construct String from Binary Tree](https://leetcode.com/problems/construct-string-from-binary-tree/) | [C++](./solutions/construct-string-from-binary-tree/solution.hpp) | | | | | | -| 605. | [Can Place Flowers](https://leetcode.com/problems/can-place-flowers/) | [C++](./solutions/can-place-flowers/solution.hpp) | | | | | | -| 599. | [Minimum Index Sum of Two Lists](https://leetcode.com/problems/minimum-index-sum-of-two-lists/) | [C++](./solutions/minimum-index-sum-of-two-lists/solution.hpp) | | | | | | -| 598. | [Range Addition II](https://leetcode.com/problems/range-addition-ii/) | [C++](./solutions/range-addition-ii/solution.hpp) | | | | | | -| 594. | [Longest Harmonious Subsequence](https://leetcode.com/problems/longest-harmonious-subsequence/) | [C++](./solutions/longest-harmonious-subsequence/solution.hpp) | | | | | | -| 590. | [N-ary Tree Postorder Traversal](https://leetcode.com/problems/n-ary-tree-postorder-traversal/) | [C++](./solutions/n-ary-tree-postorder-traversal/solution.hpp) | | | | | | -| 589. | [N-ary Tree Preorder Traversal](https://leetcode.com/problems/n-ary-tree-preorder-traversal/) | [C++](./solutions/n-ary-tree-preorder-traversal/solution.hpp) | | | | | | -| 583. | [Delete Operation for Two Strings](https://leetcode.com/problems/delete-operation-for-two-strings/) | [C++](./solutions/delete-operation-for-two-strings/solution.hpp) | | | | | | -| 575. | [Distribute Candies](https://leetcode.com/problems/distribute-candies/) | [C++](./solutions/distribute-candies/solution.hpp) | | | | | | -| 572. | [Subtree of Another Tree](https://leetcode.com/problems/subtree-of-another-tree/) | [C++](./solutions/subtree-of-another-tree/solution.hpp) | | | | | | -| 567. | [Permutation in String](https://leetcode.com/problems/permutation-in-string/) | [C++](./solutions/permutation-in-string/solution.hpp) | | | | | | -| 566. | [Reshape the Matrix](https://leetcode.com/problems/reshape-the-matrix/) | [C++](./solutions/reshape-the-matrix/solution.hpp) | | | | | | -| 563. | [Binary Tree Tilt](https://leetcode.com/problems/binary-tree-tilt/) | [C++](./solutions/binary-tree-tilt/solution.hpp) | | | | | | -| 561. | [Array Partition](https://leetcode.com/problems/array-partition/) | [C++](./solutions/array-partition/solution.hpp) | | | | | | -| 560. | [Subarray Sum Equals K](https://leetcode.com/problems/subarray-sum-equals-k/) | [C++](./solutions/subarray-sum-equals-k/solution.hpp) | | | | | | -| 559. | [Maximum Depth of N-ary Tree](https://leetcode.com/problems/maximum-depth-of-n-ary-tree/) | [C++](./solutions/maximum-depth-of-n-ary-tree/solution.hpp) | | | | | | -| 557. | [Reverse Words in a String III](https://leetcode.com/problems/reverse-words-in-a-string-iii/) | [C++](./solutions/reverse-words-in-a-string-iii/solution.hpp) | | | | | | -| 556. | [Next Greater Element III](https://leetcode.com/problems/next-greater-element-iii/) | [C++](./solutions/next-greater-element-iii/solution.hpp) | | | | | | -| 551. | [Student Attendance Record I](https://leetcode.com/problems/student-attendance-record-i/) | [C++](./solutions/student-attendance-record-i/solution.hpp) | | | | | | -| 547. | [Number of Provinces](https://leetcode.com/problems/number-of-provinces/) | [C++](./solutions/number-of-provinces/solution.hpp) | | | | | | -| 543. | [Diameter of Binary Tree](https://leetcode.com/problems/diameter-of-binary-tree/) | [C++](./solutions/diameter-of-binary-tree/solution.hpp) | | | | | | -| 542. | [01 Matrix](https://leetcode.com/problems/01-matrix/) | [C++](./solutions/01-matrix/solution.hpp) | | | | | | -| 541. | [Reverse String II](https://leetcode.com/problems/reverse-string-ii/) | [C++](./solutions/reverse-string-ii/solution.hpp) | | | | | | -| 540. | [Single Element in a Sorted Array](https://leetcode.com/problems/single-element-in-a-sorted-array/) | [C++](./solutions/single-element-in-a-sorted-array/solution.hpp) | | | | | | -| 530. | [Minimum Absolute Difference in BST](https://leetcode.com/problems/minimum-absolute-difference-in-bst/) | [C++](./solutions/minimum-absolute-difference-in-bst/solution.hpp) | | | | | | -| 528. | [Random Pick with Weight](https://leetcode.com/problems/random-pick-with-weight/) | [C++](./solutions/random-pick-with-weight/solution.hpp) | | | | | | -| 521. | [Longest Uncommon Subsequence I](https://leetcode.com/problems/longest-uncommon-subsequence-i/) | [C++](./solutions/longest-uncommon-subsequence-i/solution.hpp) | | | | | | -| 520. | [Detect Capital](https://leetcode.com/problems/detect-capital/) | [C++](./solutions/detect-capital/solution.hpp) | | | | | | -| 518. | [Coin Change II](https://leetcode.com/problems/coin-change-ii/) | [C++](./solutions/coin-change-ii/solution.hpp) | | | | | | -| 516. | [Longest Palindromic Subsequence](https://leetcode.com/problems/longest-palindromic-subsequence/) | [C++](./solutions/longest-palindromic-subsequence/solution.hpp) | | | | | | -| 515. | [Find Largest Value in Each Tree Row](https://leetcode.com/problems/find-largest-value-in-each-tree-row/) | [C++](./solutions/find-largest-value-in-each-tree-row/solution.hpp) | | | | | | -| 509. | [Fibonacci Number](https://leetcode.com/problems/fibonacci-number/) | [C++](./solutions/fibonacci-number/solution.hpp) | | | | | | -| 507. | [Perfect Number](https://leetcode.com/problems/perfect-number/) | [C++](./solutions/perfect-number/solution.hpp) | | | | | | -| 506. | [Relative Ranks](https://leetcode.com/problems/relative-ranks/) | [C++](./solutions/relative-ranks/solution.hpp) | | | | | | -| 504. | [Base 7](https://leetcode.com/problems/base-7/) | [C++](./solutions/base-7/solution.hpp) | | | | | | -| 503. | [Next Greater Element II](https://leetcode.com/problems/next-greater-element-ii/) | [C++](./solutions/next-greater-element-ii/solution.hpp) | | | | | | -| 502. | [IPO](https://leetcode.com/problems/ipo/) | [C++](./solutions/ipo/solution.hpp) | | | | | | -| 501. | [Find Mode in Binary Search Tree](https://leetcode.com/problems/find-mode-in-binary-search-tree/) | [C++](./solutions/find-mode-in-binary-search-tree/solution.hpp) | | | | | | -| 500. | [Keyboard Row](https://leetcode.com/problems/keyboard-row/) | [C++](./solutions/keyboard-row/solution.hpp) | | | | | | -| 496. | [Next Greater Element I](https://leetcode.com/problems/next-greater-element-i/) | [C++](./solutions/next-greater-element-i/solution.hpp) | | | | | | -| 495. | [Teemo Attacking](https://leetcode.com/problems/teemo-attacking/) | [C++](./solutions/teemo-attacking/solution.hpp) | | | | | | -| 492. | [Construct the Rectangle](https://leetcode.com/problems/construct-the-rectangle/) | [C++](./solutions/construct-the-rectangle/solution.hpp) | | | | | | -| 486. | [Predict the Winner](https://leetcode.com/problems/predict-the-winner/) | [C++](./solutions/predict-the-winner/solution.hpp) | | | | | | -| 485. | [Max Consecutive Ones](https://leetcode.com/problems/max-consecutive-ones/) | [C++](./solutions/max-consecutive-ones/solution.hpp) | | | | | | -| 482. | [License Key Formatting](https://leetcode.com/problems/license-key-formatting/) | [C++](./solutions/license-key-formatting/solution.hpp) | | | | | | -| 476. | [Number Complement](https://leetcode.com/problems/number-complement/) | [C++](./solutions/number-complement/solution.hpp) | | | | | | -| 463. | [Island Perimeter](https://leetcode.com/problems/island-perimeter/) | [C++](./solutions/island-perimeter/solution.hpp) | | | | | | -| 461. | [Hamming Distance](https://leetcode.com/problems/hamming-distance/) | [C++](./solutions/hamming-distance/solution.hpp) | | | | | | -| 459. | [Repeated Substring Pattern](https://leetcode.com/problems/repeated-substring-pattern/) | [C++](./solutions/repeated-substring-pattern/solution.hpp) | | | | | | -| 456. | [132 Pattern](https://leetcode.com/problems/132-pattern/) | [C++](./solutions/132-pattern/solution.hpp) | | | | | | -| 455. | [Assign Cookies](https://leetcode.com/problems/assign-cookies/) | [C++](./solutions/assign-cookies/solution.hpp) | | | | | | -| 452. | [Minimum Number of Arrows to Burst Balloons](https://leetcode.com/problems/minimum-number-of-arrows-to-burst-balloons/) | [C++](./solutions/minimum-number-of-arrows-to-burst-balloons/solution.hpp) | | | | | | -| 451. | [Sort Characters By Frequency](https://leetcode.com/problems/sort-characters-by-frequency/) | [C++](./solutions/sort-characters-by-frequency/solution.hpp) | | | | | | -| 450. | [Delete Node in a BST](https://leetcode.com/problems/delete-node-in-a-bst/) | [C++](./solutions/delete-node-in-a-bst/solution.hpp) | | | | | | -| 448. | [Find All Numbers Disappeared in an Array](https://leetcode.com/problems/find-all-numbers-disappeared-in-an-array/) | [C++](./solutions/find-all-numbers-disappeared-in-an-array/solution.hpp) | | | | | | -| 445. | [Add Two Numbers II](https://leetcode.com/problems/add-two-numbers-ii/) | [C++](./solutions/add-two-numbers-ii/solution.hpp) | | | | | | -| 443. | [String Compression](https://leetcode.com/problems/string-compression/) | [C++](./solutions/string-compression/solution.hpp) | | | | | | -| 441. | [Arranging Coins](https://leetcode.com/problems/arranging-coins/) | [C++](./solutions/arranging-coins/solution.hpp) | | | | | | -| 438. | [Find All Anagrams in a String](https://leetcode.com/problems/find-all-anagrams-in-a-string/) | [C++](./solutions/find-all-anagrams-in-a-string/solution.hpp) | | | | | | -| 437. | [Path Sum III](https://leetcode.com/problems/path-sum-iii/) | [C++](./solutions/path-sum-iii/solution.hpp) | | | | | | -| 436. | [Find Right Interval](https://leetcode.com/problems/find-right-interval/) | [C++](./solutions/find-right-interval/solution.hpp) | | | | | | -| 435. | [Non-overlapping Intervals](https://leetcode.com/problems/non-overlapping-intervals/) | [C++](./solutions/non-overlapping-intervals/solution.hpp) | | | | | | -| 434. | [Number of Segments in a String](https://leetcode.com/problems/number-of-segments-in-a-string/) | [C++](./solutions/number-of-segments-in-a-string/solution.hpp) | | | | | | -| 433. | [Minimum Genetic Mutation](https://leetcode.com/problems/minimum-genetic-mutation/) | [C++](./solutions/minimum-genetic-mutation/solution.hpp) | | | | | | -| 429. | [N-ary Tree Level Order Traversal](https://leetcode.com/problems/n-ary-tree-level-order-traversal/) | [C++](./solutions/n-ary-tree-level-order-traversal/solution.hpp) | | | | | | -| 427. | [Construct Quad Tree](https://leetcode.com/problems/construct-quad-tree/) | [C++](./solutions/construct-quad-tree/solution.hpp) | | | | | | -| 424. | [Longest Repeating Character Replacement](https://leetcode.com/problems/longest-repeating-character-replacement/) | [C++](./solutions/longest-repeating-character-replacement/solution.hpp) | | | | | | -| 417. | [Pacific Atlantic Water Flow](https://leetcode.com/problems/pacific-atlantic-water-flow/) | [C++](./solutions/pacific-atlantic-water-flow/solution.hpp) | | | | | | -| 416. | [Partition Equal Subset Sum](https://leetcode.com/problems/partition-equal-subset-sum/) | [C++](./solutions/partition-equal-subset-sum/solution.hpp) | | | | | | -| 415. | [Add Strings](https://leetcode.com/problems/add-strings/) | [C++](./solutions/add-strings/solution.hpp) | | | | | | -| 414. | [Third Maximum Number](https://leetcode.com/problems/third-maximum-number/) | [C++](./solutions/third-maximum-number/solution.hpp) | | | | | | -| 413. | [Arithmetic Slices](https://leetcode.com/problems/arithmetic-slices/) | [C++](./solutions/arithmetic-slices/solution.hpp) | | | | | | -| 412. | [Fizz Buzz](https://leetcode.com/problems/fizz-buzz/) | [C++](./solutions/fizz-buzz/solution.hpp) | | | | | | -| 409. | [Longest Palindrome](https://leetcode.com/problems/longest-palindrome/) | [C++](./solutions/longest-palindrome/solution.hpp) | | | | | | -| 405. | [Convert a Number to Hexadecimal](https://leetcode.com/problems/convert-a-number-to-hexadecimal/) | [C++](./solutions/convert-a-number-to-hexadecimal/solution.hpp) | | | | | | -| 404. | [Sum of Left Leaves](https://leetcode.com/problems/sum-of-left-leaves/) | [C++](./solutions/sum-of-left-leaves/solution.hpp) | | | | | | -| 403. | [Frog Jump](https://leetcode.com/problems/frog-jump/) | [C++](./solutions/frog-jump/solution.hpp) | | | | | | -| 401. | [Binary Watch](https://leetcode.com/problems/binary-watch/) | [C++](./solutions/binary-watch/solution.hpp) | | | | | | -| 399. | [Evaluate Division](https://leetcode.com/problems/evaluate-division/) | [C++](./solutions/evaluate-division/solution.hpp) | | | | | | -| 394. | [Decode String](https://leetcode.com/problems/decode-string/) | [C++](./solutions/decode-string/solution.hpp) | | | | | | -| 392. | [Is Subsequence](https://leetcode.com/problems/is-subsequence/) | [C++](./solutions/is-subsequence/solution.hpp) | | | | | | -| 389. | [Find the Difference](https://leetcode.com/problems/find-the-difference/) | [C++](./solutions/find-the-difference/solution.hpp) | | | | | | -| 387. | [First Unique Character in a String](https://leetcode.com/problems/first-unique-character-in-a-string/) | [C++](./solutions/first-unique-character-in-a-string/solution.hpp) | | | | | | -| 384. | [Shuffle an Array](https://leetcode.com/problems/shuffle-an-array/) | [C++](./solutions/shuffle-an-array/solution.hpp) | | | | | | -| 383. | [Ransom Note](https://leetcode.com/problems/ransom-note/) | [C++](./solutions/ransom-note/solution.hpp) | | | | | | -| 382. | [Linked List Random Node](https://leetcode.com/problems/linked-list-random-node/) | [C++](./solutions/linked-list-random-node/solution.hpp) | | | | | | -| 380. | [Insert Delete GetRandom O(1)](https://leetcode.com/problems/insert-delete-getrandom-o1/) | [C++](./solutions/insert-delete-getrandom-o1/solution.hpp) | | | | | | -| 377. | [Combination Sum IV](https://leetcode.com/problems/combination-sum-iv/) | [C++](./solutions/combination-sum-iv/solution.hpp) | | | | | | -| 376. | [Wiggle Subsequence](https://leetcode.com/problems/wiggle-subsequence/) | [C++](./solutions/wiggle-subsequence/solution.hpp) | | | | | | -| 374. | [Guess Number Higher or Lower](https://leetcode.com/problems/guess-number-higher-or-lower/) | [C++](./solutions/guess-number-higher-or-lower/solution.hpp) | | | | | | -| 373. | [Find K Pairs with Smallest Sums](https://leetcode.com/problems/find-k-pairs-with-smallest-sums/) | [C++](./solutions/find-k-pairs-with-smallest-sums/solution.hpp) | | | | | | -| 367. | [Valid Perfect Square](https://leetcode.com/problems/valid-perfect-square/) | [C++](./solutions/valid-perfect-square/solution.hpp) | | | | | | -| 365. | [Water and Jug Problem](https://leetcode.com/problems/water-and-jug-problem/) | [C++](./solutions/water-and-jug-problem/solution.hpp) | | | | | | -| 350. | [Intersection of Two Arrays II](https://leetcode.com/problems/intersection-of-two-arrays-ii/) | [C++](./solutions/intersection-of-two-arrays-ii/solution.hpp) | | | | | | -| 349. | [Intersection of Two Arrays](https://leetcode.com/problems/intersection-of-two-arrays/) | [C++](./solutions/intersection-of-two-arrays/solution.hpp) | | | | | | -| 347. | [Top K Frequent Elements](https://leetcode.com/problems/top-k-frequent-elements/) | [C++](./solutions/top-k-frequent-elements/solution.hpp) | | | | | | -| 345. | [Reverse Vowels of a String](https://leetcode.com/problems/reverse-vowels-of-a-string/) | [C++](./solutions/reverse-vowels-of-a-string/solution.hpp) | | | | | | -| 344. | [Reverse String](https://leetcode.com/problems/reverse-string/) | [C++](./solutions/reverse-string/solution.hpp) | | | | | | -| 343. | [Integer Break](https://leetcode.com/problems/integer-break/) | [C++](./solutions/integer-break/solution.hpp) | | | | | | -| 342. | [Power of Four](https://leetcode.com/problems/power-of-four/) | [C++](./solutions/power-of-four/solution.hpp) | | | | | | -| 341. | [Flatten Nested List Iterator](https://leetcode.com/problems/flatten-nested-list-iterator/) | [C++](./solutions/flatten-nested-list-iterator/solution.hpp) | | | | | | -| 338. | [Counting Bits](https://leetcode.com/problems/counting-bits/) | [C++](./solutions/counting-bits/solution.hpp) | | | | | | -| 334. | [Increasing Triplet Subsequence](https://leetcode.com/problems/increasing-triplet-subsequence/) | [C++](./solutions/increasing-triplet-subsequence/solution.hpp) | | | | | | -| 332. | [Reconstruct Itinerary](https://leetcode.com/problems/reconstruct-itinerary/) | [C++](./solutions/reconstruct-itinerary/solution.hpp) | | | | | | -| 328. | [Odd Even Linked List](https://leetcode.com/problems/odd-even-linked-list/) | [C++](./solutions/odd-even-linked-list/solution.hpp) | | | | | | -| 326. | [Power of Three](https://leetcode.com/problems/power-of-three/) | [C++](./solutions/power-of-three/solution.hpp) | | | | | | -| 322. | [Coin Change](https://leetcode.com/problems/coin-change/) | [C++](./solutions/coin-change/solution.hpp) | | | | | | -| 319. | [Bulb Switcher](https://leetcode.com/problems/bulb-switcher/) | [C++](./solutions/bulb-switcher/solution.hpp) | | | | | | -| 316. | [Remove Duplicate Letters](https://leetcode.com/problems/remove-duplicate-letters/) | [C++](./solutions/remove-duplicate-letters/solution.hpp) | | | | | | -| 309. | [Best Time to Buy and Sell Stock with Cooldown](https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-cooldown/) | [C++](./solutions/best-time-to-buy-and-sell-stock-with-cooldown/solution.hpp) | | | | | | -| 304. | [Range Sum Query 2D - Immutable](https://leetcode.com/problems/range-sum-query-2d-immutable/) | [C++](./solutions/range-sum-query-2d-immutable/solution.hpp) | | | | | | -| 303. | [Range Sum Query - Immutable](https://leetcode.com/problems/range-sum-query-immutable/) | [C++](./solutions/range-sum-query-immutable/solution.hpp) | | | | | | -| 300. | [Longest Increasing Subsequence](https://leetcode.com/problems/longest-increasing-subsequence/) | [C++](./solutions/longest-increasing-subsequence/solution.hpp) | | | | | | -| 299. | [Bulls and Cows](https://leetcode.com/problems/bulls-and-cows/) | [C++](./solutions/bulls-and-cows/solution.hpp) | | | | | | -| 297. | [Serialize and Deserialize Binary Tree](https://leetcode.com/problems/serialize-and-deserialize-binary-tree/) | [C++](./solutions/serialize-and-deserialize-binary-tree/solution.hpp) | | | | | | -| 295. | [Find Median from Data Stream](https://leetcode.com/problems/find-median-from-data-stream/) | [C++](./solutions/find-median-from-data-stream/solution.hpp) | | | | | | -| 292. | [Nim Game](https://leetcode.com/problems/nim-game/) | [C++](./solutions/nim-game/solution.hpp) | | | | | | -| 290. | [Word Pattern](https://leetcode.com/problems/word-pattern/) | [C++](./solutions/word-pattern/solution.hpp) | | | | | | -| 289. | [Game of Life](https://leetcode.com/problems/game-of-life/) | [C++](./solutions/game-of-life/solution.hpp) | | | | | | -| 287. | [Find the Duplicate Number](https://leetcode.com/problems/find-the-duplicate-number/) | [C++](./solutions/find-the-duplicate-number/solution.hpp) | | | | | | -| 283. | [Move Zeroes](https://leetcode.com/problems/move-zeroes/) | [C++](./solutions/move-zeroes/solution.hpp) | | | | | | -| 279. | [Perfect Squares](https://leetcode.com/problems/perfect-squares/) | [C++](./solutions/perfect-squares/solution.hpp) | | | | | | -| 278. | [First Bad Version](https://leetcode.com/problems/first-bad-version/) | [C++](./solutions/first-bad-version/solution.hpp) | | | | | | -| 275. | [H-Index II](https://leetcode.com/problems/h-index-ii/) | [C++](./solutions/h-index-ii/solution.hpp) | | | | | | -| 274. | [H-Index](https://leetcode.com/problems/h-index/) | [C++](./solutions/h-index/solution.hpp) | | | | | | -| 268. | [Missing Number](https://leetcode.com/problems/missing-number/) | [C++](./solutions/missing-number/solution.hpp) | | | | | | -| 264. | [Ugly Number II](https://leetcode.com/problems/ugly-number-ii/) | [C++](./solutions/ugly-number-ii/solution.hpp) | | | | | | -| 263. | [Ugly Number](https://leetcode.com/problems/ugly-number/) | [C++](./solutions/ugly-number/solution.hpp) | | | | | | -| 260. | [Single Number III](https://leetcode.com/problems/single-number-iii/) | [C++](./solutions/single-number-iii/solution.hpp) | | | | | | -| 258. | [Add Digits](https://leetcode.com/problems/add-digits/) | [C++](./solutions/add-digits/solution.hpp) | | | | | | -| 257. | [Binary Tree Paths](https://leetcode.com/problems/binary-tree-paths/) | [C++](./solutions/binary-tree-paths/solution.hpp) | | | | | | -| 242. | [Valid Anagram](https://leetcode.com/problems/valid-anagram/) | [C++](./solutions/valid-anagram/solution.hpp) | | | | | | -| 240. | [Search a 2D Matrix II](https://leetcode.com/problems/search-a-2d-matrix-ii/) | [C++](./solutions/search-a-2d-matrix-ii/solution.hpp) | | | | | | -| 239. | [Sliding Window Maximum](https://leetcode.com/problems/sliding-window-maximum/) | [C++](./solutions/sliding-window-maximum/solution.hpp) | | | | | | -| 238. | [Product of Array Except Self](https://leetcode.com/problems/product-of-array-except-self/) | [C++](./solutions/product-of-array-except-self/solution.hpp) | | | | | | -| 237. | [Delete Node in a Linked List](https://leetcode.com/problems/delete-node-in-a-linked-list/) | [C++](./solutions/delete-node-in-a-linked-list/solution.hpp) | | | | | | -| 236. | [Lowest Common Ancestor of a Binary Tree](https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree/) | [C++](./solutions/lowest-common-ancestor-of-a-binary-tree/solution.hpp) | | | | | | -| 235. | [Lowest Common Ancestor of a Binary Search Tree](https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree/) | [C++](./solutions/lowest-common-ancestor-of-a-binary-search-tree/solution.hpp) | | | | | | -| 234. | [Palindrome Linked List](https://leetcode.com/problems/palindrome-linked-list/) | [C++](./solutions/palindrome-linked-list/solution.hpp) | | | | | | -| 233. | [Number of Digit One](https://leetcode.com/problems/number-of-digit-one/) | [C++](./solutions/number-of-digit-one/solution.hpp) | | | | | | -| 232. | [Implement Queue using Stacks](https://leetcode.com/problems/implement-queue-using-stacks/) | [C++](./solutions/implement-queue-using-stacks/solution.hpp) | | | | | | -| 231. | [Power of Two](https://leetcode.com/problems/power-of-two/) | [C++](./solutions/power-of-two/solution.hpp) | | | | | | -| 230. | [Kth Smallest Element in a BST](https://leetcode.com/problems/kth-smallest-element-in-a-bst/) | [C++](./solutions/kth-smallest-element-in-a-bst/solution.hpp) | | | | | | -| 229. | [Majority Element II](https://leetcode.com/problems/majority-element-ii/) | [C++](./solutions/majority-element-ii/solution.hpp) | | | | | | -| 228. | [Summary Ranges](https://leetcode.com/problems/summary-ranges/) | [C++](./solutions/summary-ranges/solution.hpp) | | | | | | -| 227. | [Basic Calculator II](https://leetcode.com/problems/basic-calculator-ii/) | [C++](./solutions/basic-calculator-ii/solution.hpp) | | | | | | -| 226. | [Invert Binary Tree](https://leetcode.com/problems/invert-binary-tree/) | [C++](./solutions/invert-binary-tree/solution.hpp) | | | | | | -| 225. | [Implement Stack using Queues](https://leetcode.com/problems/implement-stack-using-queues/) | [C++](./solutions/implement-stack-using-queues/solution.hpp) | | | | | | -| 224. | [Basic Calculator](https://leetcode.com/problems/basic-calculator/) | [C++](./solutions/basic-calculator/solution.hpp) | | | | | | -| 222. | [Count Complete Tree Nodes](https://leetcode.com/problems/count-complete-tree-nodes/) | [C++](./solutions/count-complete-tree-nodes/solution.hpp) | | | | | | -| 221. | [Maximal Square](https://leetcode.com/problems/maximal-square/) | [C++](./solutions/maximal-square/solution.hpp) | | | | | | -| 219. | [Contains Duplicate II](https://leetcode.com/problems/contains-duplicate-ii/) | [C++](./solutions/contains-duplicate-ii/solution.hpp) | | | | | | -| 217. | [Contains Duplicate](https://leetcode.com/problems/contains-duplicate/) | [C++](./solutions/contains-duplicate/solution.hpp) | | | | | | -| 216. | [Combination Sum III](https://leetcode.com/problems/combination-sum-iii/) | [C++](./solutions/combination-sum-iii/solution.hpp) | | | | | | -| 215. | [Kth Largest Element in an Array](https://leetcode.com/problems/kth-largest-element-in-an-array/) | [C++](./solutions/kth-largest-element-in-an-array/solution.hpp) | | | | | | -| 213. | [House Robber II](https://leetcode.com/problems/house-robber-ii/) | [C++](./solutions/house-robber-ii/solution.hpp) | | | | | | -| 212. | [Word Search II](https://leetcode.com/problems/word-search-ii/) | [C++](./solutions/word-search-ii/solution.hpp) | | | | | | -| 211. | [Design Add and Search Words Data Structure](https://leetcode.com/problems/design-add-and-search-words-data-structure/) | [C++](./solutions/design-add-and-search-words-data-structure/solution.hpp) | | | | | | -| 210. | [Course Schedule II](https://leetcode.com/problems/course-schedule-ii/) | [C++](./solutions/course-schedule-ii/solution.hpp) | | | | | | -| 209. | [Minimum Size Subarray Sum](https://leetcode.com/problems/minimum-size-subarray-sum/) | [C++](./solutions/minimum-size-subarray-sum/solution.hpp) | | | | | | -| 208. | [Implement Trie (Prefix Tree)](https://leetcode.com/problems/implement-trie-prefix-tree/) | [C++](./solutions/implement-trie-prefix-tree/solution.hpp) | | | | | | -| 207. | [Course Schedule](https://leetcode.com/problems/course-schedule/) | [C++](./solutions/course-schedule/solution.hpp) | | | | | | -| 206. | [Reverse Linked List](https://leetcode.com/problems/reverse-linked-list/) | [C++](./solutions/reverse-linked-list/solution.hpp) | | | | | | -| 205. | [Isomorphic Strings](https://leetcode.com/problems/isomorphic-strings/) | [C++](./solutions/isomorphic-strings/solution.hpp) | | | | | | -| 203. | [Remove Linked List Elements](https://leetcode.com/problems/remove-linked-list-elements/) | [C++](./solutions/remove-linked-list-elements/solution.hpp) | | | | | | -| 202. | [Happy Number](https://leetcode.com/problems/happy-number/) | [C++](./solutions/happy-number/solution.hpp) | | | | | | -| 201. | [Bitwise AND of Numbers Range](https://leetcode.com/problems/bitwise-and-of-numbers-range/) | [C++](./solutions/bitwise-and-of-numbers-range/solution.hpp) | | | | | | -| 200. | [Number of Islands](https://leetcode.com/problems/number-of-islands/) | [C++](./solutions/number-of-islands/solution.hpp) | | | | | | -| 199. | [Binary Tree Right Side View](https://leetcode.com/problems/binary-tree-right-side-view/) | [C++](./solutions/binary-tree-right-side-view/solution.hpp) | | | | | | -| 198. | [House Robber](https://leetcode.com/problems/house-robber/) | [C++](./solutions/house-robber/solution.hpp) | | | | | | -| 191. | [Number of 1 Bits](https://leetcode.com/problems/number-of-1-bits/) | [C++](./solutions/number-of-1-bits/solution.hpp) | | | | | | -| 190. | [Reverse Bits](https://leetcode.com/problems/reverse-bits/) | [C++](./solutions/reverse-bits/solution.hpp) | | | | | | -| 189. | [Rotate Array](https://leetcode.com/problems/rotate-array/) | [C++](./solutions/rotate-array/solution.hpp) | | | | | | -| 188. | [Best Time to Buy and Sell Stock IV](https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iv/) | [C++](./solutions/best-time-to-buy-and-sell-stock-iv/solution.hpp) | | | | | | -| 187. | [Repeated DNA Sequences](https://leetcode.com/problems/repeated-dna-sequences/) | [C++](./solutions/repeated-dna-sequences/solution.hpp) | | | | | | -| 173. | [Binary Search Tree Iterator](https://leetcode.com/problems/binary-search-tree-iterator/) | [C++](./solutions/binary-search-tree-iterator/solution.hpp) | | | | | | -| 172. | [Factorial Trailing Zeroes](https://leetcode.com/problems/factorial-trailing-zeroes/) | [C++](./solutions/factorial-trailing-zeroes/solution.hpp) | | | | | | -| 171. | [Excel Sheet Column Number](https://leetcode.com/problems/excel-sheet-column-number/) | [C++](./solutions/excel-sheet-column-number/solution.hpp) | | | | | | -| 169. | [Majority Element](https://leetcode.com/problems/majority-element/) | [C++](./solutions/majority-element/solution.hpp) | | | | | | -| 168. | [Excel Sheet Column Title](https://leetcode.com/problems/excel-sheet-column-title/) | [C++](./solutions/excel-sheet-column-title/solution.hpp) | | | | | | -| 167. | [Two Sum II - Input Array Is Sorted](https://leetcode.com/problems/two-sum-ii-input-array-is-sorted/) | [C++](./solutions/two-sum-ii-input-array-is-sorted/solution.hpp) | | | | | | -| 162. | [Find Peak Element](https://leetcode.com/problems/find-peak-element/) | [C++](./solutions/find-peak-element/solution.hpp) | | | | | | -| 160. | [Intersection of Two Linked Lists](https://leetcode.com/problems/intersection-of-two-linked-lists/) | [C++](./solutions/intersection-of-two-linked-lists/solution.hpp) | | | | | | -| 155. | [Min Stack](https://leetcode.com/problems/min-stack/) | [C++](./solutions/min-stack/solution.hpp) | | | | | | -| 154. | [Find Minimum in Rotated Sorted Array II](https://leetcode.com/problems/find-minimum-in-rotated-sorted-array-ii/) | [C++](./solutions/find-minimum-in-rotated-sorted-array-ii/solution.hpp) | | | | | | -| 153. | [Find Minimum in Rotated Sorted Array](https://leetcode.com/problems/find-minimum-in-rotated-sorted-array/) | [C++](./solutions/find-minimum-in-rotated-sorted-array/solution.hpp) | | | | | | -| 152. | [Maximum Product Subarray](https://leetcode.com/problems/maximum-product-subarray/) | [C++](./solutions/maximum-product-subarray/solution.hpp) | | | | | | -| 151. | [Reverse Words in a String](https://leetcode.com/problems/reverse-words-in-a-string/) | [C++](./solutions/reverse-words-in-a-string/solution.hpp) | | | | | | -| 150. | [Evaluate Reverse Polish Notation](https://leetcode.com/problems/evaluate-reverse-polish-notation/) | [C++](./solutions/evaluate-reverse-polish-notation/solution.hpp) | | | | | | -| 149. | [Max Points on a Line](https://leetcode.com/problems/max-points-on-a-line/) | [C++](./solutions/max-points-on-a-line/solution.hpp) | | | | | | -| 148. | [Sort List](https://leetcode.com/problems/sort-list/) | [C++](./solutions/sort-list/solution.hpp) | | | | | | -| 146. | [LRU Cache](https://leetcode.com/problems/lru-cache/) | [C++](./solutions/lru-cache/solution.hpp) | | | | | | -| 145. | [Binary Tree Postorder Traversal](https://leetcode.com/problems/binary-tree-postorder-traversal/) | [C++](./solutions/binary-tree-postorder-traversal/solution.hpp) | | | | | | -| 144. | [Binary Tree Preorder Traversal](https://leetcode.com/problems/binary-tree-preorder-traversal/) | [C++](./solutions/binary-tree-preorder-traversal/solution.hpp) | | | | | | -| 143. | [Reorder List](https://leetcode.com/problems/reorder-list/) | [C++](./solutions/reorder-list/solution.hpp) | | | | | | -| 142. | [Linked List Cycle II](https://leetcode.com/problems/linked-list-cycle-ii/) | [C++](./solutions/linked-list-cycle-ii/solution.hpp) | | | | | | -| 141. | [Linked List Cycle](https://leetcode.com/problems/linked-list-cycle/) | [C++](./solutions/linked-list-cycle/solution.hpp) | | | | | | -| 139. | [Word Break](https://leetcode.com/problems/word-break/) | [C++](./solutions/word-break/solution.hpp) | | | | | | -| 138. | [Copy List with Random Pointer](https://leetcode.com/problems/copy-list-with-random-pointer/) | [C++](./solutions/copy-list-with-random-pointer/solution.hpp) | | | | | | -| 137. | [Single Number II](https://leetcode.com/problems/single-number-ii/) | [C++](./solutions/single-number-ii/solution.hpp) | | | | | | -| 136. | [Single Number](https://leetcode.com/problems/single-number/) | [C++](./solutions/single-number/solution.hpp) | | | | | | -| 135. | [Candy](https://leetcode.com/problems/candy/) | [C++](./solutions/candy/solution.hpp) | | | | | | -| 134. | [Gas Station](https://leetcode.com/problems/gas-station/) | [C++](./solutions/gas-station/solution.hpp) | | | | | | -| 133. | [Clone Graph](https://leetcode.com/problems/clone-graph/) | [C++](./solutions/clone-graph/solution.hpp) | | | | | | -| 131. | [Palindrome Partitioning](https://leetcode.com/problems/palindrome-partitioning/) | [C++](./solutions/palindrome-partitioning/solution.hpp) | | | | | | -| 130. | [Surrounded Regions](https://leetcode.com/problems/surrounded-regions/) | [C++](./solutions/surrounded-regions/solution.hpp) | | | | | | -| 129. | [Sum Root to Leaf Numbers](https://leetcode.com/problems/sum-root-to-leaf-numbers/) | [C++](./solutions/sum-root-to-leaf-numbers/solution.hpp) | | | | | | -| 128. | [Longest Consecutive Sequence](https://leetcode.com/problems/longest-consecutive-sequence/) | [C++](./solutions/longest-consecutive-sequence/solution.hpp) | | | | | | -| 127. | [Word Ladder](https://leetcode.com/problems/word-ladder/) | [C++](./solutions/word-ladder/solution.hpp) | | | | | | -| 126. | [Word Ladder II](https://leetcode.com/problems/word-ladder-ii/) | [C++](./solutions/word-ladder-ii/solution.hpp) | | | | | | -| 125. | [Valid Palindrome](https://leetcode.com/problems/valid-palindrome/) | [C++](./solutions/valid-palindrome/solution.hpp) | | | | | | -| 124. | [Binary Tree Maximum Path Sum](https://leetcode.com/problems/binary-tree-maximum-path-sum/) | [C++](./solutions/binary-tree-maximum-path-sum/solution.hpp) | | | | | | -| 123. | [Best Time to Buy and Sell Stock III](https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iii/) | [C++](./solutions/best-time-to-buy-and-sell-stock-iii/solution.hpp) | | | | | | -| 122. | [Best Time to Buy and Sell Stock II](https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii/) | [C++](./solutions/best-time-to-buy-and-sell-stock-ii/solution.hpp) | | | | | | -| 121. | [Best Time to Buy and Sell Stock](https://leetcode.com/problems/best-time-to-buy-and-sell-stock/) | [C++](./solutions/best-time-to-buy-and-sell-stock/solution.hpp) | | | | | | -| 120. | [Triangle](https://leetcode.com/problems/triangle/) | [C++](./solutions/triangle/solution.hpp) | | | | | | -| 119. | [Pascal's Triangle II](https://leetcode.com/problems/pascals-triangle-ii/) | [C++](./solutions/pascals-triangle-ii/solution.hpp) | | | | | | -| 118. | [Pascal's Triangle](https://leetcode.com/problems/pascals-triangle/) | [C++](./solutions/pascals-triangle/solution.hpp) | | | | | | -| 117. | [Populating Next Right Pointers in Each Node II](https://leetcode.com/problems/populating-next-right-pointers-in-each-node-ii/) | [C++](./solutions/populating-next-right-pointers-in-each-node-ii/solution.hpp) | | | | | | -| 116. | [Populating Next Right Pointers in Each Node](https://leetcode.com/problems/populating-next-right-pointers-in-each-node/) | [C++](./solutions/populating-next-right-pointers-in-each-node/solution.hpp) | | | | | | -| 115. | [Distinct Subsequences](https://leetcode.com/problems/distinct-subsequences/) | [C++](./solutions/distinct-subsequences/solution.hpp) | | | | | | -| 114. | [Flatten Binary Tree to Linked List](https://leetcode.com/problems/flatten-binary-tree-to-linked-list/) | [C++](./solutions/flatten-binary-tree-to-linked-list/solution.hpp) | | | | | | -| 113. | [Path Sum II](https://leetcode.com/problems/path-sum-ii/) | [C++](./solutions/path-sum-ii/solution.hpp) | | | | | | -| 112. | [Path Sum](https://leetcode.com/problems/path-sum/) | [C++](./solutions/path-sum/solution.hpp) | | | | | | -| 111. | [Minimum Depth of Binary Tree](https://leetcode.com/problems/minimum-depth-of-binary-tree/) | [C++](./solutions/minimum-depth-of-binary-tree/solution.hpp) | | | | | | -| 110. | [Balanced Binary Tree](https://leetcode.com/problems/balanced-binary-tree/) | [C++](./solutions/balanced-binary-tree/solution.hpp) | | | | | | -| 109. | [Convert Sorted List to Binary Search Tree](https://leetcode.com/problems/convert-sorted-list-to-binary-search-tree/) | [C++](./solutions/convert-sorted-list-to-binary-search-tree/solution.hpp) | | | | | | -| 108. | [Convert Sorted Array to Binary Search Tree](https://leetcode.com/problems/convert-sorted-array-to-binary-search-tree/) | [C++](./solutions/convert-sorted-array-to-binary-search-tree/solution.hpp) | | | | | | -| 106. | [Construct Binary Tree from Inorder and Postorder Traversal](https://leetcode.com/problems/construct-binary-tree-from-inorder-and-postorder-traversal/) | [C++](./solutions/construct-binary-tree-from-inorder-and-postorder-traversal/solution.hpp) | | | | | | -| 105. | [Construct Binary Tree from Preorder and Inorder Traversal](https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/) | [C++](./solutions/construct-binary-tree-from-preorder-and-inorder-traversal/solution.hpp) | | | | | | -| 104. | [Maximum Depth of Binary Tree](https://leetcode.com/problems/maximum-depth-of-binary-tree/) | [C++](./solutions/maximum-depth-of-binary-tree/solution.hpp) | | | | | | -| 103. | [Binary Tree Zigzag Level Order Traversal](https://leetcode.com/problems/binary-tree-zigzag-level-order-traversal/) | [C++](./solutions/binary-tree-zigzag-level-order-traversal/solution.hpp) | | | | | | -| 102. | [Binary Tree Level Order Traversal](https://leetcode.com/problems/binary-tree-level-order-traversal/) | [C++](./solutions/binary-tree-level-order-traversal/solution.hpp) | | | | | | -| 101. | [Symmetric Tree](https://leetcode.com/problems/symmetric-tree/) | [C++](./solutions/symmetric-tree/solution.hpp) | | | | | | -| 100. | [Same Tree](https://leetcode.com/problems/same-tree/) | [C++](./solutions/same-tree/solution.hpp) | | | | | | -| 99. | [Recover Binary Search Tree](https://leetcode.com/problems/recover-binary-search-tree/) | [C++](./solutions/recover-binary-search-tree/solution.hpp) | | | | | | -| 98. | [Validate Binary Search Tree](https://leetcode.com/problems/validate-binary-search-tree/) | [C++](./solutions/validate-binary-search-tree/solution.hpp) | | | | | | -| 97. | [Interleaving String](https://leetcode.com/problems/interleaving-string/) | [C++](./solutions/interleaving-string/solution.hpp) | | | | | | -| 96. | [Unique Binary Search Trees](https://leetcode.com/problems/unique-binary-search-trees/) | [C++](./solutions/unique-binary-search-trees/solution.hpp) | | | | | | -| 95. | [Unique Binary Search Trees II](https://leetcode.com/problems/unique-binary-search-trees-ii/) | [C++](./solutions/unique-binary-search-trees-ii/solution.hpp) | | | | | | -| 94. | [Binary Tree Inorder Traversal](https://leetcode.com/problems/binary-tree-inorder-traversal/) | [C++](./solutions/binary-tree-inorder-traversal/solution.hpp) | | | | | | -| 93. | [Restore IP Addresses](https://leetcode.com/problems/restore-ip-addresses/) | [C++](./solutions/restore-ip-addresses/solution.hpp) | | | | | | -| 92. | [Reverse Linked List II](https://leetcode.com/problems/reverse-linked-list-ii/) | [C++](./solutions/reverse-linked-list-ii/solution.hpp) | | | | | | -| 91. | [Decode Ways](https://leetcode.com/problems/decode-ways/) | [C++](./solutions/decode-ways/solution.hpp) | | | | | | -| 90. | [Subsets II](https://leetcode.com/problems/subsets-ii/) | [C++](./solutions/subsets-ii/solution.hpp) | | | | | | -| 89. | [Gray Code](https://leetcode.com/problems/gray-code/) | [C++](./solutions/gray-code/solution.hpp) | | | | | | -| 88. | [Merge Sorted Array](https://leetcode.com/problems/merge-sorted-array/) | [C++](./solutions/merge-sorted-array/solution.hpp) | | | | | | -| 87. | [Scramble String](https://leetcode.com/problems/scramble-string/) | [C++](./solutions/scramble-string/solution.hpp) | | | | | | -| 86. | [Partition List](https://leetcode.com/problems/partition-list/) | [C++](./solutions/partition-list/solution.hpp) | | | | | | -| 85. | [Maximal Rectangle](https://leetcode.com/problems/maximal-rectangle/) | [C++](./solutions/maximal-rectangle/solution.hpp) | | | | | | -| 84. | [Largest Rectangle in Histogram](https://leetcode.com/problems/largest-rectangle-in-histogram/) | [C++](./solutions/largest-rectangle-in-histogram/solution.hpp) | | | | | | -| 83. | [Remove Duplicates from Sorted List](https://leetcode.com/problems/remove-duplicates-from-sorted-list/) | [C++](./solutions/remove-duplicates-from-sorted-list/solution.hpp) | | | | | | -| 82. | [Remove Duplicates from Sorted List II](https://leetcode.com/problems/remove-duplicates-from-sorted-list-ii/) | [C++](./solutions/remove-duplicates-from-sorted-list-ii/solution.hpp) | | | | | | -| 81. | [Search in Rotated Sorted Array II](https://leetcode.com/problems/search-in-rotated-sorted-array-ii/) | [C++](./solutions/search-in-rotated-sorted-array-ii/solution.hpp) | | | | | | -| 80. | [Remove Duplicates from Sorted Array II](https://leetcode.com/problems/remove-duplicates-from-sorted-array-ii/) | [C++](./solutions/remove-duplicates-from-sorted-array-ii/solution.hpp) | | | | | | -| 79. | [Word Search](https://leetcode.com/problems/word-search/) | [C++](./solutions/word-search/solution.hpp) | | | | | | -| 78. | [Subsets](https://leetcode.com/problems/subsets/) | [C++](./solutions/subsets/solution.hpp) | | | | | | -| 77. | [Combinations](https://leetcode.com/problems/combinations/) | [C++](./solutions/combinations/solution.hpp) | | | | | | -| 76. | [Minimum Window Substring](https://leetcode.com/problems/minimum-window-substring/) | [C++](./solutions/minimum-window-substring/solution.hpp) | | | | | | -| 75. | [Sort Colors](https://leetcode.com/problems/sort-colors/) | [C++](./solutions/sort-colors/solution.hpp) | | | | | | -| 74. | [Search a 2D Matrix](https://leetcode.com/problems/search-a-2d-matrix/) | [C++](./solutions/search-a-2d-matrix/solution.hpp) | | | | | | -| 73. | [Set Matrix Zeroes](https://leetcode.com/problems/set-matrix-zeroes/) | [C++](./solutions/set-matrix-zeroes/solution.hpp) | | | | | | -| 72. | [Edit Distance](https://leetcode.com/problems/edit-distance/) | [C++](./solutions/edit-distance/solution.hpp) | | | | | | -| 71. | [Simplify Path](https://leetcode.com/problems/simplify-path/) | [C++](./solutions/simplify-path/solution.hpp) | | | | | | -| 70. | [Climbing Stairs](https://leetcode.com/problems/climbing-stairs/) | [C++](./solutions/climbing-stairs/solution.hpp) | | | | | | -| 69. | [Sqrt(x)](https://leetcode.com/problems/sqrtx/) | [C++](./solutions/sqrtx/solution.hpp) | | | | | | -| 68. | [Text Justification](https://leetcode.com/problems/text-justification/) | [C++](./solutions/text-justification/solution.hpp) | | | | | | -| 67. | [Add Binary](https://leetcode.com/problems/add-binary/) | [C++](./solutions/add-binary/solution.hpp) | | | | | | -| 66. | [Plus One](https://leetcode.com/problems/plus-one/) | [C++](./solutions/plus-one/solution.hpp) | | | | | | -| 65. | [Valid Number](https://leetcode.com/problems/valid-number/) | [C++](./solutions/valid-number/solution.hpp) | | | | | | -| 64. | [Minimum Path Sum](https://leetcode.com/problems/minimum-path-sum/) | [C++](./solutions/minimum-path-sum/solution.hpp) | | | | | | -| 63. | [Unique Paths II](https://leetcode.com/problems/unique-paths-ii/) | [C++](./solutions/unique-paths-ii/solution.hpp) | | | | | | -| 62. | [Unique Paths](https://leetcode.com/problems/unique-paths/) | [C++](./solutions/unique-paths/solution.hpp) | | | | | | -| 61. | [Rotate List](https://leetcode.com/problems/rotate-list/) | [C++](./solutions/rotate-list/solution.hpp) | | | | | | -| 60. | [Permutation Sequence](https://leetcode.com/problems/permutation-sequence/) | [C++](./solutions/permutation-sequence/solution.hpp) | | | | | | -| 59. | [Spiral Matrix II](https://leetcode.com/problems/spiral-matrix-ii/) | [C++](./solutions/spiral-matrix-ii/solution.hpp) | | | | | | -| 58. | [Length of Last Word](https://leetcode.com/problems/length-of-last-word/) | [C++](./solutions/length-of-last-word/solution.hpp) | | | | | | -| 57. | [Insert Interval](https://leetcode.com/problems/insert-interval/) | [C++](./solutions/insert-interval/solution.hpp) | | | | | | -| 56. | [Merge Intervals](https://leetcode.com/problems/merge-intervals/) | [C++](./solutions/merge-intervals/solution.hpp) | | | | | | -| 55. | [Jump Game](https://leetcode.com/problems/jump-game/) | [C++](./solutions/jump-game/solution.hpp) | | | | | | -| 54. | [Spiral Matrix](https://leetcode.com/problems/spiral-matrix/) | [C++](./solutions/spiral-matrix/solution.hpp) | | | | | | -| 53. | [Maximum Subarray](https://leetcode.com/problems/maximum-subarray/) | [C++](./solutions/maximum-subarray/solution.hpp) | | | | | | -| 52. | [N-Queens II](https://leetcode.com/problems/n-queens-ii/) | [C++](./solutions/n-queens-ii/solution.hpp) | | | | | | -| 51. | [N-Queens](https://leetcode.com/problems/n-queens/) | [C++](./solutions/n-queens/solution.hpp) | | | | | | -| 50. | [Pow(x, n)](https://leetcode.com/problems/powx-n/) | [C++](./solutions/powx-n/solution.hpp) | | | | | | -| 49. | [Group Anagrams](https://leetcode.com/problems/group-anagrams/) | [C++](./solutions/group-anagrams/solution.hpp) | | | | | | -| 48. | [Rotate Image](https://leetcode.com/problems/rotate-image/) | [C++](./solutions/rotate-image/solution.hpp) | | | | | | -| 47. | [Permutations II](https://leetcode.com/problems/permutations-ii/) | [C++](./solutions/permutations-ii/solution.hpp) | | | | | | -| 46. | [Permutations](https://leetcode.com/problems/permutations/) | [C++](./solutions/permutations/solution.hpp) | | | | | | -| 45. | [Jump Game II](https://leetcode.com/problems/jump-game-ii/) | [C++](./solutions/jump-game-ii/solution.hpp) | | | | | | -| 44. | [Wildcard Matching](https://leetcode.com/problems/wildcard-matching/) | [C++](./solutions/wildcard-matching/solution.hpp) | | | | | | -| 43. | [Multiply Strings](https://leetcode.com/problems/multiply-strings/) | [C++](./solutions/multiply-strings/solution.hpp) | | | | | | -| 42. | [Trapping Rain Water](https://leetcode.com/problems/trapping-rain-water/) | [C++](./solutions/trapping-rain-water/solution.hpp) | | | | | | -| 41. | [First Missing Positive](https://leetcode.com/problems/first-missing-positive/) | [C++](./solutions/first-missing-positive/solution.hpp) | | | | | | -| 40. | [Combination Sum II](https://leetcode.com/problems/combination-sum-ii/) | [C++](./solutions/combination-sum-ii/solution.hpp) | | | | | | -| 39. | [Combination Sum](https://leetcode.com/problems/combination-sum/) | [C++](./solutions/combination-sum/solution.hpp) | | | | | | -| 38. | [Count and Say](https://leetcode.com/problems/count-and-say/) | [C++](./solutions/count-and-say/solution.hpp) | | | | | | -| 37. | [Sudoku Solver](https://leetcode.com/problems/sudoku-solver/) | [C++](./solutions/sudoku-solver/solution.hpp) | | | | | | -| 36. | [Valid Sudoku](https://leetcode.com/problems/valid-sudoku/) | [C++](./solutions/valid-sudoku/solution.hpp) | | | | | | -| 35. | [Search Insert Position](https://leetcode.com/problems/search-insert-position/) | [C++](./solutions/search-insert-position/solution.hpp) | | | | | | -| 34. | [Find First and Last Position of Element in Sorted Array](https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array/) | [C++](./solutions/find-first-and-last-position-of-element-in-sorted-array/solution.hpp) | | | | | | -| 33. | [Search in Rotated Sorted Array](https://leetcode.com/problems/search-in-rotated-sorted-array/) | [C++](./solutions/search-in-rotated-sorted-array/solution.hpp) | | | | | | -| 32. | [Longest Valid Parentheses](https://leetcode.com/problems/longest-valid-parentheses/) | [C++](./solutions/longest-valid-parentheses/solution.hpp) | | | | | | -| 31. | [Next Permutation](https://leetcode.com/problems/next-permutation/) | [C++](./solutions/next-permutation/solution.hpp) | | | | | | -| 30. | [Substring with Concatenation of All Words](https://leetcode.com/problems/substring-with-concatenation-of-all-words/) | [C++](./solutions/substring-with-concatenation-of-all-words/solution.hpp) | | | | | | -| 28. | [Find the Index of the First Occurrence in a String](https://leetcode.com/problems/find-the-index-of-the-first-occurrence-in-a-string/) | [C++](./solutions/find-the-index-of-the-first-occurrence-in-a-string/solution.hpp) | | | | | | -| 27. | [Remove Element](https://leetcode.com/problems/remove-element/) | [C++](./solutions/remove-element/solution.hpp) | | | | | | -| 26. | [Remove Duplicates from Sorted Array](https://leetcode.com/problems/remove-duplicates-from-sorted-array/) | [C++](./solutions/remove-duplicates-from-sorted-array/solution.hpp) | | | | | | -| 25. | [Reverse Nodes in k-Group](https://leetcode.com/problems/reverse-nodes-in-k-group/) | [C++](./solutions/reverse-nodes-in-k-group/solution.hpp) | | | | | | -| 24. | [Swap Nodes in Pairs](https://leetcode.com/problems/swap-nodes-in-pairs/) | [C++](./solutions/swap-nodes-in-pairs/solution.hpp) | | | | | | -| 23. | [Merge k Sorted Lists](https://leetcode.com/problems/merge-k-sorted-lists/) | [C++](./solutions/merge-k-sorted-lists/solution.hpp) | | | | | | -| 22. | [Generate Parentheses](https://leetcode.com/problems/generate-parentheses/) | [C++](./solutions/generate-parentheses/solution.hpp) | | | | | | -| 21. | [Merge Two Sorted Lists](https://leetcode.com/problems/merge-two-sorted-lists/) | [C++](./solutions/merge-two-sorted-lists/solution.hpp) | | | | | | -| 20. | [Valid Parentheses](https://leetcode.com/problems/valid-parentheses/) | [C++](./solutions/valid-parentheses/solution.hpp) | | | | | | -| 19. | [Remove Nth Node From End of List](https://leetcode.com/problems/remove-nth-node-from-end-of-list/) | [C++](./solutions/remove-nth-node-from-end-of-list/solution.hpp) | | | | | | -| 18. | [4Sum](https://leetcode.com/problems/4sum/) | [C++](./solutions/4sum/solution.hpp) | | | | | | -| 17. | [Letter Combinations of a Phone Number](https://leetcode.com/problems/letter-combinations-of-a-phone-number/) | [C++](./solutions/letter-combinations-of-a-phone-number/solution.hpp) | | | | | | -| 16. | [3Sum Closest](https://leetcode.com/problems/3sum-closest/) | [C++](./solutions/3sum-closest/solution.hpp) | | | | | | -| 15. | [3Sum](https://leetcode.com/problems/3sum/) | [C++](./solutions/3sum/solution.hpp) | | | | | | -| 14. | [Longest Common Prefix](https://leetcode.com/problems/longest-common-prefix/) | [C++](./solutions/longest-common-prefix/solution.hpp) | | | | | | -| 13. | [Roman to Integer](https://leetcode.com/problems/roman-to-integer/) | [C++](./solutions/roman-to-integer/solution.hpp) | | | | | | -| 12. | [Integer to Roman](https://leetcode.com/problems/integer-to-roman/) | [C++](./solutions/integer-to-roman/solution.hpp) | | | | | | -| 11. | [Container With Most Water](https://leetcode.com/problems/container-with-most-water/) | [C++](./solutions/container-with-most-water/solution.hpp) | | | | | | -| 10. | [Regular Expression Matching](https://leetcode.com/problems/regular-expression-matching/) | [C++](./solutions/regular-expression-matching/solution.hpp) | | | | | | -| 9. | [Palindrome Number](https://leetcode.com/problems/palindrome-number/) | [C++](./solutions/palindrome-number/solution.hpp) | | | | | | -| 8. | [String to Integer (atoi)](https://leetcode.com/problems/string-to-integer-atoi/) | [C++](./solutions/string-to-integer-atoi/solution.hpp) | | | | | | -| 7. | [Reverse Integer](https://leetcode.com/problems/reverse-integer/) | [C++](./solutions/reverse-integer/solution.hpp) | | | | | | -| 6. | [Zigzag Conversion](https://leetcode.com/problems/zigzag-conversion/) | [C++](./solutions/zigzag-conversion/solution.hpp) | | | | | | -| 5. | [Longest Palindromic Substring](https://leetcode.com/problems/longest-palindromic-substring/) | [C++](./solutions/longest-palindromic-substring/solution.hpp) | | | | | | -| 4. | [Median of Two Sorted Arrays](https://leetcode.com/problems/median-of-two-sorted-arrays/) | [C++](./solutions/median-of-two-sorted-arrays/solution.hpp) | | | | | | -| 3. | [Longest Substring Without Repeating Characters](https://leetcode.com/problems/longest-substring-without-repeating-characters/) | [C++](./solutions/longest-substring-without-repeating-characters/solution.hpp) | | | | | | -| 2. | [Add Two Numbers](https://leetcode.com/problems/add-two-numbers/) | [C++](./solutions/add-two-numbers/solution.hpp) | | | | | | -| 1. | [Two Sum](https://leetcode.com/problems/two-sum/) | [C++](./solutions/two-sum/solution.hpp) | | | | | | +|№|Title|Code|Difficulty|Time|Space|Tags|Notes| +|-|-----|:--:|----------|:--:|:---:|----|-----| +| 1. | [Two Sum](https://leetcode.com/problems/two-sum/) | [C++](./solutions/two-sum/solution.hpp) | | O(n) | O(n) | | | +| 2. | [Add Two Numbers](https://leetcode.com/problems/add-two-numbers/) | [C++](./solutions/add-two-numbers/solution.hpp) | | O(n+m) | O(1) | | | +| 3. | [Longest Substring Without Repeating Characters](https://leetcode.com/problems/longest-substring-without-repeating-characters/) | [C++](./solutions/longest-substring-without-repeating-characters/solution.hpp) | | O(n) | O(1) | | | +| 4. | [Median of Two Sorted Arrays](https://leetcode.com/problems/median-of-two-sorted-arrays/) | [C++](./solutions/median-of-two-sorted-arrays/solution.hpp) | | O(log min(n,m)) | O(1) | | | +| 5. | [Longest Palindromic Substring](https://leetcode.com/problems/longest-palindromic-substring/) | [C++](./solutions/longest-palindromic-substring/solution.hpp) | | O(n) | O(n) | | [Manacher Algorithm](https://cp-algorithms.com/string/manacher.html) | +| 6. | [Zigzag Conversion](https://leetcode.com/problems/zigzag-conversion/) | [C++](./solutions/zigzag-conversion/solution.hpp) | | O(n) | O(1) | | | +| 7. | [Reverse Integer](https://leetcode.com/problems/reverse-integer/) | [C++](./solutions/reverse-integer/solution.hpp) | | O(log n) | O(1) | | | +| 8. | [String to Integer (atoi)](https://leetcode.com/problems/string-to-integer-atoi/) | [C++](./solutions/string-to-integer-atoi/solution.hpp) | | O(n) | O(1) | | | +| 9. | [Palindrome Number](https://leetcode.com/problems/palindrome-number/) | [C++](./solutions/palindrome-number/solution.hpp) | | O(log n) | O(log n) | | | +| 10. | [Regular Expression Matching](https://leetcode.com/problems/regular-expression-matching/) | [C++](./solutions/regular-expression-matching/solution.hpp) | | O(nm) | O(nm) | | | +| 11. | [Container With Most Water](https://leetcode.com/problems/container-with-most-water/) | [C++](./solutions/container-with-most-water/solution.hpp) | | O(n) | O(1) | | | +| 12. | [Integer to Roman](https://leetcode.com/problems/integer-to-roman/) | [C++](./solutions/integer-to-roman/solution.hpp) | | O(1) | O(1) | | | +| 13. | [Roman to Integer](https://leetcode.com/problems/roman-to-integer/) | [C++](./solutions/roman-to-integer/solution.hpp) | | O(n) | O(1) | | | +| 14. | [Longest Common Prefix](https://leetcode.com/problems/longest-common-prefix/) | [C++](./solutions/longest-common-prefix/solution.hpp) | | O(nm) | O(1) | | | +| 15. | [3Sum](https://leetcode.com/problems/3sum/) | [C++](./solutions/3sum/solution.hpp) | | O(n2) | O(n) | | | +| 16. | [3Sum Closest](https://leetcode.com/problems/3sum-closest/) | [C++](./solutions/3sum-closest/solution.hpp) | | O(n2) | O(n) | | | +| 17. | [Letter Combinations of a Phone Number](https://leetcode.com/problems/letter-combinations-of-a-phone-number/) | [C++](./solutions/letter-combinations-of-a-phone-number/solution.hpp) | | O(4n) | O(n) | | | +| 18. | [4Sum](https://leetcode.com/problems/4sum/) | [C++](./solutions/4sum/solution.hpp) | | O(n3) | O(n) | | | +| 19. | [Remove Nth Node From End of List](https://leetcode.com/problems/remove-nth-node-from-end-of-list/) | [C++](./solutions/remove-nth-node-from-end-of-list/solution.hpp) | | O(n) | O(1) | | | +| 20. | [Valid Parentheses](https://leetcode.com/problems/valid-parentheses/) | [C++](./solutions/valid-parentheses/solution.hpp) | | O(n) | O(n) | | | +| 21. | [Merge Two Sorted Lists](https://leetcode.com/problems/merge-two-sorted-lists/) | [C++](./solutions/merge-two-sorted-lists/solution.hpp) | | O(n+m) | O(1) | | | +| 22. | [Generate Parentheses](https://leetcode.com/problems/generate-parentheses/) | [C++](./solutions/generate-parentheses/solution.hpp) | | O(4n) | O(n) | | | +| 23. | [Merge k Sorted Lists](https://leetcode.com/problems/merge-k-sorted-lists/) | [C++](./solutions/merge-k-sorted-lists/solution.hpp) | | O(n log k) | O(k) | | | +| 24. | [Swap Nodes in Pairs](https://leetcode.com/problems/swap-nodes-in-pairs/) | [C++](./solutions/swap-nodes-in-pairs/solution.hpp) | | O(n) | O(1) | | | +| 25. | [Reverse Nodes in k-Group](https://leetcode.com/problems/reverse-nodes-in-k-group/) | [C++](./solutions/reverse-nodes-in-k-group/solution.hpp) | | O(n) | O(1) | | | +| 26. | [Remove Duplicates from Sorted Array](https://leetcode.com/problems/remove-duplicates-from-sorted-array/) | [C++](./solutions/remove-duplicates-from-sorted-array/solution.hpp) | | O(n) | O(1) | | | +| 27. | [Remove Element](https://leetcode.com/problems/remove-element/) | [C++](./solutions/remove-element/solution.hpp) | | O(n) | O(1) | | | +| 28. | [Find the Index of the First Occurrence in a String](https://leetcode.com/problems/find-the-index-of-the-first-occurrence-in-a-string/) | [C++](./solutions/find-the-index-of-the-first-occurrence-in-a-string/solution.hpp) | | O(n+m) | O(m) | | [KMP](https://en.wikipedia.org/wiki/Knuth%E2%80%93Morris%E2%80%93Pratt_algorithm) | +| 30. | [Substring with Concatenation of All Words](https://leetcode.com/problems/substring-with-concatenation-of-all-words/) | [C++](./solutions/substring-with-concatenation-of-all-words/solution.hpp) | | O(nmk) | O(mk) | | | +| 31. | [Next Permutation](https://leetcode.com/problems/next-permutation/) | [C++](./solutions/next-permutation/solution.hpp) | | O(n) | O(1) | | | +| 32. | [Longest Valid Parentheses](https://leetcode.com/problems/longest-valid-parentheses/) | [C++](./solutions/longest-valid-parentheses/solution.hpp) | | O(n) | O(n) | | | +| 33. | [Search in Rotated Sorted Array](https://leetcode.com/problems/search-in-rotated-sorted-array/) | [C++](./solutions/search-in-rotated-sorted-array/solution.hpp) | | O(log n) | O(1) | | | +| 34. | [Find First and Last Position of Element in Sorted Array](https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array/) | [C++](./solutions/find-first-and-last-position-of-element-in-sorted-array/solution.hpp) | | O(log n) | O(1) | | | +| 35. | [Search Insert Position](https://leetcode.com/problems/search-insert-position/) | [C++](./solutions/search-insert-position/solution.hpp) | | O(log n) | O(1) | | | +| 36. | [Valid Sudoku](https://leetcode.com/problems/valid-sudoku/) | [C++](./solutions/valid-sudoku/solution.hpp) | | O(n2) | O(n) | | | +| 37. | [Sudoku Solver](https://leetcode.com/problems/sudoku-solver/) | [C++](./solutions/sudoku-solver/solution.hpp) | | O(n2n2) | O(1) | | | +| 38. | [Count and Say](https://leetcode.com/problems/count-and-say/) | [C++](./solutions/count-and-say/solution.hpp) | | O(λn) | O(λn) | | [Look&Say](https://en.wikipedia.org/wiki/Look-and-say_sequence) | +| 39. | [Combination Sum](https://leetcode.com/problems/combination-sum/) | [C++](./solutions/combination-sum/solution.hpp) | | O(nt) | O(t) | | | +| 40. | [Combination Sum II](https://leetcode.com/problems/combination-sum-ii/) | [C++](./solutions/combination-sum-ii/solution.hpp) | | O(2n) | O(n) | | | +| 41. | [First Missing Positive](https://leetcode.com/problems/first-missing-positive/) | [C++](./solutions/first-missing-positive/solution.hpp) | | O(n) | O(1) | | | +| 42. | [Trapping Rain Water](https://leetcode.com/problems/trapping-rain-water/) | [C++](./solutions/trapping-rain-water/solution.hpp) | | O(n) | O(1) | | | +| 43. | [Multiply Strings](https://leetcode.com/problems/multiply-strings/) | [C++](./solutions/multiply-strings/solution.hpp) | | O(nm) | O(n+m) | | | +| 44. | [Wildcard Matching](https://leetcode.com/problems/wildcard-matching/) | [C++](./solutions/wildcard-matching/solution.hpp) | | O(nm) | O(nm) | | | +| 45. | [Jump Game II](https://leetcode.com/problems/jump-game-ii/) | [C++](./solutions/jump-game-ii/solution.hpp) | | O(n) | O(1) | | | +| 46. | [Permutations](https://leetcode.com/problems/permutations/) | [C++](./solutions/permutations/solution.hpp) | | O(n!) | O(n) | | | +| 47. | [Permutations II](https://leetcode.com/problems/permutations-ii/) | [C++](./solutions/permutations-ii/solution.hpp) | | O(n!) | O(n) | | | +| 48. | [Rotate Image](https://leetcode.com/problems/rotate-image/) | [C++](./solutions/rotate-image/solution.hpp) | | O(n2) | O(1) | | | +| 49. | [Group Anagrams](https://leetcode.com/problems/group-anagrams/) | [C++](./solutions/group-anagrams/solution.hpp) | | O(nk log k) | O(nk) | | | +| 50. | [Pow(x, n)](https://leetcode.com/problems/powx-n/) | [C++](./solutions/powx-n/solution.hpp) | | O(log n) | O(1) | | | +| 51. | [N-Queens](https://leetcode.com/problems/n-queens/) | [C++](./solutions/n-queens/solution.hpp) | | | | | | +| 52. | [N-Queens II](https://leetcode.com/problems/n-queens-ii/) | [C++](./solutions/n-queens-ii/solution.hpp) | | | | | | +| 53. | [Maximum Subarray](https://leetcode.com/problems/maximum-subarray/) | [C++](./solutions/maximum-subarray/solution.hpp) | | | | | | +| 54. | [Spiral Matrix](https://leetcode.com/problems/spiral-matrix/) | [C++](./solutions/spiral-matrix/solution.hpp) | | | | | | +| 55. | [Jump Game](https://leetcode.com/problems/jump-game/) | [C++](./solutions/jump-game/solution.hpp) | | | | | | +| 56. | [Merge Intervals](https://leetcode.com/problems/merge-intervals/) | [C++](./solutions/merge-intervals/solution.hpp) | | | | | | +| 57. | [Insert Interval](https://leetcode.com/problems/insert-interval/) | [C++](./solutions/insert-interval/solution.hpp) | | | | | | +| 58. | [Length of Last Word](https://leetcode.com/problems/length-of-last-word/) | [C++](./solutions/length-of-last-word/solution.hpp) | | | | | | +| 59. | [Spiral Matrix II](https://leetcode.com/problems/spiral-matrix-ii/) | [C++](./solutions/spiral-matrix-ii/solution.hpp) | | | | | | +| 60. | [Permutation Sequence](https://leetcode.com/problems/permutation-sequence/) | [C++](./solutions/permutation-sequence/solution.hpp) | | | | | | +| 61. | [Rotate List](https://leetcode.com/problems/rotate-list/) | [C++](./solutions/rotate-list/solution.hpp) | | | | | | +| 62. | [Unique Paths](https://leetcode.com/problems/unique-paths/) | [C++](./solutions/unique-paths/solution.hpp) | | | | | | +| 63. | [Unique Paths II](https://leetcode.com/problems/unique-paths-ii/) | [C++](./solutions/unique-paths-ii/solution.hpp) | | | | | | +| 64. | [Minimum Path Sum](https://leetcode.com/problems/minimum-path-sum/) | [C++](./solutions/minimum-path-sum/solution.hpp) | | | | | | +| 65. | [Valid Number](https://leetcode.com/problems/valid-number/) | [C++](./solutions/valid-number/solution.hpp) | | | | | | +| 66. | [Plus One](https://leetcode.com/problems/plus-one/) | [C++](./solutions/plus-one/solution.hpp) | | | | | | +| 67. | [Add Binary](https://leetcode.com/problems/add-binary/) | [C++](./solutions/add-binary/solution.hpp) | | | | | | +| 68. | [Text Justification](https://leetcode.com/problems/text-justification/) | [C++](./solutions/text-justification/solution.hpp) | | | | | | +| 69. | [Sqrt(x)](https://leetcode.com/problems/sqrtx/) | [C++](./solutions/sqrtx/solution.hpp) | | | | | | +| 70. | [Climbing Stairs](https://leetcode.com/problems/climbing-stairs/) | [C++](./solutions/climbing-stairs/solution.hpp) | | | | | | +| 71. | [Simplify Path](https://leetcode.com/problems/simplify-path/) | [C++](./solutions/simplify-path/solution.hpp) | | | | | | +| 72. | [Edit Distance](https://leetcode.com/problems/edit-distance/) | [C++](./solutions/edit-distance/solution.hpp) | | | | | | +| 73. | [Set Matrix Zeroes](https://leetcode.com/problems/set-matrix-zeroes/) | [C++](./solutions/set-matrix-zeroes/solution.hpp) | | | | | | +| 74. | [Search a 2D Matrix](https://leetcode.com/problems/search-a-2d-matrix/) | [C++](./solutions/search-a-2d-matrix/solution.hpp) | | | | | | +| 75. | [Sort Colors](https://leetcode.com/problems/sort-colors/) | [C++](./solutions/sort-colors/solution.hpp) | | | | | | +| 76. | [Minimum Window Substring](https://leetcode.com/problems/minimum-window-substring/) | [C++](./solutions/minimum-window-substring/solution.hpp) | | | | | | +| 77. | [Combinations](https://leetcode.com/problems/combinations/) | [C++](./solutions/combinations/solution.hpp) | | | | | | +| 78. | [Subsets](https://leetcode.com/problems/subsets/) | [C++](./solutions/subsets/solution.hpp) | | | | | | +| 79. | [Word Search](https://leetcode.com/problems/word-search/) | [C++](./solutions/word-search/solution.hpp) | | | | | | +| 80. | [Remove Duplicates from Sorted Array II](https://leetcode.com/problems/remove-duplicates-from-sorted-array-ii/) | [C++](./solutions/remove-duplicates-from-sorted-array-ii/solution.hpp) | | | | | | +| 81. | [Search in Rotated Sorted Array II](https://leetcode.com/problems/search-in-rotated-sorted-array-ii/) | [C++](./solutions/search-in-rotated-sorted-array-ii/solution.hpp) | | | | | | +| 82. | [Remove Duplicates from Sorted List II](https://leetcode.com/problems/remove-duplicates-from-sorted-list-ii/) | [C++](./solutions/remove-duplicates-from-sorted-list-ii/solution.hpp) | | | | | | +| 83. | [Remove Duplicates from Sorted List](https://leetcode.com/problems/remove-duplicates-from-sorted-list/) | [C++](./solutions/remove-duplicates-from-sorted-list/solution.hpp) | | | | | | +| 84. | [Largest Rectangle in Histogram](https://leetcode.com/problems/largest-rectangle-in-histogram/) | [C++](./solutions/largest-rectangle-in-histogram/solution.hpp) | | | | | | +| 85. | [Maximal Rectangle](https://leetcode.com/problems/maximal-rectangle/) | [C++](./solutions/maximal-rectangle/solution.hpp) | | | | | | +| 86. | [Partition List](https://leetcode.com/problems/partition-list/) | [C++](./solutions/partition-list/solution.hpp) | | | | | | +| 87. | [Scramble String](https://leetcode.com/problems/scramble-string/) | [C++](./solutions/scramble-string/solution.hpp) | | | | | | +| 88. | [Merge Sorted Array](https://leetcode.com/problems/merge-sorted-array/) | [C++](./solutions/merge-sorted-array/solution.hpp) | | | | | | +| 89. | [Gray Code](https://leetcode.com/problems/gray-code/) | [C++](./solutions/gray-code/solution.hpp) | | | | | | +| 90. | [Subsets II](https://leetcode.com/problems/subsets-ii/) | [C++](./solutions/subsets-ii/solution.hpp) | | | | | | +| 91. | [Decode Ways](https://leetcode.com/problems/decode-ways/) | [C++](./solutions/decode-ways/solution.hpp) | | | | | | +| 92. | [Reverse Linked List II](https://leetcode.com/problems/reverse-linked-list-ii/) | [C++](./solutions/reverse-linked-list-ii/solution.hpp) | | | | | | +| 93. | [Restore IP Addresses](https://leetcode.com/problems/restore-ip-addresses/) | [C++](./solutions/restore-ip-addresses/solution.hpp) | | | | | | +| 94. | [Binary Tree Inorder Traversal](https://leetcode.com/problems/binary-tree-inorder-traversal/) | [C++](./solutions/binary-tree-inorder-traversal/solution.hpp) | | | | | | +| 95. | [Unique Binary Search Trees II](https://leetcode.com/problems/unique-binary-search-trees-ii/) | [C++](./solutions/unique-binary-search-trees-ii/solution.hpp) | | | | | | +| 96. | [Unique Binary Search Trees](https://leetcode.com/problems/unique-binary-search-trees/) | [C++](./solutions/unique-binary-search-trees/solution.hpp) | | | | | | +| 97. | [Interleaving String](https://leetcode.com/problems/interleaving-string/) | [C++](./solutions/interleaving-string/solution.hpp) | | | | | | +| 98. | [Validate Binary Search Tree](https://leetcode.com/problems/validate-binary-search-tree/) | [C++](./solutions/validate-binary-search-tree/solution.hpp) | | | | | | +| 99. | [Recover Binary Search Tree](https://leetcode.com/problems/recover-binary-search-tree/) | [C++](./solutions/recover-binary-search-tree/solution.hpp) | | | | | | +| 100. | [Same Tree](https://leetcode.com/problems/same-tree/) | [C++](./solutions/same-tree/solution.hpp) | | | | | | +| 101. | [Symmetric Tree](https://leetcode.com/problems/symmetric-tree/) | [C++](./solutions/symmetric-tree/solution.hpp) | | | | | | +| 102. | [Binary Tree Level Order Traversal](https://leetcode.com/problems/binary-tree-level-order-traversal/) | [C++](./solutions/binary-tree-level-order-traversal/solution.hpp) | | | | | | +| 103. | [Binary Tree Zigzag Level Order Traversal](https://leetcode.com/problems/binary-tree-zigzag-level-order-traversal/) | [C++](./solutions/binary-tree-zigzag-level-order-traversal/solution.hpp) | | | | | | +| 104. | [Maximum Depth of Binary Tree](https://leetcode.com/problems/maximum-depth-of-binary-tree/) | [C++](./solutions/maximum-depth-of-binary-tree/solution.hpp) | | | | | | +| 105. | [Construct Binary Tree from Preorder and Inorder Traversal](https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/) | [C++](./solutions/construct-binary-tree-from-preorder-and-inorder-traversal/solution.hpp) | | | | | | +| 106. | [Construct Binary Tree from Inorder and Postorder Traversal](https://leetcode.com/problems/construct-binary-tree-from-inorder-and-postorder-traversal/) | [C++](./solutions/construct-binary-tree-from-inorder-and-postorder-traversal/solution.hpp) | | | | | | +| 108. | [Convert Sorted Array to Binary Search Tree](https://leetcode.com/problems/convert-sorted-array-to-binary-search-tree/) | [C++](./solutions/convert-sorted-array-to-binary-search-tree/solution.hpp) | | | | | | +| 109. | [Convert Sorted List to Binary Search Tree](https://leetcode.com/problems/convert-sorted-list-to-binary-search-tree/) | [C++](./solutions/convert-sorted-list-to-binary-search-tree/solution.hpp) | | | | | | +| 110. | [Balanced Binary Tree](https://leetcode.com/problems/balanced-binary-tree/) | [C++](./solutions/balanced-binary-tree/solution.hpp) | | | | | | +| 111. | [Minimum Depth of Binary Tree](https://leetcode.com/problems/minimum-depth-of-binary-tree/) | [C++](./solutions/minimum-depth-of-binary-tree/solution.hpp) | | | | | | +| 112. | [Path Sum](https://leetcode.com/problems/path-sum/) | [C++](./solutions/path-sum/solution.hpp) | | | | | | +| 113. | [Path Sum II](https://leetcode.com/problems/path-sum-ii/) | [C++](./solutions/path-sum-ii/solution.hpp) | | | | | | +| 114. | [Flatten Binary Tree to Linked List](https://leetcode.com/problems/flatten-binary-tree-to-linked-list/) | [C++](./solutions/flatten-binary-tree-to-linked-list/solution.hpp) | | | | | | +| 115. | [Distinct Subsequences](https://leetcode.com/problems/distinct-subsequences/) | [C++](./solutions/distinct-subsequences/solution.hpp) | | | | | | +| 116. | [Populating Next Right Pointers in Each Node](https://leetcode.com/problems/populating-next-right-pointers-in-each-node/) | [C++](./solutions/populating-next-right-pointers-in-each-node/solution.hpp) | | | | | | +| 117. | [Populating Next Right Pointers in Each Node II](https://leetcode.com/problems/populating-next-right-pointers-in-each-node-ii/) | [C++](./solutions/populating-next-right-pointers-in-each-node-ii/solution.hpp) | | | | | | +| 118. | [Pascal's Triangle](https://leetcode.com/problems/pascals-triangle/) | [C++](./solutions/pascals-triangle/solution.hpp) | | | | | | +| 119. | [Pascal's Triangle II](https://leetcode.com/problems/pascals-triangle-ii/) | [C++](./solutions/pascals-triangle-ii/solution.hpp) | | | | | | +| 120. | [Triangle](https://leetcode.com/problems/triangle/) | [C++](./solutions/triangle/solution.hpp) | | | | | | +| 121. | [Best Time to Buy and Sell Stock](https://leetcode.com/problems/best-time-to-buy-and-sell-stock/) | [C++](./solutions/best-time-to-buy-and-sell-stock/solution.hpp) | | | | | | +| 122. | [Best Time to Buy and Sell Stock II](https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii/) | [C++](./solutions/best-time-to-buy-and-sell-stock-ii/solution.hpp) | | | | | | +| 123. | [Best Time to Buy and Sell Stock III](https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iii/) | [C++](./solutions/best-time-to-buy-and-sell-stock-iii/solution.hpp) | | | | | | +| 124. | [Binary Tree Maximum Path Sum](https://leetcode.com/problems/binary-tree-maximum-path-sum/) | [C++](./solutions/binary-tree-maximum-path-sum/solution.hpp) | | | | | | +| 125. | [Valid Palindrome](https://leetcode.com/problems/valid-palindrome/) | [C++](./solutions/valid-palindrome/solution.hpp) | | | | | | +| 126. | [Word Ladder II](https://leetcode.com/problems/word-ladder-ii/) | [C++](./solutions/word-ladder-ii/solution.hpp) | | | | | | +| 127. | [Word Ladder](https://leetcode.com/problems/word-ladder/) | [C++](./solutions/word-ladder/solution.hpp) | | | | | | +| 128. | [Longest Consecutive Sequence](https://leetcode.com/problems/longest-consecutive-sequence/) | [C++](./solutions/longest-consecutive-sequence/solution.hpp) | | | | | | +| 129. | [Sum Root to Leaf Numbers](https://leetcode.com/problems/sum-root-to-leaf-numbers/) | [C++](./solutions/sum-root-to-leaf-numbers/solution.hpp) | | | | | | +| 130. | [Surrounded Regions](https://leetcode.com/problems/surrounded-regions/) | [C++](./solutions/surrounded-regions/solution.hpp) | | | | | | +| 131. | [Palindrome Partitioning](https://leetcode.com/problems/palindrome-partitioning/) | [C++](./solutions/palindrome-partitioning/solution.hpp) | | | | | | +| 133. | [Clone Graph](https://leetcode.com/problems/clone-graph/) | [C++](./solutions/clone-graph/solution.hpp) | | | | | | +| 134. | [Gas Station](https://leetcode.com/problems/gas-station/) | [C++](./solutions/gas-station/solution.hpp) | | | | | | +| 135. | [Candy](https://leetcode.com/problems/candy/) | [C++](./solutions/candy/solution.hpp) | | | | | | +| 136. | [Single Number](https://leetcode.com/problems/single-number/) | [C++](./solutions/single-number/solution.hpp) | | | | | | +| 137. | [Single Number II](https://leetcode.com/problems/single-number-ii/) | [C++](./solutions/single-number-ii/solution.hpp) | | | | | | +| 138. | [Copy List with Random Pointer](https://leetcode.com/problems/copy-list-with-random-pointer/) | [C++](./solutions/copy-list-with-random-pointer/solution.hpp) | | | | | | +| 139. | [Word Break](https://leetcode.com/problems/word-break/) | [C++](./solutions/word-break/solution.hpp) | | | | | | +| 141. | [Linked List Cycle](https://leetcode.com/problems/linked-list-cycle/) | [C++](./solutions/linked-list-cycle/solution.hpp) | | | | | | +| 142. | [Linked List Cycle II](https://leetcode.com/problems/linked-list-cycle-ii/) | [C++](./solutions/linked-list-cycle-ii/solution.hpp) | | | | | | +| 143. | [Reorder List](https://leetcode.com/problems/reorder-list/) | [C++](./solutions/reorder-list/solution.hpp) | | | | | | +| 144. | [Binary Tree Preorder Traversal](https://leetcode.com/problems/binary-tree-preorder-traversal/) | [C++](./solutions/binary-tree-preorder-traversal/solution.hpp) | | | | | | +| 145. | [Binary Tree Postorder Traversal](https://leetcode.com/problems/binary-tree-postorder-traversal/) | [C++](./solutions/binary-tree-postorder-traversal/solution.hpp) | | | | | | +| 146. | [LRU Cache](https://leetcode.com/problems/lru-cache/) | [C++](./solutions/lru-cache/solution.hpp) | | | | | | +| 148. | [Sort List](https://leetcode.com/problems/sort-list/) | [C++](./solutions/sort-list/solution.hpp) | | | | | | +| 149. | [Max Points on a Line](https://leetcode.com/problems/max-points-on-a-line/) | [C++](./solutions/max-points-on-a-line/solution.hpp) | | | | | | +| 150. | [Evaluate Reverse Polish Notation](https://leetcode.com/problems/evaluate-reverse-polish-notation/) | [C++](./solutions/evaluate-reverse-polish-notation/solution.hpp) | | | | | | +| 151. | [Reverse Words in a String](https://leetcode.com/problems/reverse-words-in-a-string/) | [C++](./solutions/reverse-words-in-a-string/solution.hpp) | | | | | | +| 152. | [Maximum Product Subarray](https://leetcode.com/problems/maximum-product-subarray/) | [C++](./solutions/maximum-product-subarray/solution.hpp) | | | | | | +| 153. | [Find Minimum in Rotated Sorted Array](https://leetcode.com/problems/find-minimum-in-rotated-sorted-array/) | [C++](./solutions/find-minimum-in-rotated-sorted-array/solution.hpp) | | | | | | +| 154. | [Find Minimum in Rotated Sorted Array II](https://leetcode.com/problems/find-minimum-in-rotated-sorted-array-ii/) | [C++](./solutions/find-minimum-in-rotated-sorted-array-ii/solution.hpp) | | | | | | +| 155. | [Min Stack](https://leetcode.com/problems/min-stack/) | [C++](./solutions/min-stack/solution.hpp) | | | | | | +| 160. | [Intersection of Two Linked Lists](https://leetcode.com/problems/intersection-of-two-linked-lists/) | [C++](./solutions/intersection-of-two-linked-lists/solution.hpp) | | | | | | +| 162. | [Find Peak Element](https://leetcode.com/problems/find-peak-element/) | [C++](./solutions/find-peak-element/solution.hpp) | | | | | | +| 167. | [Two Sum II - Input Array Is Sorted](https://leetcode.com/problems/two-sum-ii-input-array-is-sorted/) | [C++](./solutions/two-sum-ii-input-array-is-sorted/solution.hpp) | | | | | | +| 168. | [Excel Sheet Column Title](https://leetcode.com/problems/excel-sheet-column-title/) | [C++](./solutions/excel-sheet-column-title/solution.hpp) | | | | | | +| 169. | [Majority Element](https://leetcode.com/problems/majority-element/) | [C++](./solutions/majority-element/solution.hpp) | | | | | | +| 171. | [Excel Sheet Column Number](https://leetcode.com/problems/excel-sheet-column-number/) | [C++](./solutions/excel-sheet-column-number/solution.hpp) | | | | | | +| 172. | [Factorial Trailing Zeroes](https://leetcode.com/problems/factorial-trailing-zeroes/) | [C++](./solutions/factorial-trailing-zeroes/solution.hpp) | | | | | | +| 173. | [Binary Search Tree Iterator](https://leetcode.com/problems/binary-search-tree-iterator/) | [C++](./solutions/binary-search-tree-iterator/solution.hpp) | | | | | | +| 187. | [Repeated DNA Sequences](https://leetcode.com/problems/repeated-dna-sequences/) | [C++](./solutions/repeated-dna-sequences/solution.hpp) | | | | | | +| 188. | [Best Time to Buy and Sell Stock IV](https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iv/) | [C++](./solutions/best-time-to-buy-and-sell-stock-iv/solution.hpp) | | | | | | +| 189. | [Rotate Array](https://leetcode.com/problems/rotate-array/) | [C++](./solutions/rotate-array/solution.hpp) | | | | | | +| 190. | [Reverse Bits](https://leetcode.com/problems/reverse-bits/) | [C++](./solutions/reverse-bits/solution.hpp) | | | | | | +| 191. | [Number of 1 Bits](https://leetcode.com/problems/number-of-1-bits/) | [C++](./solutions/number-of-1-bits/solution.hpp) | | | | | | +| 198. | [House Robber](https://leetcode.com/problems/house-robber/) | [C++](./solutions/house-robber/solution.hpp) | | | | | | +| 199. | [Binary Tree Right Side View](https://leetcode.com/problems/binary-tree-right-side-view/) | [C++](./solutions/binary-tree-right-side-view/solution.hpp) | | | | | | +| 200. | [Number of Islands](https://leetcode.com/problems/number-of-islands/) | [C++](./solutions/number-of-islands/solution.hpp) | | | | | | +| 201. | [Bitwise AND of Numbers Range](https://leetcode.com/problems/bitwise-and-of-numbers-range/) | [C++](./solutions/bitwise-and-of-numbers-range/solution.hpp) | | | | | | +| 202. | [Happy Number](https://leetcode.com/problems/happy-number/) | [C++](./solutions/happy-number/solution.hpp) | | | | | | +| 203. | [Remove Linked List Elements](https://leetcode.com/problems/remove-linked-list-elements/) | [C++](./solutions/remove-linked-list-elements/solution.hpp) | | | | | | +| 205. | [Isomorphic Strings](https://leetcode.com/problems/isomorphic-strings/) | [C++](./solutions/isomorphic-strings/solution.hpp) | | | | | | +| 206. | [Reverse Linked List](https://leetcode.com/problems/reverse-linked-list/) | [C++](./solutions/reverse-linked-list/solution.hpp) | | | | | | +| 207. | [Course Schedule](https://leetcode.com/problems/course-schedule/) | [C++](./solutions/course-schedule/solution.hpp) | | | | | | +| 208. | [Implement Trie (Prefix Tree)](https://leetcode.com/problems/implement-trie-prefix-tree/) | [C++](./solutions/implement-trie-prefix-tree/solution.hpp) | | | | | | +| 209. | [Minimum Size Subarray Sum](https://leetcode.com/problems/minimum-size-subarray-sum/) | [C++](./solutions/minimum-size-subarray-sum/solution.hpp) | | | | | | +| 210. | [Course Schedule II](https://leetcode.com/problems/course-schedule-ii/) | [C++](./solutions/course-schedule-ii/solution.hpp) | | | | | | +| 211. | [Design Add and Search Words Data Structure](https://leetcode.com/problems/design-add-and-search-words-data-structure/) | [C++](./solutions/design-add-and-search-words-data-structure/solution.hpp) | | | | | | +| 212. | [Word Search II](https://leetcode.com/problems/word-search-ii/) | [C++](./solutions/word-search-ii/solution.hpp) | | | | | | +| 213. | [House Robber II](https://leetcode.com/problems/house-robber-ii/) | [C++](./solutions/house-robber-ii/solution.hpp) | | | | | | +| 215. | [Kth Largest Element in an Array](https://leetcode.com/problems/kth-largest-element-in-an-array/) | [C++](./solutions/kth-largest-element-in-an-array/solution.hpp) | | | | | | +| 216. | [Combination Sum III](https://leetcode.com/problems/combination-sum-iii/) | [C++](./solutions/combination-sum-iii/solution.hpp) | | | | | | +| 217. | [Contains Duplicate](https://leetcode.com/problems/contains-duplicate/) | [C++](./solutions/contains-duplicate/solution.hpp) | | | | | | +| 219. | [Contains Duplicate II](https://leetcode.com/problems/contains-duplicate-ii/) | [C++](./solutions/contains-duplicate-ii/solution.hpp) | | | | | | +| 221. | [Maximal Square](https://leetcode.com/problems/maximal-square/) | [C++](./solutions/maximal-square/solution.hpp) | | | | | | +| 222. | [Count Complete Tree Nodes](https://leetcode.com/problems/count-complete-tree-nodes/) | [C++](./solutions/count-complete-tree-nodes/solution.hpp) | | | | | | +| 224. | [Basic Calculator](https://leetcode.com/problems/basic-calculator/) | [C++](./solutions/basic-calculator/solution.hpp) | | | | | | +| 225. | [Implement Stack using Queues](https://leetcode.com/problems/implement-stack-using-queues/) | [C++](./solutions/implement-stack-using-queues/solution.hpp) | | | | | | +| 226. | [Invert Binary Tree](https://leetcode.com/problems/invert-binary-tree/) | [C++](./solutions/invert-binary-tree/solution.hpp) | | | | | | +| 227. | [Basic Calculator II](https://leetcode.com/problems/basic-calculator-ii/) | [C++](./solutions/basic-calculator-ii/solution.hpp) | | | | | | +| 228. | [Summary Ranges](https://leetcode.com/problems/summary-ranges/) | [C++](./solutions/summary-ranges/solution.hpp) | | | | | | +| 229. | [Majority Element II](https://leetcode.com/problems/majority-element-ii/) | [C++](./solutions/majority-element-ii/solution.hpp) | | | | | | +| 230. | [Kth Smallest Element in a BST](https://leetcode.com/problems/kth-smallest-element-in-a-bst/) | [C++](./solutions/kth-smallest-element-in-a-bst/solution.hpp) | | | | | | +| 231. | [Power of Two](https://leetcode.com/problems/power-of-two/) | [C++](./solutions/power-of-two/solution.hpp) | | | | | | +| 232. | [Implement Queue using Stacks](https://leetcode.com/problems/implement-queue-using-stacks/) | [C++](./solutions/implement-queue-using-stacks/solution.hpp) | | | | | | +| 233. | [Number of Digit One](https://leetcode.com/problems/number-of-digit-one/) | [C++](./solutions/number-of-digit-one/solution.hpp) | | | | | | +| 234. | [Palindrome Linked List](https://leetcode.com/problems/palindrome-linked-list/) | [C++](./solutions/palindrome-linked-list/solution.hpp) | | | | | | +| 235. | [Lowest Common Ancestor of a Binary Search Tree](https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree/) | [C++](./solutions/lowest-common-ancestor-of-a-binary-search-tree/solution.hpp) | | | | | | +| 236. | [Lowest Common Ancestor of a Binary Tree](https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree/) | [C++](./solutions/lowest-common-ancestor-of-a-binary-tree/solution.hpp) | | | | | | +| 237. | [Delete Node in a Linked List](https://leetcode.com/problems/delete-node-in-a-linked-list/) | [C++](./solutions/delete-node-in-a-linked-list/solution.hpp) | | | | | | +| 238. | [Product of Array Except Self](https://leetcode.com/problems/product-of-array-except-self/) | [C++](./solutions/product-of-array-except-self/solution.hpp) | | | | | | +| 239. | [Sliding Window Maximum](https://leetcode.com/problems/sliding-window-maximum/) | [C++](./solutions/sliding-window-maximum/solution.hpp) | | | | | | +| 240. | [Search a 2D Matrix II](https://leetcode.com/problems/search-a-2d-matrix-ii/) | [C++](./solutions/search-a-2d-matrix-ii/solution.hpp) | | | | | | +| 242. | [Valid Anagram](https://leetcode.com/problems/valid-anagram/) | [C++](./solutions/valid-anagram/solution.hpp) | | | | | | +| 257. | [Binary Tree Paths](https://leetcode.com/problems/binary-tree-paths/) | [C++](./solutions/binary-tree-paths/solution.hpp) | | | | | | +| 258. | [Add Digits](https://leetcode.com/problems/add-digits/) | [C++](./solutions/add-digits/solution.hpp) | | | | | | +| 260. | [Single Number III](https://leetcode.com/problems/single-number-iii/) | [C++](./solutions/single-number-iii/solution.hpp) | | | | | | +| 263. | [Ugly Number](https://leetcode.com/problems/ugly-number/) | [C++](./solutions/ugly-number/solution.hpp) | | | | | | +| 264. | [Ugly Number II](https://leetcode.com/problems/ugly-number-ii/) | [C++](./solutions/ugly-number-ii/solution.hpp) | | | | | | +| 268. | [Missing Number](https://leetcode.com/problems/missing-number/) | [C++](./solutions/missing-number/solution.hpp) | | | | | | +| 274. | [H-Index](https://leetcode.com/problems/h-index/) | [C++](./solutions/h-index/solution.hpp) | | | | | | +| 275. | [H-Index II](https://leetcode.com/problems/h-index-ii/) | [C++](./solutions/h-index-ii/solution.hpp) | | | | | | +| 278. | [First Bad Version](https://leetcode.com/problems/first-bad-version/) | [C++](./solutions/first-bad-version/solution.hpp) | | | | | | +| 279. | [Perfect Squares](https://leetcode.com/problems/perfect-squares/) | [C++](./solutions/perfect-squares/solution.hpp) | | | | | | +| 283. | [Move Zeroes](https://leetcode.com/problems/move-zeroes/) | [C++](./solutions/move-zeroes/solution.hpp) | | | | | | +| 287. | [Find the Duplicate Number](https://leetcode.com/problems/find-the-duplicate-number/) | [C++](./solutions/find-the-duplicate-number/solution.hpp) | | | | | | +| 289. | [Game of Life](https://leetcode.com/problems/game-of-life/) | [C++](./solutions/game-of-life/solution.hpp) | | | | | | +| 290. | [Word Pattern](https://leetcode.com/problems/word-pattern/) | [C++](./solutions/word-pattern/solution.hpp) | | | | | | +| 292. | [Nim Game](https://leetcode.com/problems/nim-game/) | [C++](./solutions/nim-game/solution.hpp) | | | | | | +| 295. | [Find Median from Data Stream](https://leetcode.com/problems/find-median-from-data-stream/) | [C++](./solutions/find-median-from-data-stream/solution.hpp) | | | | | | +| 297. | [Serialize and Deserialize Binary Tree](https://leetcode.com/problems/serialize-and-deserialize-binary-tree/) | [C++](./solutions/serialize-and-deserialize-binary-tree/solution.hpp) | | | | | | +| 299. | [Bulls and Cows](https://leetcode.com/problems/bulls-and-cows/) | [C++](./solutions/bulls-and-cows/solution.hpp) | | | | | | +| 300. | [Longest Increasing Subsequence](https://leetcode.com/problems/longest-increasing-subsequence/) | [C++](./solutions/longest-increasing-subsequence/solution.hpp) | | | | | | +| 303. | [Range Sum Query - Immutable](https://leetcode.com/problems/range-sum-query-immutable/) | [C++](./solutions/range-sum-query-immutable/solution.hpp) | | | | | | +| 304. | [Range Sum Query 2D - Immutable](https://leetcode.com/problems/range-sum-query-2d-immutable/) | [C++](./solutions/range-sum-query-2d-immutable/solution.hpp) | | | | | | +| 309. | [Best Time to Buy and Sell Stock with Cooldown](https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-cooldown/) | [C++](./solutions/best-time-to-buy-and-sell-stock-with-cooldown/solution.hpp) | | | | | | +| 316. | [Remove Duplicate Letters](https://leetcode.com/problems/remove-duplicate-letters/) | [C++](./solutions/remove-duplicate-letters/solution.hpp) | | | | | | +| 319. | [Bulb Switcher](https://leetcode.com/problems/bulb-switcher/) | [C++](./solutions/bulb-switcher/solution.hpp) | | | | | | +| 322. | [Coin Change](https://leetcode.com/problems/coin-change/) | [C++](./solutions/coin-change/solution.hpp) | | | | | | +| 326. | [Power of Three](https://leetcode.com/problems/power-of-three/) | [C++](./solutions/power-of-three/solution.hpp) | | | | | | +| 328. | [Odd Even Linked List](https://leetcode.com/problems/odd-even-linked-list/) | [C++](./solutions/odd-even-linked-list/solution.hpp) | | | | | | +| 332. | [Reconstruct Itinerary](https://leetcode.com/problems/reconstruct-itinerary/) | [C++](./solutions/reconstruct-itinerary/solution.hpp) | | | | | | +| 334. | [Increasing Triplet Subsequence](https://leetcode.com/problems/increasing-triplet-subsequence/) | [C++](./solutions/increasing-triplet-subsequence/solution.hpp) | | | | | | +| 338. | [Counting Bits](https://leetcode.com/problems/counting-bits/) | [C++](./solutions/counting-bits/solution.hpp) | | | | | | +| 341. | [Flatten Nested List Iterator](https://leetcode.com/problems/flatten-nested-list-iterator/) | [C++](./solutions/flatten-nested-list-iterator/solution.hpp) | | | | | | +| 342. | [Power of Four](https://leetcode.com/problems/power-of-four/) | [C++](./solutions/power-of-four/solution.hpp) | | | | | | +| 343. | [Integer Break](https://leetcode.com/problems/integer-break/) | [C++](./solutions/integer-break/solution.hpp) | | | | | | +| 344. | [Reverse String](https://leetcode.com/problems/reverse-string/) | [C++](./solutions/reverse-string/solution.hpp) | | | | | | +| 345. | [Reverse Vowels of a String](https://leetcode.com/problems/reverse-vowels-of-a-string/) | [C++](./solutions/reverse-vowels-of-a-string/solution.hpp) | | | | | | +| 347. | [Top K Frequent Elements](https://leetcode.com/problems/top-k-frequent-elements/) | [C++](./solutions/top-k-frequent-elements/solution.hpp) | | | | | | +| 349. | [Intersection of Two Arrays](https://leetcode.com/problems/intersection-of-two-arrays/) | [C++](./solutions/intersection-of-two-arrays/solution.hpp) | | | | | | +| 350. | [Intersection of Two Arrays II](https://leetcode.com/problems/intersection-of-two-arrays-ii/) | [C++](./solutions/intersection-of-two-arrays-ii/solution.hpp) | | | | | | +| 365. | [Water and Jug Problem](https://leetcode.com/problems/water-and-jug-problem/) | [C++](./solutions/water-and-jug-problem/solution.hpp) | | | | | | +| 367. | [Valid Perfect Square](https://leetcode.com/problems/valid-perfect-square/) | [C++](./solutions/valid-perfect-square/solution.hpp) | | | | | | +| 373. | [Find K Pairs with Smallest Sums](https://leetcode.com/problems/find-k-pairs-with-smallest-sums/) | [C++](./solutions/find-k-pairs-with-smallest-sums/solution.hpp) | | | | | | +| 374. | [Guess Number Higher or Lower](https://leetcode.com/problems/guess-number-higher-or-lower/) | [C++](./solutions/guess-number-higher-or-lower/solution.hpp) | | | | | | +| 376. | [Wiggle Subsequence](https://leetcode.com/problems/wiggle-subsequence/) | [C++](./solutions/wiggle-subsequence/solution.hpp) | | | | | | +| 377. | [Combination Sum IV](https://leetcode.com/problems/combination-sum-iv/) | [C++](./solutions/combination-sum-iv/solution.hpp) | | | | | | +| 380. | [Insert Delete GetRandom O(1)](https://leetcode.com/problems/insert-delete-getrandom-o1/) | [C++](./solutions/insert-delete-getrandom-o1/solution.hpp) | | | | | | +| 382. | [Linked List Random Node](https://leetcode.com/problems/linked-list-random-node/) | [C++](./solutions/linked-list-random-node/solution.hpp) | | | | | | +| 383. | [Ransom Note](https://leetcode.com/problems/ransom-note/) | [C++](./solutions/ransom-note/solution.hpp) | | | | | | +| 384. | [Shuffle an Array](https://leetcode.com/problems/shuffle-an-array/) | [C++](./solutions/shuffle-an-array/solution.hpp) | | | | | | +| 387. | [First Unique Character in a String](https://leetcode.com/problems/first-unique-character-in-a-string/) | [C++](./solutions/first-unique-character-in-a-string/solution.hpp) | | | | | | +| 389. | [Find the Difference](https://leetcode.com/problems/find-the-difference/) | [C++](./solutions/find-the-difference/solution.hpp) | | | | | | +| 392. | [Is Subsequence](https://leetcode.com/problems/is-subsequence/) | [C++](./solutions/is-subsequence/solution.hpp) | | | | | | +| 394. | [Decode String](https://leetcode.com/problems/decode-string/) | [C++](./solutions/decode-string/solution.hpp) | | | | | | +| 399. | [Evaluate Division](https://leetcode.com/problems/evaluate-division/) | [C++](./solutions/evaluate-division/solution.hpp) | | | | | | +| 401. | [Binary Watch](https://leetcode.com/problems/binary-watch/) | [C++](./solutions/binary-watch/solution.hpp) | | | | | | +| 403. | [Frog Jump](https://leetcode.com/problems/frog-jump/) | [C++](./solutions/frog-jump/solution.hpp) | | | | | | +| 404. | [Sum of Left Leaves](https://leetcode.com/problems/sum-of-left-leaves/) | [C++](./solutions/sum-of-left-leaves/solution.hpp) | | | | | | +| 405. | [Convert a Number to Hexadecimal](https://leetcode.com/problems/convert-a-number-to-hexadecimal/) | [C++](./solutions/convert-a-number-to-hexadecimal/solution.hpp) | | | | | | +| 409. | [Longest Palindrome](https://leetcode.com/problems/longest-palindrome/) | [C++](./solutions/longest-palindrome/solution.hpp) | | | | | | +| 412. | [Fizz Buzz](https://leetcode.com/problems/fizz-buzz/) | [C++](./solutions/fizz-buzz/solution.hpp) | | | | | | +| 413. | [Arithmetic Slices](https://leetcode.com/problems/arithmetic-slices/) | [C++](./solutions/arithmetic-slices/solution.hpp) | | | | | | +| 414. | [Third Maximum Number](https://leetcode.com/problems/third-maximum-number/) | [C++](./solutions/third-maximum-number/solution.hpp) | | | | | | +| 415. | [Add Strings](https://leetcode.com/problems/add-strings/) | [C++](./solutions/add-strings/solution.hpp) | | | | | | +| 416. | [Partition Equal Subset Sum](https://leetcode.com/problems/partition-equal-subset-sum/) | [C++](./solutions/partition-equal-subset-sum/solution.hpp) | | | | | | +| 417. | [Pacific Atlantic Water Flow](https://leetcode.com/problems/pacific-atlantic-water-flow/) | [C++](./solutions/pacific-atlantic-water-flow/solution.hpp) | | | | | | +| 424. | [Longest Repeating Character Replacement](https://leetcode.com/problems/longest-repeating-character-replacement/) | [C++](./solutions/longest-repeating-character-replacement/solution.hpp) | | | | | | +| 427. | [Construct Quad Tree](https://leetcode.com/problems/construct-quad-tree/) | [C++](./solutions/construct-quad-tree/solution.hpp) | | | | | | +| 429. | [N-ary Tree Level Order Traversal](https://leetcode.com/problems/n-ary-tree-level-order-traversal/) | [C++](./solutions/n-ary-tree-level-order-traversal/solution.hpp) | | | | | | +| 433. | [Minimum Genetic Mutation](https://leetcode.com/problems/minimum-genetic-mutation/) | [C++](./solutions/minimum-genetic-mutation/solution.hpp) | | | | | | +| 434. | [Number of Segments in a String](https://leetcode.com/problems/number-of-segments-in-a-string/) | [C++](./solutions/number-of-segments-in-a-string/solution.hpp) | | | | | | +| 435. | [Non-overlapping Intervals](https://leetcode.com/problems/non-overlapping-intervals/) | [C++](./solutions/non-overlapping-intervals/solution.hpp) | | | | | | +| 436. | [Find Right Interval](https://leetcode.com/problems/find-right-interval/) | [C++](./solutions/find-right-interval/solution.hpp) | | | | | | +| 437. | [Path Sum III](https://leetcode.com/problems/path-sum-iii/) | [C++](./solutions/path-sum-iii/solution.hpp) | | | | | | +| 438. | [Find All Anagrams in a String](https://leetcode.com/problems/find-all-anagrams-in-a-string/) | [C++](./solutions/find-all-anagrams-in-a-string/solution.hpp) | | | | | | +| 441. | [Arranging Coins](https://leetcode.com/problems/arranging-coins/) | [C++](./solutions/arranging-coins/solution.hpp) | | | | | | +| 443. | [String Compression](https://leetcode.com/problems/string-compression/) | [C++](./solutions/string-compression/solution.hpp) | | | | | | +| 445. | [Add Two Numbers II](https://leetcode.com/problems/add-two-numbers-ii/) | [C++](./solutions/add-two-numbers-ii/solution.hpp) | | | | | | +| 448. | [Find All Numbers Disappeared in an Array](https://leetcode.com/problems/find-all-numbers-disappeared-in-an-array/) | [C++](./solutions/find-all-numbers-disappeared-in-an-array/solution.hpp) | | | | | | +| 450. | [Delete Node in a BST](https://leetcode.com/problems/delete-node-in-a-bst/) | [C++](./solutions/delete-node-in-a-bst/solution.hpp) | | | | | | +| 451. | [Sort Characters By Frequency](https://leetcode.com/problems/sort-characters-by-frequency/) | [C++](./solutions/sort-characters-by-frequency/solution.hpp) | | | | | | +| 452. | [Minimum Number of Arrows to Burst Balloons](https://leetcode.com/problems/minimum-number-of-arrows-to-burst-balloons/) | [C++](./solutions/minimum-number-of-arrows-to-burst-balloons/solution.hpp) | | | | | | +| 455. | [Assign Cookies](https://leetcode.com/problems/assign-cookies/) | [C++](./solutions/assign-cookies/solution.hpp) | | | | | | +| 456. | [132 Pattern](https://leetcode.com/problems/132-pattern/) | [C++](./solutions/132-pattern/solution.hpp) | | | | | | +| 459. | [Repeated Substring Pattern](https://leetcode.com/problems/repeated-substring-pattern/) | [C++](./solutions/repeated-substring-pattern/solution.hpp) | | | | | | +| 461. | [Hamming Distance](https://leetcode.com/problems/hamming-distance/) | [C++](./solutions/hamming-distance/solution.hpp) | | | | | | +| 463. | [Island Perimeter](https://leetcode.com/problems/island-perimeter/) | [C++](./solutions/island-perimeter/solution.hpp) | | | | | | +| 476. | [Number Complement](https://leetcode.com/problems/number-complement/) | [C++](./solutions/number-complement/solution.hpp) | | | | | | +| 482. | [License Key Formatting](https://leetcode.com/problems/license-key-formatting/) | [C++](./solutions/license-key-formatting/solution.hpp) | | | | | | +| 485. | [Max Consecutive Ones](https://leetcode.com/problems/max-consecutive-ones/) | [C++](./solutions/max-consecutive-ones/solution.hpp) | | | | | | +| 486. | [Predict the Winner](https://leetcode.com/problems/predict-the-winner/) | [C++](./solutions/predict-the-winner/solution.hpp) | | | | | | +| 492. | [Construct the Rectangle](https://leetcode.com/problems/construct-the-rectangle/) | [C++](./solutions/construct-the-rectangle/solution.hpp) | | | | | | +| 495. | [Teemo Attacking](https://leetcode.com/problems/teemo-attacking/) | [C++](./solutions/teemo-attacking/solution.hpp) | | | | | | +| 496. | [Next Greater Element I](https://leetcode.com/problems/next-greater-element-i/) | [C++](./solutions/next-greater-element-i/solution.hpp) | | | | | | +| 500. | [Keyboard Row](https://leetcode.com/problems/keyboard-row/) | [C++](./solutions/keyboard-row/solution.hpp) | | | | | | +| 501. | [Find Mode in Binary Search Tree](https://leetcode.com/problems/find-mode-in-binary-search-tree/) | [C++](./solutions/find-mode-in-binary-search-tree/solution.hpp) | | | | | | +| 502. | [IPO](https://leetcode.com/problems/ipo/) | [C++](./solutions/ipo/solution.hpp) | | | | | | +| 503. | [Next Greater Element II](https://leetcode.com/problems/next-greater-element-ii/) | [C++](./solutions/next-greater-element-ii/solution.hpp) | | | | | | +| 504. | [Base 7](https://leetcode.com/problems/base-7/) | [C++](./solutions/base-7/solution.hpp) | | | | | | +| 506. | [Relative Ranks](https://leetcode.com/problems/relative-ranks/) | [C++](./solutions/relative-ranks/solution.hpp) | | | | | | +| 507. | [Perfect Number](https://leetcode.com/problems/perfect-number/) | [C++](./solutions/perfect-number/solution.hpp) | | | | | | +| 509. | [Fibonacci Number](https://leetcode.com/problems/fibonacci-number/) | [C++](./solutions/fibonacci-number/solution.hpp) | | | | | | +| 515. | [Find Largest Value in Each Tree Row](https://leetcode.com/problems/find-largest-value-in-each-tree-row/) | [C++](./solutions/find-largest-value-in-each-tree-row/solution.hpp) | | | | | | +| 516. | [Longest Palindromic Subsequence](https://leetcode.com/problems/longest-palindromic-subsequence/) | [C++](./solutions/longest-palindromic-subsequence/solution.hpp) | | | | | | +| 518. | [Coin Change II](https://leetcode.com/problems/coin-change-ii/) | [C++](./solutions/coin-change-ii/solution.hpp) | | | | | | +| 520. | [Detect Capital](https://leetcode.com/problems/detect-capital/) | [C++](./solutions/detect-capital/solution.hpp) | | | | | | +| 521. | [Longest Uncommon Subsequence I](https://leetcode.com/problems/longest-uncommon-subsequence-i/) | [C++](./solutions/longest-uncommon-subsequence-i/solution.hpp) | | | | | | +| 528. | [Random Pick with Weight](https://leetcode.com/problems/random-pick-with-weight/) | [C++](./solutions/random-pick-with-weight/solution.hpp) | | | | | | +| 530. | [Minimum Absolute Difference in BST](https://leetcode.com/problems/minimum-absolute-difference-in-bst/) | [C++](./solutions/minimum-absolute-difference-in-bst/solution.hpp) | | | | | | +| 540. | [Single Element in a Sorted Array](https://leetcode.com/problems/single-element-in-a-sorted-array/) | [C++](./solutions/single-element-in-a-sorted-array/solution.hpp) | | | | | | +| 541. | [Reverse String II](https://leetcode.com/problems/reverse-string-ii/) | [C++](./solutions/reverse-string-ii/solution.hpp) | | | | | | +| 542. | [01 Matrix](https://leetcode.com/problems/01-matrix/) | [C++](./solutions/01-matrix/solution.hpp) | | | | | | +| 543. | [Diameter of Binary Tree](https://leetcode.com/problems/diameter-of-binary-tree/) | [C++](./solutions/diameter-of-binary-tree/solution.hpp) | | | | | | +| 547. | [Number of Provinces](https://leetcode.com/problems/number-of-provinces/) | [C++](./solutions/number-of-provinces/solution.hpp) | | | | | | +| 551. | [Student Attendance Record I](https://leetcode.com/problems/student-attendance-record-i/) | [C++](./solutions/student-attendance-record-i/solution.hpp) | | | | | | +| 556. | [Next Greater Element III](https://leetcode.com/problems/next-greater-element-iii/) | [C++](./solutions/next-greater-element-iii/solution.hpp) | | | | | | +| 557. | [Reverse Words in a String III](https://leetcode.com/problems/reverse-words-in-a-string-iii/) | [C++](./solutions/reverse-words-in-a-string-iii/solution.hpp) | | | | | | +| 559. | [Maximum Depth of N-ary Tree](https://leetcode.com/problems/maximum-depth-of-n-ary-tree/) | [C++](./solutions/maximum-depth-of-n-ary-tree/solution.hpp) | | | | | | +| 560. | [Subarray Sum Equals K](https://leetcode.com/problems/subarray-sum-equals-k/) | [C++](./solutions/subarray-sum-equals-k/solution.hpp) | | | | | | +| 561. | [Array Partition](https://leetcode.com/problems/array-partition/) | [C++](./solutions/array-partition/solution.hpp) | | | | | | +| 563. | [Binary Tree Tilt](https://leetcode.com/problems/binary-tree-tilt/) | [C++](./solutions/binary-tree-tilt/solution.hpp) | | | | | | +| 566. | [Reshape the Matrix](https://leetcode.com/problems/reshape-the-matrix/) | [C++](./solutions/reshape-the-matrix/solution.hpp) | | | | | | +| 567. | [Permutation in String](https://leetcode.com/problems/permutation-in-string/) | [C++](./solutions/permutation-in-string/solution.hpp) | | | | | | +| 572. | [Subtree of Another Tree](https://leetcode.com/problems/subtree-of-another-tree/) | [C++](./solutions/subtree-of-another-tree/solution.hpp) | | | | | | +| 575. | [Distribute Candies](https://leetcode.com/problems/distribute-candies/) | [C++](./solutions/distribute-candies/solution.hpp) | | | | | | +| 583. | [Delete Operation for Two Strings](https://leetcode.com/problems/delete-operation-for-two-strings/) | [C++](./solutions/delete-operation-for-two-strings/solution.hpp) | | | | | | +| 589. | [N-ary Tree Preorder Traversal](https://leetcode.com/problems/n-ary-tree-preorder-traversal/) | [C++](./solutions/n-ary-tree-preorder-traversal/solution.hpp) | | | | | | +| 590. | [N-ary Tree Postorder Traversal](https://leetcode.com/problems/n-ary-tree-postorder-traversal/) | [C++](./solutions/n-ary-tree-postorder-traversal/solution.hpp) | | | | | | +| 594. | [Longest Harmonious Subsequence](https://leetcode.com/problems/longest-harmonious-subsequence/) | [C++](./solutions/longest-harmonious-subsequence/solution.hpp) | | | | | | +| 598. | [Range Addition II](https://leetcode.com/problems/range-addition-ii/) | [C++](./solutions/range-addition-ii/solution.hpp) | | | | | | +| 599. | [Minimum Index Sum of Two Lists](https://leetcode.com/problems/minimum-index-sum-of-two-lists/) | [C++](./solutions/minimum-index-sum-of-two-lists/solution.hpp) | | | | | | +| 605. | [Can Place Flowers](https://leetcode.com/problems/can-place-flowers/) | [C++](./solutions/can-place-flowers/solution.hpp) | | | | | | +| 606. | [Construct String from Binary Tree](https://leetcode.com/problems/construct-string-from-binary-tree/) | [C++](./solutions/construct-string-from-binary-tree/solution.hpp) | | | | | | +| 611. | [Valid Triangle Number](https://leetcode.com/problems/valid-triangle-number/) | [C++](./solutions/valid-triangle-number/solution.hpp) | | | | | | +| 617. | [Merge Two Binary Trees](https://leetcode.com/problems/merge-two-binary-trees/) | [C++](./solutions/merge-two-binary-trees/solution.hpp) | | | | | | +| 621. | [Task Scheduler](https://leetcode.com/problems/task-scheduler/) | [C++](./solutions/task-scheduler/solution.hpp) | | | | | | +| 622. | [Design Circular Queue](https://leetcode.com/problems/design-circular-queue/) | [C++](./solutions/design-circular-queue/solution.hpp) | | | | | | +| 628. | [Maximum Product of Three Numbers](https://leetcode.com/problems/maximum-product-of-three-numbers/) | [C++](./solutions/maximum-product-of-three-numbers/solution.hpp) | | | | | | +| 633. | [Sum of Square Numbers](https://leetcode.com/problems/sum-of-square-numbers/) | [C++](./solutions/sum-of-square-numbers/solution.hpp) | | | | | | +| 637. | [Average of Levels in Binary Tree](https://leetcode.com/problems/average-of-levels-in-binary-tree/) | [C++](./solutions/average-of-levels-in-binary-tree/solution.hpp) | | | | | | +| 643. | [Maximum Average Subarray I](https://leetcode.com/problems/maximum-average-subarray-i/) | [C++](./solutions/maximum-average-subarray-i/solution.hpp) | | | | | | +| 645. | [Set Mismatch](https://leetcode.com/problems/set-mismatch/) | [C++](./solutions/set-mismatch/solution.hpp) | | | | | | +| 646. | [Maximum Length of Pair Chain](https://leetcode.com/problems/maximum-length-of-pair-chain/) | [C++](./solutions/maximum-length-of-pair-chain/solution.hpp) | | | | | | +| 649. | [Dota2 Senate](https://leetcode.com/problems/dota2-senate/) | [C++](./solutions/dota2-senate/solution.hpp) | | | | | | +| 652. | [Find Duplicate Subtrees](https://leetcode.com/problems/find-duplicate-subtrees/) | [C++](./solutions/find-duplicate-subtrees/solution.hpp) | | | | | | +| 653. | [Two Sum IV - Input is a BST](https://leetcode.com/problems/two-sum-iv-input-is-a-bst/) | [C++](./solutions/two-sum-iv-input-is-a-bst/solution.hpp) | | | | | | +| 657. | [Robot Return to Origin](https://leetcode.com/problems/robot-return-to-origin/) | [C++](./solutions/robot-return-to-origin/solution.hpp) | | | | | | +| 658. | [Find K Closest Elements](https://leetcode.com/problems/find-k-closest-elements/) | [C++](./solutions/find-k-closest-elements/solution.hpp) | | | | | | +| 661. | [Image Smoother](https://leetcode.com/problems/image-smoother/) | [C++](./solutions/image-smoother/solution.hpp) | | | | | | +| 662. | [Maximum Width of Binary Tree](https://leetcode.com/problems/maximum-width-of-binary-tree/) | [C++](./solutions/maximum-width-of-binary-tree/solution.hpp) | | | | | | +| 664. | [Strange Printer](https://leetcode.com/problems/strange-printer/) | [C++](./solutions/strange-printer/solution.hpp) | | | | | | +| 671. | [Second Minimum Node In a Binary Tree](https://leetcode.com/problems/second-minimum-node-in-a-binary-tree/) | [C++](./solutions/second-minimum-node-in-a-binary-tree/solution.hpp) | | | | | | +| 673. | [Number of Longest Increasing Subsequence](https://leetcode.com/problems/number-of-longest-increasing-subsequence/) | [C++](./solutions/number-of-longest-increasing-subsequence/solution.hpp) | | | | | | +| 674. | [Longest Continuous Increasing Subsequence](https://leetcode.com/problems/longest-continuous-increasing-subsequence/) | [C++](./solutions/longest-continuous-increasing-subsequence/solution.hpp) | | | | | | +| 680. | [Valid Palindrome II](https://leetcode.com/problems/valid-palindrome-ii/) | [C++](./solutions/valid-palindrome-ii/solution.hpp) | | | | | | +| 682. | [Baseball Game](https://leetcode.com/problems/baseball-game/) | [C++](./solutions/baseball-game/solution.hpp) | | | | | | +| 686. | [Repeated String Match](https://leetcode.com/problems/repeated-string-match/) | [C++](./solutions/repeated-string-match/solution.hpp) | | | | | | +| 688. | [Knight Probability in Chessboard](https://leetcode.com/problems/knight-probability-in-chessboard/) | [C++](./solutions/knight-probability-in-chessboard/solution.hpp) | | | | | | +| 692. | [Top K Frequent Words](https://leetcode.com/problems/top-k-frequent-words/) | [C++](./solutions/top-k-frequent-words/solution.hpp) | | | | | | +| 693. | [Binary Number with Alternating Bits](https://leetcode.com/problems/binary-number-with-alternating-bits/) | [C++](./solutions/binary-number-with-alternating-bits/solution.hpp) | | | | | | +| 695. | [Max Area of Island](https://leetcode.com/problems/max-area-of-island/) | [C++](./solutions/max-area-of-island/solution.hpp) | | | | | | +| 696. | [Count Binary Substrings](https://leetcode.com/problems/count-binary-substrings/) | [C++](./solutions/count-binary-substrings/solution.hpp) | | | | | | +| 697. | [Degree of an Array](https://leetcode.com/problems/degree-of-an-array/) | [C++](./solutions/degree-of-an-array/solution.hpp) | | | | | | +| 700. | [Search in a Binary Search Tree](https://leetcode.com/problems/search-in-a-binary-search-tree/) | [C++](./solutions/search-in-a-binary-search-tree/solution.hpp) | | | | | | +| 701. | [Insert into a Binary Search Tree](https://leetcode.com/problems/insert-into-a-binary-search-tree/) | [C++](./solutions/insert-into-a-binary-search-tree/solution.hpp) | | | | | | +| 703. | [Kth Largest Element in a Stream](https://leetcode.com/problems/kth-largest-element-in-a-stream/) | [C++](./solutions/kth-largest-element-in-a-stream/solution.hpp) | | | | | | +| 704. | [Binary Search](https://leetcode.com/problems/binary-search/) | [C++](./solutions/binary-search/solution.hpp) | | | | | | +| 705. | [Design HashSet](https://leetcode.com/problems/design-hashset/) | [C++](./solutions/design-hashset/solution.hpp) | | | | | | +| 706. | [Design HashMap](https://leetcode.com/problems/design-hashmap/) | [C++](./solutions/design-hashmap/solution.hpp) | | | | | | +| 707. | [Design Linked List](https://leetcode.com/problems/design-linked-list/) | [C++](./solutions/design-linked-list/solution.hpp) | | | | | | +| 709. | [To Lower Case](https://leetcode.com/problems/to-lower-case/) | [C++](./solutions/to-lower-case/solution.hpp) | | | | | | +| 712. | [Minimum ASCII Delete Sum for Two Strings](https://leetcode.com/problems/minimum-ascii-delete-sum-for-two-strings/) | [C++](./solutions/minimum-ascii-delete-sum-for-two-strings/solution.hpp) | | | | | | +| 713. | [Subarray Product Less Than K](https://leetcode.com/problems/subarray-product-less-than-k/) | [C++](./solutions/subarray-product-less-than-k/solution.hpp) | | | | | | +| 714. | [Best Time to Buy and Sell Stock with Transaction Fee](https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-transaction-fee/) | [C++](./solutions/best-time-to-buy-and-sell-stock-with-transaction-fee/solution.hpp) | | | | | | +| 717. | [1-bit and 2-bit Characters](https://leetcode.com/problems/1-bit-and-2-bit-characters/) | [C++](./solutions/1-bit-and-2-bit-characters/solution.hpp) | | | | | | +| 724. | [Find Pivot Index](https://leetcode.com/problems/find-pivot-index/) | [C++](./solutions/find-pivot-index/solution.hpp) | | | | | | +| 725. | [Split Linked List in Parts](https://leetcode.com/problems/split-linked-list-in-parts/) | [C++](./solutions/split-linked-list-in-parts/solution.hpp) | | | | | | +| 728. | [Self Dividing Numbers](https://leetcode.com/problems/self-dividing-numbers/) | [C++](./solutions/self-dividing-numbers/solution.hpp) | | | | | | +| 729. | [My Calendar I](https://leetcode.com/problems/my-calendar-i/) | [C++](./solutions/my-calendar-i/solution.hpp) | | | | | | +| 731. | [My Calendar II](https://leetcode.com/problems/my-calendar-ii/) | [C++](./solutions/my-calendar-ii/solution.hpp) | | | | | | +| 732. | [My Calendar III](https://leetcode.com/problems/my-calendar-iii/) | [C++](./solutions/my-calendar-iii/solution.hpp) | | | | | | +| 733. | [Flood Fill](https://leetcode.com/problems/flood-fill/) | [C++](./solutions/flood-fill/solution.hpp) | | | | | | +| 735. | [Asteroid Collision](https://leetcode.com/problems/asteroid-collision/) | [C++](./solutions/asteroid-collision/solution.hpp) | | | | | | +| 739. | [Daily Temperatures](https://leetcode.com/problems/daily-temperatures/) | [C++](./solutions/daily-temperatures/solution.hpp) | | | | | | +| 740. | [Delete and Earn](https://leetcode.com/problems/delete-and-earn/) | [C++](./solutions/delete-and-earn/solution.hpp) | | | | | | +| 741. | [Cherry Pickup](https://leetcode.com/problems/cherry-pickup/) | [C++](./solutions/cherry-pickup/solution.hpp) | | | | | | +| 744. | [Find Smallest Letter Greater Than Target](https://leetcode.com/problems/find-smallest-letter-greater-than-target/) | [C++](./solutions/find-smallest-letter-greater-than-target/solution.hpp) | | | | | | +| 746. | [Min Cost Climbing Stairs](https://leetcode.com/problems/min-cost-climbing-stairs/) | [C++](./solutions/min-cost-climbing-stairs/solution.hpp) | | | | | | +| 747. | [Largest Number At Least Twice of Others](https://leetcode.com/problems/largest-number-at-least-twice-of-others/) | [C++](./solutions/largest-number-at-least-twice-of-others/solution.hpp) | | | | | | +| 748. | [Shortest Completing Word](https://leetcode.com/problems/shortest-completing-word/) | [C++](./solutions/shortest-completing-word/solution.hpp) | | | | | | +| 752. | [Open the Lock](https://leetcode.com/problems/open-the-lock/) | [C++](./solutions/open-the-lock/solution.hpp) | | | | | | +| 762. | [Prime Number of Set Bits in Binary Representation](https://leetcode.com/problems/prime-number-of-set-bits-in-binary-representation/) | [C++](./solutions/prime-number-of-set-bits-in-binary-representation/solution.hpp) | | | | | | +| 763. | [Partition Labels](https://leetcode.com/problems/partition-labels/) | [C++](./solutions/partition-labels/solution.hpp) | | | | | | +| 766. | [Toeplitz Matrix](https://leetcode.com/problems/toeplitz-matrix/) | [C++](./solutions/toeplitz-matrix/solution.hpp) | | | | | | +| 767. | [Reorganize String](https://leetcode.com/problems/reorganize-string/) | [C++](./solutions/reorganize-string/solution.hpp) | | | | | | +| 771. | [Jewels and Stones](https://leetcode.com/problems/jewels-and-stones/) | [C++](./solutions/jewels-and-stones/solution.hpp) | | | | | | +| 773. | [Sliding Puzzle](https://leetcode.com/problems/sliding-puzzle/) | [C++](./solutions/sliding-puzzle/solution.hpp) | | | | | | +| 779. | [K-th Symbol in Grammar](https://leetcode.com/problems/k-th-symbol-in-grammar/) | [C++](./solutions/k-th-symbol-in-grammar/solution.hpp) | | | | | | +| 783. | [Minimum Distance Between BST Nodes](https://leetcode.com/problems/minimum-distance-between-bst-nodes/) | [C++](./solutions/minimum-distance-between-bst-nodes/solution.hpp) | | | | | | +| 784. | [Letter Case Permutation](https://leetcode.com/problems/letter-case-permutation/) | [C++](./solutions/letter-case-permutation/solution.hpp) | | | | | | +| 785. | [Is Graph Bipartite?](https://leetcode.com/problems/is-graph-bipartite/) | [C++](./solutions/is-graph-bipartite/solution.hpp) | | | | | | +| 787. | [Cheapest Flights Within K Stops](https://leetcode.com/problems/cheapest-flights-within-k-stops/) | [C++](./solutions/cheapest-flights-within-k-stops/solution.hpp) | | | | | | +| 790. | [Domino and Tromino Tiling](https://leetcode.com/problems/domino-and-tromino-tiling/) | [C++](./solutions/domino-and-tromino-tiling/solution.hpp) | | | | | | +| 796. | [Rotate String](https://leetcode.com/problems/rotate-string/) | [C++](./solutions/rotate-string/solution.hpp) | | | | | | +| 797. | [All Paths From Source to Target](https://leetcode.com/problems/all-paths-from-source-to-target/) | [C++](./solutions/all-paths-from-source-to-target/solution.hpp) | | | | | | +| 799. | [Champagne Tower](https://leetcode.com/problems/champagne-tower/) | [C++](./solutions/champagne-tower/solution.hpp) | | | | | | +| 802. | [Find Eventual Safe States](https://leetcode.com/problems/find-eventual-safe-states/) | [C++](./solutions/find-eventual-safe-states/solution.hpp) | | | | | | +| 804. | [Unique Morse Code Words](https://leetcode.com/problems/unique-morse-code-words/) | [C++](./solutions/unique-morse-code-words/solution.hpp) | | | | | | +| 806. | [Number of Lines To Write String](https://leetcode.com/problems/number-of-lines-to-write-string/) | [C++](./solutions/number-of-lines-to-write-string/solution.hpp) | | | | | | +| 808. | [Soup Servings](https://leetcode.com/problems/soup-servings/) | [C++](./solutions/soup-servings/solution.hpp) | | | | | | +| 812. | [Largest Triangle Area](https://leetcode.com/problems/largest-triangle-area/) | [C++](./solutions/largest-triangle-area/solution.hpp) | | | | | | +| 815. | [Bus Routes](https://leetcode.com/problems/bus-routes/) | [C++](./solutions/bus-routes/solution.hpp) | | | | | | +| 819. | [Most Common Word](https://leetcode.com/problems/most-common-word/) | [C++](./solutions/most-common-word/solution.hpp) | | | | | | +| 821. | [Shortest Distance to a Character](https://leetcode.com/problems/shortest-distance-to-a-character/) | [C++](./solutions/shortest-distance-to-a-character/solution.hpp) | | | | | | +| 823. | [Binary Trees With Factors](https://leetcode.com/problems/binary-trees-with-factors/) | [C++](./solutions/binary-trees-with-factors/solution.hpp) | | | | | | +| 824. | [Goat Latin](https://leetcode.com/problems/goat-latin/) | [C++](./solutions/goat-latin/solution.hpp) | | | | | | +| 826. | [Most Profit Assigning Work](https://leetcode.com/problems/most-profit-assigning-work/) | [C++](./solutions/most-profit-assigning-work/solution.hpp) | | | | | | +| 830. | [Positions of Large Groups](https://leetcode.com/problems/positions-of-large-groups/) | [C++](./solutions/positions-of-large-groups/solution.hpp) | | | | | | +| 832. | [Flipping an Image](https://leetcode.com/problems/flipping-an-image/) | [C++](./solutions/flipping-an-image/solution.hpp) | | | | | | +| 836. | [Rectangle Overlap](https://leetcode.com/problems/rectangle-overlap/) | [C++](./solutions/rectangle-overlap/solution.hpp) | | | | | | +| 837. | [New 21 Game](https://leetcode.com/problems/new-21-game/) | [C++](./solutions/new-21-game/solution.hpp) | | | | | | +| 839. | [Similar String Groups](https://leetcode.com/problems/similar-string-groups/) | [C++](./solutions/similar-string-groups/solution.hpp) | | | | | | +| 841. | [Keys and Rooms](https://leetcode.com/problems/keys-and-rooms/) | [C++](./solutions/keys-and-rooms/solution.hpp) | | | | | | +| 843. | [Guess the Word](https://leetcode.com/problems/guess-the-word/) | [C++](./solutions/guess-the-word/solution.hpp) | | | | | | +| 844. | [Backspace String Compare](https://leetcode.com/problems/backspace-string-compare/) | [C++](./solutions/backspace-string-compare/solution.hpp) | | | | | | +| 847. | [Shortest Path Visiting All Nodes](https://leetcode.com/problems/shortest-path-visiting-all-nodes/) | [C++](./solutions/shortest-path-visiting-all-nodes/solution.hpp) | | | | | | +| 852. | [Peak Index in a Mountain Array](https://leetcode.com/problems/peak-index-in-a-mountain-array/) | [C++](./solutions/peak-index-in-a-mountain-array/solution.hpp) | | | | | | +| 859. | [Buddy Strings](https://leetcode.com/problems/buddy-strings/) | [C++](./solutions/buddy-strings/solution.hpp) | | | | | | +| 860. | [Lemonade Change](https://leetcode.com/problems/lemonade-change/) | [C++](./solutions/lemonade-change/solution.hpp) | | | | | | +| 863. | [All Nodes Distance K in Binary Tree](https://leetcode.com/problems/all-nodes-distance-k-in-binary-tree/) | [C++](./solutions/all-nodes-distance-k-in-binary-tree/solution.hpp) | | | | | | +| 864. | [Shortest Path to Get All Keys](https://leetcode.com/problems/shortest-path-to-get-all-keys/) | [C++](./solutions/shortest-path-to-get-all-keys/solution.hpp) | | | | | | +| 867. | [Transpose Matrix](https://leetcode.com/problems/transpose-matrix/) | [C++](./solutions/transpose-matrix/solution.hpp) | | | | | | +| 868. | [Binary Gap](https://leetcode.com/problems/binary-gap/) | [C++](./solutions/binary-gap/solution.hpp) | | | | | | +| 872. | [Leaf-Similar Trees](https://leetcode.com/problems/leaf-similar-trees/) | [C++](./solutions/leaf-similar-trees/solution.hpp) | | | | | | +| 875. | [Koko Eating Bananas](https://leetcode.com/problems/koko-eating-bananas/) | [C++](./solutions/koko-eating-bananas/solution.hpp) | | | | | | +| 876. | [Middle of the Linked List](https://leetcode.com/problems/middle-of-the-linked-list/) | [C++](./solutions/middle-of-the-linked-list/solution.hpp) | | | | | | +| 879. | [Profitable Schemes](https://leetcode.com/problems/profitable-schemes/) | [C++](./solutions/profitable-schemes/solution.hpp) | | | | | | +| 880. | [Decoded String at Index](https://leetcode.com/problems/decoded-string-at-index/) | [C++](./solutions/decoded-string-at-index/solution.hpp) | | | | | | +| 881. | [Boats to Save People](https://leetcode.com/problems/boats-to-save-people/) | [C++](./solutions/boats-to-save-people/solution.hpp) | | | | | | +| 883. | [Projection Area of 3D Shapes](https://leetcode.com/problems/projection-area-of-3d-shapes/) | [C++](./solutions/projection-area-of-3d-shapes/solution.hpp) | | | | | | +| 884. | [Uncommon Words from Two Sentences](https://leetcode.com/problems/uncommon-words-from-two-sentences/) | [C++](./solutions/uncommon-words-from-two-sentences/solution.hpp) | | | | | | +| 886. | [Possible Bipartition](https://leetcode.com/problems/possible-bipartition/) | [C++](./solutions/possible-bipartition/solution.hpp) | | | | | | +| 888. | [Fair Candy Swap](https://leetcode.com/problems/fair-candy-swap/) | [C++](./solutions/fair-candy-swap/solution.hpp) | | | | | | +| 892. | [Surface Area of 3D Shapes](https://leetcode.com/problems/surface-area-of-3d-shapes/) | [C++](./solutions/surface-area-of-3d-shapes/solution.hpp) | | | | | | +| 894. | [All Possible Full Binary Trees](https://leetcode.com/problems/all-possible-full-binary-trees/) | [C++](./solutions/all-possible-full-binary-trees/solution.hpp) | | | | | | +| 895. | [Maximum Frequency Stack](https://leetcode.com/problems/maximum-frequency-stack/) | [C++](./solutions/maximum-frequency-stack/solution.hpp) | | | | | | +| 896. | [Monotonic Array](https://leetcode.com/problems/monotonic-array/) | [C++](./solutions/monotonic-array/solution.hpp) | | | | | | +| 897. | [Increasing Order Search Tree](https://leetcode.com/problems/increasing-order-search-tree/) | [C++](./solutions/increasing-order-search-tree/solution.hpp) | | | | | | +| 899. | [Orderly Queue](https://leetcode.com/problems/orderly-queue/) | [C++](./solutions/orderly-queue/solution.hpp) | | | | | | +| 901. | [Online Stock Span](https://leetcode.com/problems/online-stock-span/) | [C++](./solutions/online-stock-span/solution.hpp) | | | | | | +| 905. | [Sort Array By Parity](https://leetcode.com/problems/sort-array-by-parity/) | [C++](./solutions/sort-array-by-parity/solution.hpp) | | | | | | +| 908. | [Smallest Range I](https://leetcode.com/problems/smallest-range-i/) | [C++](./solutions/smallest-range-i/solution.hpp) | | | | | | +| 909. | [Snakes and Ladders](https://leetcode.com/problems/snakes-and-ladders/) | [C++](./solutions/snakes-and-ladders/solution.hpp) | | | | | | +| 910. | [Smallest Range II](https://leetcode.com/problems/smallest-range-ii/) | [C++](./solutions/smallest-range-ii/solution.hpp) | | | | | | +| 911. | [Online Election](https://leetcode.com/problems/online-election/) | [C++](./solutions/online-election/solution.hpp) | | | | | | +| 912. | [Sort an Array](https://leetcode.com/problems/sort-an-array/) | [C++](./solutions/sort-an-array/solution.hpp) | | | | | | +| 914. | [X of a Kind in a Deck of Cards](https://leetcode.com/problems/x-of-a-kind-in-a-deck-of-cards/) | [C++](./solutions/x-of-a-kind-in-a-deck-of-cards/solution.hpp) | | | | | | +| 917. | [Reverse Only Letters](https://leetcode.com/problems/reverse-only-letters/) | [C++](./solutions/reverse-only-letters/solution.hpp) | | | | | | +| 918. | [Maximum Sum Circular Subarray](https://leetcode.com/problems/maximum-sum-circular-subarray/) | [C++](./solutions/maximum-sum-circular-subarray/solution.hpp) | | | | | | +| 920. | [Number of Music Playlists](https://leetcode.com/problems/number-of-music-playlists/) | [C++](./solutions/number-of-music-playlists/solution.hpp) | | | | | | +| 922. | [Sort Array By Parity II](https://leetcode.com/problems/sort-array-by-parity-ii/) | [C++](./solutions/sort-array-by-parity-ii/solution.hpp) | | | | | | +| 925. | [Long Pressed Name](https://leetcode.com/problems/long-pressed-name/) | [C++](./solutions/long-pressed-name/solution.hpp) | | | | | | +| 929. | [Unique Email Addresses](https://leetcode.com/problems/unique-email-addresses/) | [C++](./solutions/unique-email-addresses/solution.hpp) | | | | | | +| 931. | [Minimum Falling Path Sum](https://leetcode.com/problems/minimum-falling-path-sum/) | [C++](./solutions/minimum-falling-path-sum/solution.hpp) | | | | | | +| 933. | [Number of Recent Calls](https://leetcode.com/problems/number-of-recent-calls/) | [C++](./solutions/number-of-recent-calls/solution.hpp) | | | | | | +| 934. | [Shortest Bridge](https://leetcode.com/problems/shortest-bridge/) | [C++](./solutions/shortest-bridge/solution.hpp) | | | | | | +| 938. | [Range Sum of BST](https://leetcode.com/problems/range-sum-of-bst/) | [C++](./solutions/range-sum-of-bst/solution.hpp) | | | | | | +| 941. | [Valid Mountain Array](https://leetcode.com/problems/valid-mountain-array/) | [C++](./solutions/valid-mountain-array/solution.hpp) | | | | | | +| 942. | [DI String Match](https://leetcode.com/problems/di-string-match/) | [C++](./solutions/di-string-match/solution.hpp) | | | | | | +| 944. | [Delete Columns to Make Sorted](https://leetcode.com/problems/delete-columns-to-make-sorted/) | [C++](./solutions/delete-columns-to-make-sorted/solution.hpp) | | | | | | +| 946. | [Validate Stack Sequences](https://leetcode.com/problems/validate-stack-sequences/) | [C++](./solutions/validate-stack-sequences/solution.hpp) | | | | | | +| 947. | [Most Stones Removed with Same Row or Column](https://leetcode.com/problems/most-stones-removed-with-same-row-or-column/) | [C++](./solutions/most-stones-removed-with-same-row-or-column/solution.hpp) | | | | | | +| 949. | [Largest Time for Given Digits](https://leetcode.com/problems/largest-time-for-given-digits/) | [C++](./solutions/largest-time-for-given-digits/solution.hpp) | | | | | | +| 953. | [Verifying an Alien Dictionary](https://leetcode.com/problems/verifying-an-alien-dictionary/) | [C++](./solutions/verifying-an-alien-dictionary/solution.hpp) | | | | | | +| 956. | [Tallest Billboard](https://leetcode.com/problems/tallest-billboard/) | [C++](./solutions/tallest-billboard/solution.hpp) | | | | | | +| 958. | [Check Completeness of a Binary Tree](https://leetcode.com/problems/check-completeness-of-a-binary-tree/) | [C++](./solutions/check-completeness-of-a-binary-tree/solution.hpp) | | | | | | +| 961. | [N-Repeated Element in Size 2N Array](https://leetcode.com/problems/n-repeated-element-in-size-2n-array/) | [C++](./solutions/n-repeated-element-in-size-2n-array/solution.hpp) | | | | | | +| 965. | [Univalued Binary Tree](https://leetcode.com/problems/univalued-binary-tree/) | [C++](./solutions/univalued-binary-tree/solution.hpp) | | | | | | +| 973. | [K Closest Points to Origin](https://leetcode.com/problems/k-closest-points-to-origin/) | [C++](./solutions/k-closest-points-to-origin/solution.hpp) | | | | | | +| 976. | [Largest Perimeter Triangle](https://leetcode.com/problems/largest-perimeter-triangle/) | [C++](./solutions/largest-perimeter-triangle/solution.hpp) | | | | | | +| 977. | [Squares of a Sorted Array](https://leetcode.com/problems/squares-of-a-sorted-array/) | [C++](./solutions/squares-of-a-sorted-array/solution.hpp) | | | | | | +| 980. | [Unique Paths III](https://leetcode.com/problems/unique-paths-iii/) | [C++](./solutions/unique-paths-iii/solution.hpp) | | | | | | +| 981. | [Time Based Key-Value Store](https://leetcode.com/problems/time-based-key-value-store/) | [C++](./solutions/time-based-key-value-store/solution.hpp) | | | | | | +| 983. | [Minimum Cost For Tickets](https://leetcode.com/problems/minimum-cost-for-tickets/) | [C++](./solutions/minimum-cost-for-tickets/solution.hpp) | | | | | | +| 986. | [Interval List Intersections](https://leetcode.com/problems/interval-list-intersections/) | [C++](./solutions/interval-list-intersections/solution.hpp) | | | | | | +| 989. | [Add to Array-Form of Integer](https://leetcode.com/problems/add-to-array-form-of-integer/) | [C++](./solutions/add-to-array-form-of-integer/solution.hpp) | | | | | | +| 993. | [Cousins in Binary Tree](https://leetcode.com/problems/cousins-in-binary-tree/) | [C++](./solutions/cousins-in-binary-tree/solution.hpp) | | | | | | +| 994. | [Rotting Oranges](https://leetcode.com/problems/rotting-oranges/) | [C++](./solutions/rotting-oranges/solution.hpp) | | | | | | +| 997. | [Find the Town Judge](https://leetcode.com/problems/find-the-town-judge/) | [C++](./solutions/find-the-town-judge/solution.hpp) | | | | | | +| 999. | [Available Captures for Rook](https://leetcode.com/problems/available-captures-for-rook/) | [C++](./solutions/available-captures-for-rook/solution.hpp) | | | | | | +| 1002. | [Find Common Characters](https://leetcode.com/problems/find-common-characters/) | [C++](./solutions/find-common-characters/solution.hpp) | | | | | | +| 1004. | [Max Consecutive Ones III](https://leetcode.com/problems/max-consecutive-ones-iii/) | [C++](./solutions/max-consecutive-ones-iii/solution.hpp) | | | | | | +| 1005. | [Maximize Sum Of Array After K Negations](https://leetcode.com/problems/maximize-sum-of-array-after-k-negations/) | [C++](./solutions/maximize-sum-of-array-after-k-negations/solution.hpp) | | | | | | +| 1009. | [Complement of Base 10 Integer](https://leetcode.com/problems/complement-of-base-10-integer/) | [C++](./solutions/complement-of-base-10-integer/solution.hpp) | | | | | | +| 1011. | [Capacity To Ship Packages Within D Days](https://leetcode.com/problems/capacity-to-ship-packages-within-d-days/) | [C++](./solutions/capacity-to-ship-packages-within-d-days/solution.hpp) | | | | | | +| 1013. | [Partition Array Into Three Parts With Equal Sum](https://leetcode.com/problems/partition-array-into-three-parts-with-equal-sum/) | [C++](./solutions/partition-array-into-three-parts-with-equal-sum/solution.hpp) | | | | | | +| 1014. | [Best Sightseeing Pair](https://leetcode.com/problems/best-sightseeing-pair/) | [C++](./solutions/best-sightseeing-pair/solution.hpp) | | | | | | +| 1018. | [Binary Prefix Divisible By 5](https://leetcode.com/problems/binary-prefix-divisible-by-5/) | [C++](./solutions/binary-prefix-divisible-by-5/solution.hpp) | | | | | | +| 1020. | [Number of Enclaves](https://leetcode.com/problems/number-of-enclaves/) | [C++](./solutions/number-of-enclaves/solution.hpp) | | | | | | +| 1021. | [Remove Outermost Parentheses](https://leetcode.com/problems/remove-outermost-parentheses/) | [C++](./solutions/remove-outermost-parentheses/solution.hpp) | | | | | | +| 1022. | [Sum of Root To Leaf Binary Numbers](https://leetcode.com/problems/sum-of-root-to-leaf-binary-numbers/) | [C++](./solutions/sum-of-root-to-leaf-binary-numbers/solution.hpp) | | | | | | +| 1025. | [Divisor Game](https://leetcode.com/problems/divisor-game/) | [C++](./solutions/divisor-game/solution.hpp) | | | | | | +| 1027. | [Longest Arithmetic Subsequence](https://leetcode.com/problems/longest-arithmetic-subsequence/) | [C++](./solutions/longest-arithmetic-subsequence/solution.hpp) | | | | | | +| 1028. | [Recover a Tree From Preorder Traversal](https://leetcode.com/problems/recover-a-tree-from-preorder-traversal/) | [C++](./solutions/recover-a-tree-from-preorder-traversal/solution.hpp) | | | | | | +| 1030. | [Matrix Cells in Distance Order](https://leetcode.com/problems/matrix-cells-in-distance-order/) | [C++](./solutions/matrix-cells-in-distance-order/solution.hpp) | | | | | | +| 1035. | [Uncrossed Lines](https://leetcode.com/problems/uncrossed-lines/) | [C++](./solutions/uncrossed-lines/solution.hpp) | | | | | | +| 1037. | [Valid Boomerang](https://leetcode.com/problems/valid-boomerang/) | [C++](./solutions/valid-boomerang/solution.hpp) | | | | | | +| 1046. | [Last Stone Weight](https://leetcode.com/problems/last-stone-weight/) | [C++](./solutions/last-stone-weight/solution.hpp) | | | | | | +| 1047. | [Remove All Adjacent Duplicates In String](https://leetcode.com/problems/remove-all-adjacent-duplicates-in-string/) | [C++](./solutions/remove-all-adjacent-duplicates-in-string/solution.hpp) | | | | | | +| 1048. | [Longest String Chain](https://leetcode.com/problems/longest-string-chain/) | [C++](./solutions/longest-string-chain/solution.hpp) | | | | | | +| 1051. | [Height Checker](https://leetcode.com/problems/height-checker/) | [C++](./solutions/height-checker/solution.hpp) | | | | | | +| 1071. | [Greatest Common Divisor of Strings](https://leetcode.com/problems/greatest-common-divisor-of-strings/) | [C++](./solutions/greatest-common-divisor-of-strings/solution.hpp) | | | | | | +| 1074. | [Number of Submatrices That Sum to Target](https://leetcode.com/problems/number-of-submatrices-that-sum-to-target/) | [C++](./solutions/number-of-submatrices-that-sum-to-target/solution.hpp) | | | | | | +| 1078. | [Occurrences After Bigram](https://leetcode.com/problems/occurrences-after-bigram/) | [C++](./solutions/occurrences-after-bigram/solution.hpp) | | | | | | +| 1081. | [Smallest Subsequence of Distinct Characters](https://leetcode.com/problems/smallest-subsequence-of-distinct-characters/) | [C++](./solutions/smallest-subsequence-of-distinct-characters/solution.hpp) | | | | | | +| 1089. | [Duplicate Zeros](https://leetcode.com/problems/duplicate-zeros/) | [C++](./solutions/duplicate-zeros/solution.hpp) | | | | | | +| 1091. | [Shortest Path in Binary Matrix](https://leetcode.com/problems/shortest-path-in-binary-matrix/) | [C++](./solutions/shortest-path-in-binary-matrix/solution.hpp) | | | | | | +| 1095. | [Find in Mountain Array](https://leetcode.com/problems/find-in-mountain-array/) | [C++](./solutions/find-in-mountain-array/solution.hpp) | | | | | | +| 1103. | [Distribute Candies to People](https://leetcode.com/problems/distribute-candies-to-people/) | [C++](./solutions/distribute-candies-to-people/solution.hpp) | | | | | | +| 1108. | [Defanging an IP Address](https://leetcode.com/problems/defanging-an-ip-address/) | [C++](./solutions/defanging-an-ip-address/solution.hpp) | | | | | | +| 1122. | [Relative Sort Array](https://leetcode.com/problems/relative-sort-array/) | [C++](./solutions/relative-sort-array/solution.hpp) | | | | | | +| 1125. | [Smallest Sufficient Team](https://leetcode.com/problems/smallest-sufficient-team/) | [C++](./solutions/smallest-sufficient-team/solution.hpp) | | | | | | +| 1128. | [Number of Equivalent Domino Pairs](https://leetcode.com/problems/number-of-equivalent-domino-pairs/) | [C++](./solutions/number-of-equivalent-domino-pairs/solution.hpp) | | | | | | +| 1129. | [Shortest Path with Alternating Colors](https://leetcode.com/problems/shortest-path-with-alternating-colors/) | [C++](./solutions/shortest-path-with-alternating-colors/solution.hpp) | | | | | | +| 1137. | [N-th Tribonacci Number](https://leetcode.com/problems/n-th-tribonacci-number/) | [C++](./solutions/n-th-tribonacci-number/solution.hpp) | | | | | | +| 1140. | [Stone Game II](https://leetcode.com/problems/stone-game-ii/) | [C++](./solutions/stone-game-ii/solution.hpp) | | | | | | +| 1143. | [Longest Common Subsequence](https://leetcode.com/problems/longest-common-subsequence/) | [C++](./solutions/longest-common-subsequence/solution.hpp) | | | | | | +| 1146. | [Snapshot Array](https://leetcode.com/problems/snapshot-array/) | [C++](./solutions/snapshot-array/solution.hpp) | | | | | | +| 1154. | [Day of the Year](https://leetcode.com/problems/day-of-the-year/) | [C++](./solutions/day-of-the-year/solution.hpp) | | | | | | +| 1160. | [Find Words That Can Be Formed by Characters](https://leetcode.com/problems/find-words-that-can-be-formed-by-characters/) | [C++](./solutions/find-words-that-can-be-formed-by-characters/solution.hpp) | | | | | | +| 1161. | [Maximum Level Sum of a Binary Tree](https://leetcode.com/problems/maximum-level-sum-of-a-binary-tree/) | [C++](./solutions/maximum-level-sum-of-a-binary-tree/solution.hpp) | | | | | | +| 1162. | [As Far from Land as Possible](https://leetcode.com/problems/as-far-from-land-as-possible/) | [C++](./solutions/as-far-from-land-as-possible/solution.hpp) | | | | | | +| 1175. | [Prime Arrangements](https://leetcode.com/problems/prime-arrangements/) | [C++](./solutions/prime-arrangements/solution.hpp) | | | | | | +| 1184. | [Distance Between Bus Stops](https://leetcode.com/problems/distance-between-bus-stops/) | [C++](./solutions/distance-between-bus-stops/solution.hpp) | | | | | | +| 1185. | [Day of the Week](https://leetcode.com/problems/day-of-the-week/) | [C++](./solutions/day-of-the-week/solution.hpp) | | | | | | +| 1187. | [Make Array Strictly Increasing](https://leetcode.com/problems/make-array-strictly-increasing/) | [C++](./solutions/make-array-strictly-increasing/solution.hpp) | | | | | | +| 1189. | [Maximum Number of Balloons](https://leetcode.com/problems/maximum-number-of-balloons/) | [C++](./solutions/maximum-number-of-balloons/solution.hpp) | | | | | | +| 1200. | [Minimum Absolute Difference](https://leetcode.com/problems/minimum-absolute-difference/) | [C++](./solutions/minimum-absolute-difference/solution.hpp) | | | | | | +| 1201. | [Ugly Number III](https://leetcode.com/problems/ugly-number-iii/) | [C++](./solutions/ugly-number-iii/solution.hpp) | | | | | | +| 1203. | [Sort Items by Groups Respecting Dependencies](https://leetcode.com/problems/sort-items-by-groups-respecting-dependencies/) | [C++](./solutions/sort-items-by-groups-respecting-dependencies/solution.hpp) | | | | | | +| 1207. | [Unique Number of Occurrences](https://leetcode.com/problems/unique-number-of-occurrences/) | [C++](./solutions/unique-number-of-occurrences/solution.hpp) | | | | | | +| 1217. | [Minimum Cost to Move Chips to The Same Position](https://leetcode.com/problems/minimum-cost-to-move-chips-to-the-same-position/) | [C++](./solutions/minimum-cost-to-move-chips-to-the-same-position/solution.hpp) | | | | | | +| 1218. | [Longest Arithmetic Subsequence of Given Difference](https://leetcode.com/problems/longest-arithmetic-subsequence-of-given-difference/) | [C++](./solutions/longest-arithmetic-subsequence-of-given-difference/solution.hpp) | | | | | | +| 1221. | [Split a String in Balanced Strings](https://leetcode.com/problems/split-a-string-in-balanced-strings/) | [C++](./solutions/split-a-string-in-balanced-strings/solution.hpp) | | | | | | +| 1232. | [Check If It Is a Straight Line](https://leetcode.com/problems/check-if-it-is-a-straight-line/) | [C++](./solutions/check-if-it-is-a-straight-line/solution.hpp) | | | | | | +| 1235. | [Maximum Profit in Job Scheduling](https://leetcode.com/problems/maximum-profit-in-job-scheduling/) | [C++](./solutions/maximum-profit-in-job-scheduling/solution.hpp) | | | | | | +| 1249. | [Minimum Remove to Make Valid Parentheses](https://leetcode.com/problems/minimum-remove-to-make-valid-parentheses/) | [C++](./solutions/minimum-remove-to-make-valid-parentheses/solution.hpp) | | | | | | +| 1252. | [Cells with Odd Values in a Matrix](https://leetcode.com/problems/cells-with-odd-values-in-a-matrix/) | [C++](./solutions/cells-with-odd-values-in-a-matrix/solution.hpp) | | | | | | +| 1254. | [Number of Closed Islands](https://leetcode.com/problems/number-of-closed-islands/) | [C++](./solutions/number-of-closed-islands/solution.hpp) | | | | | | +| 1255. | [Maximum Score Words Formed by Letters](https://leetcode.com/problems/maximum-score-words-formed-by-letters/) | [C++](./solutions/maximum-score-words-formed-by-letters/solution.hpp) | | | | | | +| 1260. | [Shift 2D Grid](https://leetcode.com/problems/shift-2d-grid/) | [C++](./solutions/shift-2d-grid/solution.hpp) | | | | | | +| 1266. | [Minimum Time Visiting All Points](https://leetcode.com/problems/minimum-time-visiting-all-points/) | [C++](./solutions/minimum-time-visiting-all-points/solution.hpp) | | | | | | +| 1268. | [Search Suggestions System](https://leetcode.com/problems/search-suggestions-system/) | [C++](./solutions/search-suggestions-system/solution.hpp) | | | | | | +| 1269. | [Number of Ways to Stay in the Same Place After Some Steps](https://leetcode.com/problems/number-of-ways-to-stay-in-the-same-place-after-some-steps/) | [C++](./solutions/number-of-ways-to-stay-in-the-same-place-after-some-steps/solution.hpp) | | | | | | +| 1275. | [Find Winner on a Tic Tac Toe Game](https://leetcode.com/problems/find-winner-on-a-tic-tac-toe-game/) | [C++](./solutions/find-winner-on-a-tic-tac-toe-game/solution.hpp) | | | | | | +| 1281. | [Subtract the Product and Sum of Digits of an Integer](https://leetcode.com/problems/subtract-the-product-and-sum-of-digits-of-an-integer/) | [C++](./solutions/subtract-the-product-and-sum-of-digits-of-an-integer/solution.hpp) | | | | | | +| 1282. | [Group the People Given the Group Size They Belong To](https://leetcode.com/problems/group-the-people-given-the-group-size-they-belong-to/) | [C++](./solutions/group-the-people-given-the-group-size-they-belong-to/solution.hpp) | | | | | | +| 1283. | [Find the Smallest Divisor Given a Threshold](https://leetcode.com/problems/find-the-smallest-divisor-given-a-threshold/) | [C++](./solutions/find-the-smallest-divisor-given-a-threshold/solution.hpp) | | | | | | +| 1284. | [Minimum Number of Flips to Convert Binary Matrix to Zero Matrix](https://leetcode.com/problems/minimum-number-of-flips-to-convert-binary-matrix-to-zero-matrix/) | [C++](./solutions/minimum-number-of-flips-to-convert-binary-matrix-to-zero-matrix/solution.hpp) | | | | | | +| 1287. | [Element Appearing More Than 25% In Sorted Array](https://leetcode.com/problems/element-appearing-more-than-25-in-sorted-array/) | [C++](./solutions/element-appearing-more-than-25-in-sorted-array/solution.hpp) | | | | | | +| 1290. | [Convert Binary Number in a Linked List to Integer](https://leetcode.com/problems/convert-binary-number-in-a-linked-list-to-integer/) | [C++](./solutions/convert-binary-number-in-a-linked-list-to-integer/solution.hpp) | | | | | | +| 1292. | [Maximum Side Length of a Square with Sum Less than or Equal to Threshold](https://leetcode.com/problems/maximum-side-length-of-a-square-with-sum-less-than-or-equal-to-threshold/) | [C++](./solutions/maximum-side-length-of-a-square-with-sum-less-than-or-equal-to-threshold/solution.hpp) | | | | | | +| 1295. | [Find Numbers with Even Number of Digits](https://leetcode.com/problems/find-numbers-with-even-number-of-digits/) | [C++](./solutions/find-numbers-with-even-number-of-digits/solution.hpp) | | | | | | +| 1299. | [Replace Elements with Greatest Element on Right Side](https://leetcode.com/problems/replace-elements-with-greatest-element-on-right-side/) | [C++](./solutions/replace-elements-with-greatest-element-on-right-side/solution.hpp) | | | | | | +| 1300. | [Sum of Mutated Array Closest to Target](https://leetcode.com/problems/sum-of-mutated-array-closest-to-target/) | [C++](./solutions/sum-of-mutated-array-closest-to-target/solution.hpp) | | | | | | +| 1304. | [Find N Unique Integers Sum up to Zero](https://leetcode.com/problems/find-n-unique-integers-sum-up-to-zero/) | [C++](./solutions/find-n-unique-integers-sum-up-to-zero/solution.hpp) | | | | | | +| 1306. | [Jump Game III](https://leetcode.com/problems/jump-game-iii/) | [C++](./solutions/jump-game-iii/solution.hpp) | | | | | | +| 1309. | [Decrypt String from Alphabet to Integer Mapping](https://leetcode.com/problems/decrypt-string-from-alphabet-to-integer-mapping/) | [C++](./solutions/decrypt-string-from-alphabet-to-integer-mapping/solution.hpp) | | | | | | +| 1312. | [Minimum Insertion Steps to Make a String Palindrome](https://leetcode.com/problems/minimum-insertion-steps-to-make-a-string-palindrome/) | [C++](./solutions/minimum-insertion-steps-to-make-a-string-palindrome/solution.hpp) | | | | | | +| 1313. | [Decompress Run-Length Encoded List](https://leetcode.com/problems/decompress-run-length-encoded-list/) | [C++](./solutions/decompress-run-length-encoded-list/solution.hpp) | | | | | | +| 1314. | [Matrix Block Sum](https://leetcode.com/problems/matrix-block-sum/) | [C++](./solutions/matrix-block-sum/solution.hpp) | | | | | | +| 1317. | [Convert Integer to the Sum of Two No-Zero Integers](https://leetcode.com/problems/convert-integer-to-the-sum-of-two-no-zero-integers/) | [C++](./solutions/convert-integer-to-the-sum-of-two-no-zero-integers/solution.hpp) | | | | | | +| 1318. | [Minimum Flips to Make a OR b Equal to c](https://leetcode.com/problems/minimum-flips-to-make-a-or-b-equal-to-c/) | [C++](./solutions/minimum-flips-to-make-a-or-b-equal-to-c/solution.hpp) | | | | | | +| 1319. | [Number of Operations to Make Network Connected](https://leetcode.com/problems/number-of-operations-to-make-network-connected/) | [C++](./solutions/number-of-operations-to-make-network-connected/solution.hpp) | | | | | | +| 1323. | [Maximum 69 Number](https://leetcode.com/problems/maximum-69-number/) | [C++](./solutions/maximum-69-number/solution.hpp) | | | | | | +| 1326. | [Minimum Number of Taps to Open to Water a Garden](https://leetcode.com/problems/minimum-number-of-taps-to-open-to-water-a-garden/) | [C++](./solutions/minimum-number-of-taps-to-open-to-water-a-garden/solution.hpp) | | | | | | +| 1331. | [Rank Transform of an Array](https://leetcode.com/problems/rank-transform-of-an-array/) | [C++](./solutions/rank-transform-of-an-array/solution.hpp) | | | | | | +| 1332. | [Remove Palindromic Subsequences](https://leetcode.com/problems/remove-palindromic-subsequences/) | [C++](./solutions/remove-palindromic-subsequences/solution.hpp) | | | | | | +| 1337. | [The K Weakest Rows in a Matrix](https://leetcode.com/problems/the-k-weakest-rows-in-a-matrix/) | [C++](./solutions/the-k-weakest-rows-in-a-matrix/solution.hpp) | | | | | | +| 1342. | [Number of Steps to Reduce a Number to Zero](https://leetcode.com/problems/number-of-steps-to-reduce-a-number-to-zero/) | [C++](./solutions/number-of-steps-to-reduce-a-number-to-zero/solution.hpp) | | | | | | +| 1345. | [Jump Game IV](https://leetcode.com/problems/jump-game-iv/) | [C++](./solutions/jump-game-iv/solution.hpp) | | | | | | +| 1346. | [Check If N and Its Double Exist](https://leetcode.com/problems/check-if-n-and-its-double-exist/) | [C++](./solutions/check-if-n-and-its-double-exist/solution.hpp) | | | | | | +| 1351. | [Count Negative Numbers in a Sorted Matrix](https://leetcode.com/problems/count-negative-numbers-in-a-sorted-matrix/) | [C++](./solutions/count-negative-numbers-in-a-sorted-matrix/solution.hpp) | | | | | | +| 1352. | [Product of the Last K Numbers](https://leetcode.com/problems/product-of-the-last-k-numbers/) | [C++](./solutions/product-of-the-last-k-numbers/solution.hpp) | | | | | | +| 1356. | [Sort Integers by The Number of 1 Bits](https://leetcode.com/problems/sort-integers-by-the-number-of-1-bits/) | [C++](./solutions/sort-integers-by-the-number-of-1-bits/solution.hpp) | | | | | | +| 1359. | [Count All Valid Pickup and Delivery Options](https://leetcode.com/problems/count-all-valid-pickup-and-delivery-options/) | [C++](./solutions/count-all-valid-pickup-and-delivery-options/solution.hpp) | | | | | | +| 1360. | [Number of Days Between Two Dates](https://leetcode.com/problems/number-of-days-between-two-dates/) | [C++](./solutions/number-of-days-between-two-dates/solution.hpp) | | | | | | +| 1361. | [Validate Binary Tree Nodes](https://leetcode.com/problems/validate-binary-tree-nodes/) | [C++](./solutions/validate-binary-tree-nodes/solution.hpp) | | | | | | +| 1365. | [How Many Numbers Are Smaller Than the Current Number](https://leetcode.com/problems/how-many-numbers-are-smaller-than-the-current-number/) | [C++](./solutions/how-many-numbers-are-smaller-than-the-current-number/solution.hpp) | | | | | | +| 1367. | [Linked List in Binary Tree](https://leetcode.com/problems/linked-list-in-binary-tree/) | [C++](./solutions/linked-list-in-binary-tree/solution.hpp) | | | | | | +| 1370. | [Increasing Decreasing String](https://leetcode.com/problems/increasing-decreasing-string/) | [C++](./solutions/increasing-decreasing-string/solution.hpp) | | | | | | +| 1372. | [Longest ZigZag Path in a Binary Tree](https://leetcode.com/problems/longest-zigzag-path-in-a-binary-tree/) | [C++](./solutions/longest-zigzag-path-in-a-binary-tree/solution.hpp) | | | | | | +| 1374. | [Generate a String With Characters That Have Odd Counts](https://leetcode.com/problems/generate-a-string-with-characters-that-have-odd-counts/) | [C++](./solutions/generate-a-string-with-characters-that-have-odd-counts/solution.hpp) | | | | | | +| 1376. | [Time Needed to Inform All Employees](https://leetcode.com/problems/time-needed-to-inform-all-employees/) | [C++](./solutions/time-needed-to-inform-all-employees/solution.hpp) | | | | | | +| 1379. | [Find a Corresponding Node of a Binary Tree in a Clone of That Tree](https://leetcode.com/problems/find-a-corresponding-node-of-a-binary-tree-in-a-clone-of-that-tree/) | [C++](./solutions/find-a-corresponding-node-of-a-binary-tree-in-a-clone-of-that-tree/solution.hpp) | | | | | | +| 1380. | [Lucky Numbers in a Matrix](https://leetcode.com/problems/lucky-numbers-in-a-matrix/) | [C++](./solutions/lucky-numbers-in-a-matrix/solution.hpp) | | | | | | +| 1383. | [Maximum Performance of a Team](https://leetcode.com/problems/maximum-performance-of-a-team/) | [C++](./solutions/maximum-performance-of-a-team/solution.hpp) | | | | | | +| 1385. | [Find the Distance Value Between Two Arrays](https://leetcode.com/problems/find-the-distance-value-between-two-arrays/) | [C++](./solutions/find-the-distance-value-between-two-arrays/solution.hpp) | | | | | | +| 1389. | [Create Target Array in the Given Order](https://leetcode.com/problems/create-target-array-in-the-given-order/) | [C++](./solutions/create-target-array-in-the-given-order/solution.hpp) | | | | | | +| 1394. | [Find Lucky Integer in an Array](https://leetcode.com/problems/find-lucky-integer-in-an-array/) | [C++](./solutions/find-lucky-integer-in-an-array/solution.hpp) | | | | | | +| 1396. | [Design Underground System](https://leetcode.com/problems/design-underground-system/) | [C++](./solutions/design-underground-system/solution.hpp) | | | | | | +| 1399. | [Count Largest Group](https://leetcode.com/problems/count-largest-group/) | [C++](./solutions/count-largest-group/solution.hpp) | | | | | | +| 1402. | [Reducing Dishes](https://leetcode.com/problems/reducing-dishes/) | [C++](./solutions/reducing-dishes/solution.hpp) | | | | | | +| 1403. | [Minimum Subsequence in Non-Increasing Order](https://leetcode.com/problems/minimum-subsequence-in-non-increasing-order/) | [C++](./solutions/minimum-subsequence-in-non-increasing-order/solution.hpp) | | | | | | +| 1406. | [Stone Game III](https://leetcode.com/problems/stone-game-iii/) | [C++](./solutions/stone-game-iii/solution.hpp) | | | | | | +| 1408. | [String Matching in an Array](https://leetcode.com/problems/string-matching-in-an-array/) | [C++](./solutions/string-matching-in-an-array/solution.hpp) | | | | | | +| 1413. | [Minimum Value to Get Positive Step by Step Sum](https://leetcode.com/problems/minimum-value-to-get-positive-step-by-step-sum/) | [C++](./solutions/minimum-value-to-get-positive-step-by-step-sum/solution.hpp) | | | | | | +| 1416. | [Restore The Array](https://leetcode.com/problems/restore-the-array/) | [C++](./solutions/restore-the-array/solution.hpp) | | | | | | +| 1417. | [Reformat The String](https://leetcode.com/problems/reformat-the-string/) | [C++](./solutions/reformat-the-string/solution.hpp) | | | | | | +| 1420. | [Build Array Where You Can Find The Maximum Exactly K Comparisons](https://leetcode.com/problems/build-array-where-you-can-find-the-maximum-exactly-k-comparisons/) | [C++](./solutions/build-array-where-you-can-find-the-maximum-exactly-k-comparisons/solution.hpp) | | | | | | +| 1422. | [Maximum Score After Splitting a String](https://leetcode.com/problems/maximum-score-after-splitting-a-string/) | [C++](./solutions/maximum-score-after-splitting-a-string/solution.hpp) | | | | | | +| 1425. | [Constrained Subsequence Sum](https://leetcode.com/problems/constrained-subsequence-sum/) | [C++](./solutions/constrained-subsequence-sum/solution.hpp) | | | | | | +| 1431. | [Kids With the Greatest Number of Candies](https://leetcode.com/problems/kids-with-the-greatest-number-of-candies/) | [C++](./solutions/kids-with-the-greatest-number-of-candies/solution.hpp) | | | | | | +| 1436. | [Destination City](https://leetcode.com/problems/destination-city/) | [C++](./solutions/destination-city/solution.hpp) | | | | | | +| 1437. | [Check If All 1's Are at Least Length K Places Away](https://leetcode.com/problems/check-if-all-1s-are-at-least-length-k-places-away/) | [C++](./solutions/check-if-all-1s-are-at-least-length-k-places-away/solution.hpp) | | | | | | +| 1444. | [Number of Ways of Cutting a Pizza](https://leetcode.com/problems/number-of-ways-of-cutting-a-pizza/) | [C++](./solutions/number-of-ways-of-cutting-a-pizza/solution.hpp) | | | | | | +| 1446. | [Consecutive Characters](https://leetcode.com/problems/consecutive-characters/) | [C++](./solutions/consecutive-characters/solution.hpp) | | | | | | +| 1448. | [Count Good Nodes in Binary Tree](https://leetcode.com/problems/count-good-nodes-in-binary-tree/) | [C++](./solutions/count-good-nodes-in-binary-tree/solution.hpp) | | | | | | +| 1450. | [Number of Students Doing Homework at a Given Time](https://leetcode.com/problems/number-of-students-doing-homework-at-a-given-time/) | [C++](./solutions/number-of-students-doing-homework-at-a-given-time/solution.hpp) | | | | | | +| 1455. | [Check If a Word Occurs As a Prefix of Any Word in a Sentence](https://leetcode.com/problems/check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence/) | [C++](./solutions/check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence/solution.hpp) | | | | | | +| 1456. | [Maximum Number of Vowels in a Substring of Given Length](https://leetcode.com/problems/maximum-number-of-vowels-in-a-substring-of-given-length/) | [C++](./solutions/maximum-number-of-vowels-in-a-substring-of-given-length/solution.hpp) | | | | | | +| 1458. | [Max Dot Product of Two Subsequences](https://leetcode.com/problems/max-dot-product-of-two-subsequences/) | [C++](./solutions/max-dot-product-of-two-subsequences/solution.hpp) | | | | | | +| 1460. | [Make Two Arrays Equal by Reversing Subarrays](https://leetcode.com/problems/make-two-arrays-equal-by-reversing-subarrays/) | [C++](./solutions/make-two-arrays-equal-by-reversing-subarrays/solution.hpp) | | | | | | +| 1463. | [Cherry Pickup II](https://leetcode.com/problems/cherry-pickup-ii/) | [C++](./solutions/cherry-pickup-ii/solution.hpp) | | | | | | +| 1464. | [Maximum Product of Two Elements in an Array](https://leetcode.com/problems/maximum-product-of-two-elements-in-an-array/) | [C++](./solutions/maximum-product-of-two-elements-in-an-array/solution.hpp) | | | | | | +| 1466. | [Reorder Routes to Make All Paths Lead to the City Zero](https://leetcode.com/problems/reorder-routes-to-make-all-paths-lead-to-the-city-zero/) | [C++](./solutions/reorder-routes-to-make-all-paths-lead-to-the-city-zero/solution.hpp) | | | | | | +| 1470. | [Shuffle the Array](https://leetcode.com/problems/shuffle-the-array/) | [C++](./solutions/shuffle-the-array/solution.hpp) | | | | | | +| 1472. | [Design Browser History](https://leetcode.com/problems/design-browser-history/) | [C++](./solutions/design-browser-history/solution.hpp) | | | | | | +| 1475. | [Final Prices With a Special Discount in a Shop](https://leetcode.com/problems/final-prices-with-a-special-discount-in-a-shop/) | [C++](./solutions/final-prices-with-a-special-discount-in-a-shop/solution.hpp) | | | | | | +| 1480. | [Running Sum of 1d Array](https://leetcode.com/problems/running-sum-of-1d-array/) | [C++](./solutions/running-sum-of-1d-array/solution.hpp) | | | | | | +| 1482. | [Minimum Number of Days to Make m Bouquets](https://leetcode.com/problems/minimum-number-of-days-to-make-m-bouquets/) | [C++](./solutions/minimum-number-of-days-to-make-m-bouquets/solution.hpp) | | | | | | +| 1486. | [XOR Operation in an Array](https://leetcode.com/problems/xor-operation-in-an-array/) | [C++](./solutions/xor-operation-in-an-array/solution.hpp) | | | | | | +| 1488. | [Avoid Flood in The City](https://leetcode.com/problems/avoid-flood-in-the-city/) | [C++](./solutions/avoid-flood-in-the-city/solution.hpp) | | | | | | +| 1489. | [Find Critical and Pseudo-Critical Edges in Minimum Spanning Tree](https://leetcode.com/problems/find-critical-and-pseudo-critical-edges-in-minimum-spanning-tree/) | [C++](./solutions/find-critical-and-pseudo-critical-edges-in-minimum-spanning-tree/solution.hpp) | | | | | | +| 1491. | [Average Salary Excluding the Minimum and Maximum Salary](https://leetcode.com/problems/average-salary-excluding-the-minimum-and-maximum-salary/) | [C++](./solutions/average-salary-excluding-the-minimum-and-maximum-salary/solution.hpp) | | | | | | +| 1493. | [Longest Subarray of 1's After Deleting One Element](https://leetcode.com/problems/longest-subarray-of-1s-after-deleting-one-element/) | [C++](./solutions/longest-subarray-of-1s-after-deleting-one-element/solution.hpp) | | | | | | +| 1494. | [Parallel Courses II](https://leetcode.com/problems/parallel-courses-ii/) | [C++](./solutions/parallel-courses-ii/solution.hpp) | | | | | | +| 1496. | [Path Crossing](https://leetcode.com/problems/path-crossing/) | [C++](./solutions/path-crossing/solution.hpp) | | | | | | +| 1498. | [Number of Subsequences That Satisfy the Given Sum Condition](https://leetcode.com/problems/number-of-subsequences-that-satisfy-the-given-sum-condition/) | [C++](./solutions/number-of-subsequences-that-satisfy-the-given-sum-condition/solution.hpp) | | | | | | +| 1502. | [Can Make Arithmetic Progression From Sequence](https://leetcode.com/problems/can-make-arithmetic-progression-from-sequence/) | [C++](./solutions/can-make-arithmetic-progression-from-sequence/solution.hpp) | | | | | | +| 1507. | [Reformat Date](https://leetcode.com/problems/reformat-date/) | [C++](./solutions/reformat-date/solution.hpp) | | | | | | +| 1508. | [Range Sum of Sorted Subarray Sums](https://leetcode.com/problems/range-sum-of-sorted-subarray-sums/) | [C++](./solutions/range-sum-of-sorted-subarray-sums/solution.hpp) | | | | | | +| 1512. | [Number of Good Pairs](https://leetcode.com/problems/number-of-good-pairs/) | [C++](./solutions/number-of-good-pairs/solution.hpp) | | | | | | +| 1514. | [Path with Maximum Probability](https://leetcode.com/problems/path-with-maximum-probability/) | [C++](./solutions/path-with-maximum-probability/solution.hpp) | | | | | | +| 1518. | [Water Bottles](https://leetcode.com/problems/water-bottles/) | [C++](./solutions/water-bottles/solution.hpp) | | | | | | +| 1523. | [Count Odd Numbers in an Interval Range](https://leetcode.com/problems/count-odd-numbers-in-an-interval-range/) | [C++](./solutions/count-odd-numbers-in-an-interval-range/solution.hpp) | | | | | | +| 1526. | [Minimum Number of Increments on Subarrays to Form a Target Array](https://leetcode.com/problems/minimum-number-of-increments-on-subarrays-to-form-a-target-array/) | [C++](./solutions/minimum-number-of-increments-on-subarrays-to-form-a-target-array/solution.hpp) | | | | | | +| 1528. | [Shuffle String](https://leetcode.com/problems/shuffle-string/) | [C++](./solutions/shuffle-string/solution.hpp) | | | | | | +| 1534. | [Count Good Triplets](https://leetcode.com/problems/count-good-triplets/) | [C++](./solutions/count-good-triplets/solution.hpp) | | | | | | +| 1539. | [Kth Missing Positive Number](https://leetcode.com/problems/kth-missing-positive-number/) | [C++](./solutions/kth-missing-positive-number/solution.hpp) | | | | | | +| 1544. | [Make The String Great](https://leetcode.com/problems/make-the-string-great/) | [C++](./solutions/make-the-string-great/solution.hpp) | | | | | | +| 1547. | [Minimum Cost to Cut a Stick](https://leetcode.com/problems/minimum-cost-to-cut-a-stick/) | [C++](./solutions/minimum-cost-to-cut-a-stick/solution.hpp) | | | | | | +| 1550. | [Three Consecutive Odds](https://leetcode.com/problems/three-consecutive-odds/) | [C++](./solutions/three-consecutive-odds/solution.hpp) | | | | | | +| 1552. | [Magnetic Force Between Two Balls](https://leetcode.com/problems/magnetic-force-between-two-balls/) | [C++](./solutions/magnetic-force-between-two-balls/solution.hpp) | | | | | | +| 1556. | [Thousand Separator](https://leetcode.com/problems/thousand-separator/) | [C++](./solutions/thousand-separator/solution.hpp) | | | | | | +| 1557. | [Minimum Number of Vertices to Reach All Nodes](https://leetcode.com/problems/minimum-number-of-vertices-to-reach-all-nodes/) | [C++](./solutions/minimum-number-of-vertices-to-reach-all-nodes/solution.hpp) | | | | | | +| 1560. | [Most Visited Sector in a Circular Track](https://leetcode.com/problems/most-visited-sector-in-a-circular-track/) | [C++](./solutions/most-visited-sector-in-a-circular-track/solution.hpp) | | | | | | +| 1562. | [Find Latest Group of Size M](https://leetcode.com/problems/find-latest-group-of-size-m/) | [C++](./solutions/find-latest-group-of-size-m/solution.hpp) | | | | | | +| 1566. | [Detect Pattern of Length M Repeated K or More Times](https://leetcode.com/problems/detect-pattern-of-length-m-repeated-k-or-more-times/) | [C++](./solutions/detect-pattern-of-length-m-repeated-k-or-more-times/solution.hpp) | | | | | | +| 1567. | [Maximum Length of Subarray With Positive Product](https://leetcode.com/problems/maximum-length-of-subarray-with-positive-product/) | [C++](./solutions/maximum-length-of-subarray-with-positive-product/solution.hpp) | | | | | | +| 1569. | [Number of Ways to Reorder Array to Get Same BST](https://leetcode.com/problems/number-of-ways-to-reorder-array-to-get-same-bst/) | [C++](./solutions/number-of-ways-to-reorder-array-to-get-same-bst/solution.hpp) | | | | | | +| 1572. | [Matrix Diagonal Sum](https://leetcode.com/problems/matrix-diagonal-sum/) | [C++](./solutions/matrix-diagonal-sum/solution.hpp) | | | | | | +| 1574. | [Shortest Subarray to be Removed to Make Array Sorted](https://leetcode.com/problems/shortest-subarray-to-be-removed-to-make-array-sorted/) | [C++](./solutions/shortest-subarray-to-be-removed-to-make-array-sorted/solution.hpp) | | | | | | +| 1575. | [Count All Possible Routes](https://leetcode.com/problems/count-all-possible-routes/) | [C++](./solutions/count-all-possible-routes/solution.hpp) | | | | | | +| 1576. | [Replace All ?'s to Avoid Consecutive Repeating Characters](https://leetcode.com/problems/replace-all-s-to-avoid-consecutive-repeating-characters/) | [C++](./solutions/replace-all-s-to-avoid-consecutive-repeating-characters/solution.hpp) | | | | | | +| 1579. | [Remove Max Number of Edges to Keep Graph Fully Traversable](https://leetcode.com/problems/remove-max-number-of-edges-to-keep-graph-fully-traversable/) | [C++](./solutions/remove-max-number-of-edges-to-keep-graph-fully-traversable/solution.hpp) | | | | | | +| 1582. | [Special Positions in a Binary Matrix](https://leetcode.com/problems/special-positions-in-a-binary-matrix/) | [C++](./solutions/special-positions-in-a-binary-matrix/solution.hpp) | | | | | | +| 1584. | [Min Cost to Connect All Points](https://leetcode.com/problems/min-cost-to-connect-all-points/) | [C++](./solutions/min-cost-to-connect-all-points/solution.hpp) | | | | | | +| 1588. | [Sum of All Odd Length Subarrays](https://leetcode.com/problems/sum-of-all-odd-length-subarrays/) | [C++](./solutions/sum-of-all-odd-length-subarrays/solution.hpp) | | | | | | +| 1592. | [Rearrange Spaces Between Words](https://leetcode.com/problems/rearrange-spaces-between-words/) | [C++](./solutions/rearrange-spaces-between-words/solution.hpp) | | | | | | +| 1598. | [Crawler Log Folder](https://leetcode.com/problems/crawler-log-folder/) | [C++](./solutions/crawler-log-folder/solution.hpp) | | | | | | +| 1601. | [Maximum Number of Achievable Transfer Requests](https://leetcode.com/problems/maximum-number-of-achievable-transfer-requests/) | [C++](./solutions/maximum-number-of-achievable-transfer-requests/solution.hpp) | | | | | | +| 1603. | [Design Parking System](https://leetcode.com/problems/design-parking-system/) | [C++](./solutions/design-parking-system/solution.hpp) | | | | | | +| 1608. | [Special Array With X Elements Greater Than or Equal X](https://leetcode.com/problems/special-array-with-x-elements-greater-than-or-equal-x/) | [C++](./solutions/special-array-with-x-elements-greater-than-or-equal-x/solution.hpp) | | | | | | +| 1611. | [Minimum One Bit Operations to Make Integers Zero](https://leetcode.com/problems/minimum-one-bit-operations-to-make-integers-zero/) | [C++](./solutions/minimum-one-bit-operations-to-make-integers-zero/solution.hpp) | | | | | | +| 1614. | [Maximum Nesting Depth of the Parentheses](https://leetcode.com/problems/maximum-nesting-depth-of-the-parentheses/) | [C++](./solutions/maximum-nesting-depth-of-the-parentheses/solution.hpp) | | | | | | +| 1615. | [Maximal Network Rank](https://leetcode.com/problems/maximal-network-rank/) | [C++](./solutions/maximal-network-rank/solution.hpp) | | | | | | +| 1617. | [Count Subtrees With Max Distance Between Cities](https://leetcode.com/problems/count-subtrees-with-max-distance-between-cities/) | [C++](./solutions/count-subtrees-with-max-distance-between-cities/solution.hpp) | | | | | | +| 1619. | [Mean of Array After Removing Some Elements](https://leetcode.com/problems/mean-of-array-after-removing-some-elements/) | [C++](./solutions/mean-of-array-after-removing-some-elements/solution.hpp) | | | | | | +| 1624. | [Largest Substring Between Two Equal Characters](https://leetcode.com/problems/largest-substring-between-two-equal-characters/) | [C++](./solutions/largest-substring-between-two-equal-characters/solution.hpp) | | | | | | +| 1629. | [Slowest Key](https://leetcode.com/problems/slowest-key/) | [C++](./solutions/slowest-key/solution.hpp) | | | | | | +| 1630. | [Arithmetic Subarrays](https://leetcode.com/problems/arithmetic-subarrays/) | [C++](./solutions/arithmetic-subarrays/solution.hpp) | | | | | | +| 1631. | [Path With Minimum Effort](https://leetcode.com/problems/path-with-minimum-effort/) | [C++](./solutions/path-with-minimum-effort/solution.hpp) | | | | | | +| 1636. | [Sort Array by Increasing Frequency](https://leetcode.com/problems/sort-array-by-increasing-frequency/) | [C++](./solutions/sort-array-by-increasing-frequency/solution.hpp) | | | | | | +| 1639. | [Number of Ways to Form a Target String Given a Dictionary](https://leetcode.com/problems/number-of-ways-to-form-a-target-string-given-a-dictionary/) | [C++](./solutions/number-of-ways-to-form-a-target-string-given-a-dictionary/solution.hpp) | | | | | | +| 1640. | [Check Array Formation Through Concatenation](https://leetcode.com/problems/check-array-formation-through-concatenation/) | [C++](./solutions/check-array-formation-through-concatenation/solution.hpp) | | | | | | +| 1646. | [Get Maximum in Generated Array](https://leetcode.com/problems/get-maximum-in-generated-array/) | [C++](./solutions/get-maximum-in-generated-array/solution.hpp) | | | | | | +| 1647. | [Minimum Deletions to Make Character Frequencies Unique](https://leetcode.com/problems/minimum-deletions-to-make-character-frequencies-unique/) | [C++](./solutions/minimum-deletions-to-make-character-frequencies-unique/solution.hpp) | | | | | | +| 1648. | [Sell Diminishing-Valued Colored Balls](https://leetcode.com/problems/sell-diminishing-valued-colored-balls/) | [C++](./solutions/sell-diminishing-valued-colored-balls/solution.hpp) | | | | | | +| 1652. | [Defuse the Bomb](https://leetcode.com/problems/defuse-the-bomb/) | [C++](./solutions/defuse-the-bomb/solution.hpp) | | | | | | +| 1654. | [Minimum Jumps to Reach Home](https://leetcode.com/problems/minimum-jumps-to-reach-home/) | [C++](./solutions/minimum-jumps-to-reach-home/solution.hpp) | | | | | | +| 1656. | [Design an Ordered Stream](https://leetcode.com/problems/design-an-ordered-stream/) | [C++](./solutions/design-an-ordered-stream/solution.hpp) | | | | | | +| 1657. | [Determine if Two Strings Are Close](https://leetcode.com/problems/determine-if-two-strings-are-close/) | [C++](./solutions/determine-if-two-strings-are-close/solution.hpp) | | | | | | +| 1658. | [Minimum Operations to Reduce X to Zero](https://leetcode.com/problems/minimum-operations-to-reduce-x-to-zero/) | [C++](./solutions/minimum-operations-to-reduce-x-to-zero/solution.hpp) | | | | | | +| 1662. | [Check If Two String Arrays are Equivalent](https://leetcode.com/problems/check-if-two-string-arrays-are-equivalent/) | [C++](./solutions/check-if-two-string-arrays-are-equivalent/solution.hpp) | | | | | | +| 1668. | [Maximum Repeating Substring](https://leetcode.com/problems/maximum-repeating-substring/) | [C++](./solutions/maximum-repeating-substring/solution.hpp) | | | | | | +| 1672. | [Richest Customer Wealth](https://leetcode.com/problems/richest-customer-wealth/) | [C++](./solutions/richest-customer-wealth/solution.hpp) | | | | | | +| 1675. | [Minimize Deviation in Array](https://leetcode.com/problems/minimize-deviation-in-array/) | [C++](./solutions/minimize-deviation-in-array/solution.hpp) | | | | | | +| 1678. | [Goal Parser Interpretation](https://leetcode.com/problems/goal-parser-interpretation/) | [C++](./solutions/goal-parser-interpretation/solution.hpp) | | | | | | +| 1679. | [Max Number of K-Sum Pairs](https://leetcode.com/problems/max-number-of-k-sum-pairs/) | [C++](./solutions/max-number-of-k-sum-pairs/solution.hpp) | | | | | | +| 1684. | [Count the Number of Consistent Strings](https://leetcode.com/problems/count-the-number-of-consistent-strings/) | [C++](./solutions/count-the-number-of-consistent-strings/solution.hpp) | | | | | | +| 1688. | [Count of Matches in Tournament](https://leetcode.com/problems/count-of-matches-in-tournament/) | [C++](./solutions/count-of-matches-in-tournament/solution.hpp) | | | | | | +| 1694. | [Reformat Phone Number](https://leetcode.com/problems/reformat-phone-number/) | [C++](./solutions/reformat-phone-number/solution.hpp) | | | | | | +| 1697. | [Checking Existence of Edge Length Limited Paths](https://leetcode.com/problems/checking-existence-of-edge-length-limited-paths/) | [C++](./solutions/checking-existence-of-edge-length-limited-paths/solution.hpp) | | | | | | +| 1700. | [Number of Students Unable to Eat Lunch](https://leetcode.com/problems/number-of-students-unable-to-eat-lunch/) | [C++](./solutions/number-of-students-unable-to-eat-lunch/solution.hpp) | | | | | | +| 1704. | [Determine if String Halves Are Alike](https://leetcode.com/problems/determine-if-string-halves-are-alike/) | [C++](./solutions/determine-if-string-halves-are-alike/solution.hpp) | | | | | | +| 1706. | [Where Will the Ball Fall](https://leetcode.com/problems/where-will-the-ball-fall/) | [C++](./solutions/where-will-the-ball-fall/solution.hpp) | | | | | | +| 1710. | [Maximum Units on a Truck](https://leetcode.com/problems/maximum-units-on-a-truck/) | [C++](./solutions/maximum-units-on-a-truck/solution.hpp) | | | | | | +| 1712. | [Ways to Split Array Into Three Subarrays](https://leetcode.com/problems/ways-to-split-array-into-three-subarrays/) | [C++](./solutions/ways-to-split-array-into-three-subarrays/solution.hpp) | | | | | | +| 1716. | [Calculate Money in Leetcode Bank](https://leetcode.com/problems/calculate-money-in-leetcode-bank/) | [C++](./solutions/calculate-money-in-leetcode-bank/solution.hpp) | | | | | | +| 1720. | [Decode XORed Array](https://leetcode.com/problems/decode-xored-array/) | [C++](./solutions/decode-xored-array/solution.hpp) | | | | | | +| 1721. | [Swapping Nodes in a Linked List](https://leetcode.com/problems/swapping-nodes-in-a-linked-list/) | [C++](./solutions/swapping-nodes-in-a-linked-list/solution.hpp) | | | | | | +| 1725. | [Number Of Rectangles That Can Form The Largest Square](https://leetcode.com/problems/number-of-rectangles-that-can-form-the-largest-square/) | [C++](./solutions/number-of-rectangles-that-can-form-the-largest-square/solution.hpp) | | | | | | +| 1732. | [Find the Highest Altitude](https://leetcode.com/problems/find-the-highest-altitude/) | [C++](./solutions/find-the-highest-altitude/solution.hpp) | | | | | | +| 1736. | [Latest Time by Replacing Hidden Digits](https://leetcode.com/problems/latest-time-by-replacing-hidden-digits/) | [C++](./solutions/latest-time-by-replacing-hidden-digits/solution.hpp) | | | | | | +| 1742. | [Maximum Number of Balls in a Box](https://leetcode.com/problems/maximum-number-of-balls-in-a-box/) | [C++](./solutions/maximum-number-of-balls-in-a-box/solution.hpp) | | | | | | +| 1748. | [Sum of Unique Elements](https://leetcode.com/problems/sum-of-unique-elements/) | [C++](./solutions/sum-of-unique-elements/solution.hpp) | | | | | | +| 1751. | [Maximum Number of Events That Can Be Attended II](https://leetcode.com/problems/maximum-number-of-events-that-can-be-attended-ii/) | [C++](./solutions/maximum-number-of-events-that-can-be-attended-ii/solution.hpp) | | | | | | +| 1752. | [Check if Array Is Sorted and Rotated](https://leetcode.com/problems/check-if-array-is-sorted-and-rotated/) | [C++](./solutions/check-if-array-is-sorted-and-rotated/solution.hpp) | | | | | | +| 1758. | [Minimum Changes To Make Alternating Binary String](https://leetcode.com/problems/minimum-changes-to-make-alternating-binary-string/) | [C++](./solutions/minimum-changes-to-make-alternating-binary-string/solution.hpp) | | | | | | +| 1760. | [Minimum Limit of Balls in a Bag](https://leetcode.com/problems/minimum-limit-of-balls-in-a-bag/) | [C++](./solutions/minimum-limit-of-balls-in-a-bag/solution.hpp) | | | | | | +| 1763. | [Longest Nice Substring](https://leetcode.com/problems/longest-nice-substring/) | [C++](./solutions/longest-nice-substring/solution.hpp) | | | | | | +| 1768. | [Merge Strings Alternately](https://leetcode.com/problems/merge-strings-alternately/) | [C++](./solutions/merge-strings-alternately/solution.hpp) | | | | | | +| 1773. | [Count Items Matching a Rule](https://leetcode.com/problems/count-items-matching-a-rule/) | [C++](./solutions/count-items-matching-a-rule/solution.hpp) | | | | | | +| 1779. | [Find Nearest Point That Has the Same X or Y Coordinate](https://leetcode.com/problems/find-nearest-point-that-has-the-same-x-or-y-coordinate/) | [C++](./solutions/find-nearest-point-that-has-the-same-x-or-y-coordinate/solution.hpp) | | | | | | +| 1784. | [Check if Binary String Has at Most One Segment of Ones](https://leetcode.com/problems/check-if-binary-string-has-at-most-one-segment-of-ones/) | [C++](./solutions/check-if-binary-string-has-at-most-one-segment-of-ones/solution.hpp) | | | | | | +| 1790. | [Check if One String Swap Can Make Strings Equal](https://leetcode.com/problems/check-if-one-string-swap-can-make-strings-equal/) | [C++](./solutions/check-if-one-string-swap-can-make-strings-equal/solution.hpp) | | | | | | +| 1791. | [Find Center of Star Graph](https://leetcode.com/problems/find-center-of-star-graph/) | [C++](./solutions/find-center-of-star-graph/solution.hpp) | | | | | | +| 1793. | [Maximum Score of a Good Subarray](https://leetcode.com/problems/maximum-score-of-a-good-subarray/) | [C++](./solutions/maximum-score-of-a-good-subarray/solution.hpp) | | | | | | +| 1796. | [Second Largest Digit in a String](https://leetcode.com/problems/second-largest-digit-in-a-string/) | [C++](./solutions/second-largest-digit-in-a-string/solution.hpp) | | | | | | +| 1797. | [Design Authentication Manager](https://leetcode.com/problems/design-authentication-manager/) | [C++](./solutions/design-authentication-manager/solution.hpp) | | | | | | +| 1799. | [Maximize Score After N Operations](https://leetcode.com/problems/maximize-score-after-n-operations/) | [C++](./solutions/maximize-score-after-n-operations/solution.hpp) | | | | | | +| 1800. | [Maximum Ascending Subarray Sum](https://leetcode.com/problems/maximum-ascending-subarray-sum/) | [C++](./solutions/maximum-ascending-subarray-sum/solution.hpp) | | | | | | +| 1802. | [Maximum Value at a Given Index in a Bounded Array](https://leetcode.com/problems/maximum-value-at-a-given-index-in-a-bounded-array/) | [C++](./solutions/maximum-value-at-a-given-index-in-a-bounded-array/solution.hpp) | | | | | | +| 1805. | [Number of Different Integers in a String](https://leetcode.com/problems/number-of-different-integers-in-a-string/) | [C++](./solutions/number-of-different-integers-in-a-string/solution.hpp) | | | | | | +| 1812. | [Determine Color of a Chessboard Square](https://leetcode.com/problems/determine-color-of-a-chessboard-square/) | [C++](./solutions/determine-color-of-a-chessboard-square/solution.hpp) | | | | | | +| 1816. | [Truncate Sentence](https://leetcode.com/problems/truncate-sentence/) | [C++](./solutions/truncate-sentence/solution.hpp) | | | | | | +| 1818. | [Minimum Absolute Sum Difference](https://leetcode.com/problems/minimum-absolute-sum-difference/) | [C++](./solutions/minimum-absolute-sum-difference/solution.hpp) | | | | | | +| 1822. | [Sign of the Product of an Array](https://leetcode.com/problems/sign-of-the-product-of-an-array/) | [C++](./solutions/sign-of-the-product-of-an-array/solution.hpp) | | | | | | +| 1823. | [Find the Winner of the Circular Game](https://leetcode.com/problems/find-the-winner-of-the-circular-game/) | [C++](./solutions/find-the-winner-of-the-circular-game/solution.hpp) | | | | | | +| 1827. | [Minimum Operations to Make the Array Increasing](https://leetcode.com/problems/minimum-operations-to-make-the-array-increasing/) | [C++](./solutions/minimum-operations-to-make-the-array-increasing/solution.hpp) | | | | | | +| 1832. | [Check if the Sentence Is Pangram](https://leetcode.com/problems/check-if-the-sentence-is-pangram/) | [C++](./solutions/check-if-the-sentence-is-pangram/solution.hpp) | | | | | | +| 1837. | [Sum of Digits in Base K](https://leetcode.com/problems/sum-of-digits-in-base-k/) | [C++](./solutions/sum-of-digits-in-base-k/solution.hpp) | | | | | | +| 1838. | [Frequency of the Most Frequent Element](https://leetcode.com/problems/frequency-of-the-most-frequent-element/) | [C++](./solutions/frequency-of-the-most-frequent-element/solution.hpp) | | | | | | +| 1844. | [Replace All Digits with Characters](https://leetcode.com/problems/replace-all-digits-with-characters/) | [C++](./solutions/replace-all-digits-with-characters/solution.hpp) | | | | | | +| 1845. | [Seat Reservation Manager](https://leetcode.com/problems/seat-reservation-manager/) | [C++](./solutions/seat-reservation-manager/solution.hpp) | | | | | | +| 1848. | [Minimum Distance to the Target Element](https://leetcode.com/problems/minimum-distance-to-the-target-element/) | [C++](./solutions/minimum-distance-to-the-target-element/solution.hpp) | | | | | | +| 1854. | [Maximum Population Year](https://leetcode.com/problems/maximum-population-year/) | [C++](./solutions/maximum-population-year/solution.hpp) | | | | | | +| 1855. | [Maximum Distance Between a Pair of Values](https://leetcode.com/problems/maximum-distance-between-a-pair-of-values/) | [C++](./solutions/maximum-distance-between-a-pair-of-values/solution.hpp) | | | | | | +| 1857. | [Largest Color Value in a Directed Graph](https://leetcode.com/problems/largest-color-value-in-a-directed-graph/) | [C++](./solutions/largest-color-value-in-a-directed-graph/solution.hpp) | | | | | | +| 1859. | [Sorting the Sentence](https://leetcode.com/problems/sorting-the-sentence/) | [C++](./solutions/sorting-the-sentence/solution.hpp) | | | | | | +| 1863. | [Sum of All Subset XOR Totals](https://leetcode.com/problems/sum-of-all-subset-xor-totals/) | [C++](./solutions/sum-of-all-subset-xor-totals/solution.hpp) | | | | | | +| 1869. | [Longer Contiguous Segments of Ones than Zeros](https://leetcode.com/problems/longer-contiguous-segments-of-ones-than-zeros/) | [C++](./solutions/longer-contiguous-segments-of-ones-than-zeros/solution.hpp) | | | | | | +| 1870. | [Minimum Speed to Arrive on Time](https://leetcode.com/problems/minimum-speed-to-arrive-on-time/) | [C++](./solutions/minimum-speed-to-arrive-on-time/solution.hpp) | | | | | | +| 1876. | [Substrings of Size Three with Distinct Characters](https://leetcode.com/problems/substrings-of-size-three-with-distinct-characters/) | [C++](./solutions/substrings-of-size-three-with-distinct-characters/solution.hpp) | | | | | | +| 1880. | [Check if Word Equals Summation of Two Words](https://leetcode.com/problems/check-if-word-equals-summation-of-two-words/) | [C++](./solutions/check-if-word-equals-summation-of-two-words/solution.hpp) | | | | | | +| 1886. | [Determine Whether Matrix Can Be Obtained By Rotation](https://leetcode.com/problems/determine-whether-matrix-can-be-obtained-by-rotation/) | [C++](./solutions/determine-whether-matrix-can-be-obtained-by-rotation/solution.hpp) | | | | | | +| 1893. | [Check if All the Integers in a Range Are Covered](https://leetcode.com/problems/check-if-all-the-integers-in-a-range-are-covered/) | [C++](./solutions/check-if-all-the-integers-in-a-range-are-covered/solution.hpp) | | | | | | +| 1894. | [Find the Student that Will Replace the Chalk](https://leetcode.com/problems/find-the-student-that-will-replace-the-chalk/) | [C++](./solutions/find-the-student-that-will-replace-the-chalk/solution.hpp) | | | | | | +| 1897. | [Redistribute Characters to Make All Strings Equal](https://leetcode.com/problems/redistribute-characters-to-make-all-strings-equal/) | [C++](./solutions/redistribute-characters-to-make-all-strings-equal/solution.hpp) | | | | | | +| 1898. | [Maximum Number of Removable Characters](https://leetcode.com/problems/maximum-number-of-removable-characters/) | [C++](./solutions/maximum-number-of-removable-characters/solution.hpp) | | | | | | +| 1901. | [Find a Peak Element II](https://leetcode.com/problems/find-a-peak-element-ii/) | [C++](./solutions/find-a-peak-element-ii/solution.hpp) | | | | | | +| 1903. | [Largest Odd Number in String](https://leetcode.com/problems/largest-odd-number-in-string/) | [C++](./solutions/largest-odd-number-in-string/solution.hpp) | | | | | | +| 1905. | [Count Sub Islands](https://leetcode.com/problems/count-sub-islands/) | [C++](./solutions/count-sub-islands/solution.hpp) | | | | | | +| 1909. | [Remove One Element to Make the Array Strictly Increasing](https://leetcode.com/problems/remove-one-element-to-make-the-array-strictly-increasing/) | [C++](./solutions/remove-one-element-to-make-the-array-strictly-increasing/solution.hpp) | | | | | | +| 1913. | [Maximum Product Difference Between Two Pairs](https://leetcode.com/problems/maximum-product-difference-between-two-pairs/) | [C++](./solutions/maximum-product-difference-between-two-pairs/solution.hpp) | | | | | | +| 1920. | [Build Array from Permutation](https://leetcode.com/problems/build-array-from-permutation/) | [C++](./solutions/build-array-from-permutation/solution.hpp) | | | | | | +| 1925. | [Count Square Sum Triples](https://leetcode.com/problems/count-square-sum-triples/) | [C++](./solutions/count-square-sum-triples/solution.hpp) | | | | | | +| 1926. | [Nearest Exit from Entrance in Maze](https://leetcode.com/problems/nearest-exit-from-entrance-in-maze/) | [C++](./solutions/nearest-exit-from-entrance-in-maze/solution.hpp) | | | | | | +| 1929. | [Concatenation of Array](https://leetcode.com/problems/concatenation-of-array/) | [C++](./solutions/concatenation-of-array/solution.hpp) | | | | | | +| 1935. | [Maximum Number of Words You Can Type](https://leetcode.com/problems/maximum-number-of-words-you-can-type/) | [C++](./solutions/maximum-number-of-words-you-can-type/solution.hpp) | | | | | | +| 1941. | [Check if All Characters Have Equal Number of Occurrences](https://leetcode.com/problems/check-if-all-characters-have-equal-number-of-occurrences/) | [C++](./solutions/check-if-all-characters-have-equal-number-of-occurrences/solution.hpp) | | | | | | +| 1944. | [Number of Visible People in a Queue](https://leetcode.com/problems/number-of-visible-people-in-a-queue/) | [C++](./solutions/number-of-visible-people-in-a-queue/solution.hpp) | | | | | | +| 1945. | [Sum of Digits of String After Convert](https://leetcode.com/problems/sum-of-digits-of-string-after-convert/) | [C++](./solutions/sum-of-digits-of-string-after-convert/solution.hpp) | | | | | | +| 1952. | [Three Divisors](https://leetcode.com/problems/three-divisors/) | [C++](./solutions/three-divisors/solution.hpp) | | | | | | +| 1957. | [Delete Characters to Make Fancy String](https://leetcode.com/problems/delete-characters-to-make-fancy-string/) | [C++](./solutions/delete-characters-to-make-fancy-string/solution.hpp) | | | | | | +| 1961. | [Check If String Is a Prefix of Array](https://leetcode.com/problems/check-if-string-is-a-prefix-of-array/) | [C++](./solutions/check-if-string-is-a-prefix-of-array/solution.hpp) | | | | | | +| 1964. | [Find the Longest Valid Obstacle Course at Each Position](https://leetcode.com/problems/find-the-longest-valid-obstacle-course-at-each-position/) | [C++](./solutions/find-the-longest-valid-obstacle-course-at-each-position/solution.hpp) | | | | | | +| 1967. | [Number of Strings That Appear as Substrings in Word](https://leetcode.com/problems/number-of-strings-that-appear-as-substrings-in-word/) | [C++](./solutions/number-of-strings-that-appear-as-substrings-in-word/solution.hpp) | | | | | | +| 1970. | [Last Day Where You Can Still Cross](https://leetcode.com/problems/last-day-where-you-can-still-cross/) | [C++](./solutions/last-day-where-you-can-still-cross/solution.hpp) | | | | | | +| 1971. | [Find if Path Exists in Graph](https://leetcode.com/problems/find-if-path-exists-in-graph/) | [C++](./solutions/find-if-path-exists-in-graph/solution.hpp) | | | | | | +| 1974. | [Minimum Time to Type Word Using Special Typewriter](https://leetcode.com/problems/minimum-time-to-type-word-using-special-typewriter/) | [C++](./solutions/minimum-time-to-type-word-using-special-typewriter/solution.hpp) | | | | | | +| 1979. | [Find Greatest Common Divisor of Array](https://leetcode.com/problems/find-greatest-common-divisor-of-array/) | [C++](./solutions/find-greatest-common-divisor-of-array/solution.hpp) | | | | | | +| 1984. | [Minimum Difference Between Highest and Lowest of K Scores](https://leetcode.com/problems/minimum-difference-between-highest-and-lowest-of-k-scores/) | [C++](./solutions/minimum-difference-between-highest-and-lowest-of-k-scores/solution.hpp) | | | | | | +| 1991. | [Find the Middle Index in Array](https://leetcode.com/problems/find-the-middle-index-in-array/) | [C++](./solutions/find-the-middle-index-in-array/solution.hpp) | | | | | | +| 1995. | [Count Special Quadruplets](https://leetcode.com/problems/count-special-quadruplets/) | [C++](./solutions/count-special-quadruplets/solution.hpp) | | | | | | +| 2000. | [Reverse Prefix of Word](https://leetcode.com/problems/reverse-prefix-of-word/) | [C++](./solutions/reverse-prefix-of-word/solution.hpp) | | | | | | +| 2006. | [Count Number of Pairs With Absolute Difference K](https://leetcode.com/problems/count-number-of-pairs-with-absolute-difference-k/) | [C++](./solutions/count-number-of-pairs-with-absolute-difference-k/solution.hpp) | | | | | | +| 2009. | [Minimum Number of Operations to Make Array Continuous](https://leetcode.com/problems/minimum-number-of-operations-to-make-array-continuous/) | [C++](./solutions/minimum-number-of-operations-to-make-array-continuous/solution.hpp) | | | | | | +| 2011. | [Final Value of Variable After Performing Operations](https://leetcode.com/problems/final-value-of-variable-after-performing-operations/) | [C++](./solutions/final-value-of-variable-after-performing-operations/solution.hpp) | | | | | | +| 2016. | [Maximum Difference Between Increasing Elements](https://leetcode.com/problems/maximum-difference-between-increasing-elements/) | [C++](./solutions/maximum-difference-between-increasing-elements/solution.hpp) | | | | | | +| 2022. | [Convert 1D Array Into 2D Array](https://leetcode.com/problems/convert-1d-array-into-2d-array/) | [C++](./solutions/convert-1d-array-into-2d-array/solution.hpp) | | | | | | +| 2024. | [Maximize the Confusion of an Exam](https://leetcode.com/problems/maximize-the-confusion-of-an-exam/) | [C++](./solutions/maximize-the-confusion-of-an-exam/solution.hpp) | | | | | | +| 2027. | [Minimum Moves to Convert String](https://leetcode.com/problems/minimum-moves-to-convert-string/) | [C++](./solutions/minimum-moves-to-convert-string/solution.hpp) | | | | | | +| 2032. | [Two Out of Three](https://leetcode.com/problems/two-out-of-three/) | [C++](./solutions/two-out-of-three/solution.hpp) | | | | | | +| 2037. | [Minimum Number of Moves to Seat Everyone](https://leetcode.com/problems/minimum-number-of-moves-to-seat-everyone/) | [C++](./solutions/minimum-number-of-moves-to-seat-everyone/solution.hpp) | | | | | | +| 2038. | [Remove Colored Pieces if Both Neighbors are the Same Color](https://leetcode.com/problems/remove-colored-pieces-if-both-neighbors-are-the-same-color/) | [C++](./solutions/remove-colored-pieces-if-both-neighbors-are-the-same-color/solution.hpp) | | | | | | +| 2042. | [Check if Numbers Are Ascending in a Sentence](https://leetcode.com/problems/check-if-numbers-are-ascending-in-a-sentence/) | [C++](./solutions/check-if-numbers-are-ascending-in-a-sentence/solution.hpp) | | | | | | +| 2047. | [Number of Valid Words in a Sentence](https://leetcode.com/problems/number-of-valid-words-in-a-sentence/) | [C++](./solutions/number-of-valid-words-in-a-sentence/solution.hpp) | | | | | | +| 2050. | [Parallel Courses III](https://leetcode.com/problems/parallel-courses-iii/) | [C++](./solutions/parallel-courses-iii/solution.hpp) | | | | | | +| 2053. | [Kth Distinct String in an Array](https://leetcode.com/problems/kth-distinct-string-in-an-array/) | [C++](./solutions/kth-distinct-string-in-an-array/solution.hpp) | | | | | | +| 2057. | [Smallest Index With Equal Value](https://leetcode.com/problems/smallest-index-with-equal-value/) | [C++](./solutions/smallest-index-with-equal-value/solution.hpp) | | | | | | +| 2058. | [Find the Minimum and Maximum Number of Nodes Between Critical Points](https://leetcode.com/problems/find-the-minimum-and-maximum-number-of-nodes-between-critical-points/) | [C++](./solutions/find-the-minimum-and-maximum-number-of-nodes-between-critical-points/solution.hpp) | | | | | | +| 2062. | [Count Vowel Substrings of a String](https://leetcode.com/problems/count-vowel-substrings-of-a-string/) | [C++](./solutions/count-vowel-substrings-of-a-string/solution.hpp) | | | | | | +| 2068. | [Check Whether Two Strings are Almost Equivalent](https://leetcode.com/problems/check-whether-two-strings-are-almost-equivalent/) | [C++](./solutions/check-whether-two-strings-are-almost-equivalent/solution.hpp) | | | | | | +| 2073. | [Time Needed to Buy Tickets](https://leetcode.com/problems/time-needed-to-buy-tickets/) | [C++](./solutions/time-needed-to-buy-tickets/solution.hpp) | | | | | | +| 2078. | [Two Furthest Houses With Different Colors](https://leetcode.com/problems/two-furthest-houses-with-different-colors/) | [C++](./solutions/two-furthest-houses-with-different-colors/solution.hpp) | | | | | | +| 2085. | [Count Common Words With One Occurrence](https://leetcode.com/problems/count-common-words-with-one-occurrence/) | [C++](./solutions/count-common-words-with-one-occurrence/solution.hpp) | | | | | | +| 2089. | [Find Target Indices After Sorting Array](https://leetcode.com/problems/find-target-indices-after-sorting-array/) | [C++](./solutions/find-target-indices-after-sorting-array/solution.hpp) | | | | | | +| 2090. | [K Radius Subarray Averages](https://leetcode.com/problems/k-radius-subarray-averages/) | [C++](./solutions/k-radius-subarray-averages/solution.hpp) | | | | | | +| 2094. | [Finding 3-Digit Even Numbers](https://leetcode.com/problems/finding-3-digit-even-numbers/) | [C++](./solutions/finding-3-digit-even-numbers/solution.hpp) | | | | | | +| 2095. | [Delete the Middle Node of a Linked List](https://leetcode.com/problems/delete-the-middle-node-of-a-linked-list/) | [C++](./solutions/delete-the-middle-node-of-a-linked-list/solution.hpp) | | | | | | +| 2099. | [Find Subsequence of Length K With the Largest Sum](https://leetcode.com/problems/find-subsequence-of-length-k-with-the-largest-sum/) | [C++](./solutions/find-subsequence-of-length-k-with-the-largest-sum/solution.hpp) | | | | | | +| 2101. | [Detonate the Maximum Bombs](https://leetcode.com/problems/detonate-the-maximum-bombs/) | [C++](./solutions/detonate-the-maximum-bombs/solution.hpp) | | | | | | +| 2102. | [Sequentially Ordinal Rank Tracker](https://leetcode.com/problems/sequentially-ordinal-rank-tracker/) | [C++](./solutions/sequentially-ordinal-rank-tracker/solution.hpp) | | | | | | +| 2103. | [Rings and Rods](https://leetcode.com/problems/rings-and-rods/) | [C++](./solutions/rings-and-rods/solution.hpp) | | | | | | +| 2108. | [Find First Palindromic String in the Array](https://leetcode.com/problems/find-first-palindromic-string-in-the-array/) | [C++](./solutions/find-first-palindromic-string-in-the-array/solution.hpp) | | | | | | +| 2114. | [Maximum Number of Words Found in Sentences](https://leetcode.com/problems/maximum-number-of-words-found-in-sentences/) | [C++](./solutions/maximum-number-of-words-found-in-sentences/solution.hpp) | | | | | | +| 2119. | [A Number After a Double Reversal](https://leetcode.com/problems/a-number-after-a-double-reversal/) | [C++](./solutions/a-number-after-a-double-reversal/solution.hpp) | | | | | | +| 2124. | [Check if All A's Appears Before All B's](https://leetcode.com/problems/check-if-all-as-appears-before-all-bs/) | [C++](./solutions/check-if-all-as-appears-before-all-bs/solution.hpp) | | | | | | +| 2129. | [Capitalize the Title](https://leetcode.com/problems/capitalize-the-title/) | [C++](./solutions/capitalize-the-title/solution.hpp) | | | | | | +| 2130. | [Maximum Twin Sum of a Linked List](https://leetcode.com/problems/maximum-twin-sum-of-a-linked-list/) | [C++](./solutions/maximum-twin-sum-of-a-linked-list/solution.hpp) | | | | | | +| 2131. | [Longest Palindrome by Concatenating Two Letter Words](https://leetcode.com/problems/longest-palindrome-by-concatenating-two-letter-words/) | [C++](./solutions/longest-palindrome-by-concatenating-two-letter-words/solution.hpp) | | | | | | +| 2133. | [Check if Every Row and Column Contains All Numbers](https://leetcode.com/problems/check-if-every-row-and-column-contains-all-numbers/) | [C++](./solutions/check-if-every-row-and-column-contains-all-numbers/solution.hpp) | | | | | | +| 2136. | [Earliest Possible Day of Full Bloom](https://leetcode.com/problems/earliest-possible-day-of-full-bloom/) | [C++](./solutions/earliest-possible-day-of-full-bloom/solution.hpp) | | | | | | +| 2138. | [Divide a String Into Groups of Size k](https://leetcode.com/problems/divide-a-string-into-groups-of-size-k/) | [C++](./solutions/divide-a-string-into-groups-of-size-k/solution.hpp) | | | | | | +| 2140. | [Solving Questions With Brainpower](https://leetcode.com/problems/solving-questions-with-brainpower/) | [C++](./solutions/solving-questions-with-brainpower/solution.hpp) | | | | | | +| 2141. | [Maximum Running Time of N Computers](https://leetcode.com/problems/maximum-running-time-of-n-computers/) | [C++](./solutions/maximum-running-time-of-n-computers/solution.hpp) | | | | | | +| 2144. | [Minimum Cost of Buying Candies With Discount](https://leetcode.com/problems/minimum-cost-of-buying-candies-with-discount/) | [C++](./solutions/minimum-cost-of-buying-candies-with-discount/solution.hpp) | | | | | | +| 2148. | [Count Elements With Strictly Smaller and Greater Elements ](https://leetcode.com/problems/count-elements-with-strictly-smaller-and-greater-elements/) | [C++](./solutions/count-elements-with-strictly-smaller-and-greater-elements/solution.hpp) | | | | | | +| 2150. | [Find All Lonely Numbers in the Array](https://leetcode.com/problems/find-all-lonely-numbers-in-the-array/) | [C++](./solutions/find-all-lonely-numbers-in-the-array/solution.hpp) | | | | | | +| 2154. | [Keep Multiplying Found Values by Two](https://leetcode.com/problems/keep-multiplying-found-values-by-two/) | [C++](./solutions/keep-multiplying-found-values-by-two/solution.hpp) | | | | | | +| 2160. | [Minimum Sum of Four Digit Number After Splitting Digits](https://leetcode.com/problems/minimum-sum-of-four-digit-number-after-splitting-digits/) | [C++](./solutions/minimum-sum-of-four-digit-number-after-splitting-digits/solution.hpp) | | | | | | +| 2164. | [Sort Even and Odd Indices Independently](https://leetcode.com/problems/sort-even-and-odd-indices-independently/) | [C++](./solutions/sort-even-and-odd-indices-independently/solution.hpp) | | | | | | +| 2169. | [Count Operations to Obtain Zero](https://leetcode.com/problems/count-operations-to-obtain-zero/) | [C++](./solutions/count-operations-to-obtain-zero/solution.hpp) | | | | | | +| 2176. | [Count Equal and Divisible Pairs in an Array](https://leetcode.com/problems/count-equal-and-divisible-pairs-in-an-array/) | [C++](./solutions/count-equal-and-divisible-pairs-in-an-array/solution.hpp) | | | | | | +| 2180. | [Count Integers With Even Digit Sum](https://leetcode.com/problems/count-integers-with-even-digit-sum/) | [C++](./solutions/count-integers-with-even-digit-sum/solution.hpp) | | | | | | +| 2185. | [Counting Words With a Given Prefix](https://leetcode.com/problems/counting-words-with-a-given-prefix/) | [C++](./solutions/counting-words-with-a-given-prefix/solution.hpp) | | | | | | +| 2187. | [Minimum Time to Complete Trips](https://leetcode.com/problems/minimum-time-to-complete-trips/) | [C++](./solutions/minimum-time-to-complete-trips/solution.hpp) | | | | | | +| 2190. | [Most Frequent Number Following Key In an Array](https://leetcode.com/problems/most-frequent-number-following-key-in-an-array/) | [C++](./solutions/most-frequent-number-following-key-in-an-array/solution.hpp) | | | | | | +| 2194. | [Cells in a Range on an Excel Sheet](https://leetcode.com/problems/cells-in-a-range-on-an-excel-sheet/) | [C++](./solutions/cells-in-a-range-on-an-excel-sheet/solution.hpp) | | | | | | +| 2196. | [Create Binary Tree From Descriptions](https://leetcode.com/problems/create-binary-tree-from-descriptions/) | [C++](./solutions/create-binary-tree-from-descriptions/solution.hpp) | | | | | | +| 2200. | [Find All K-Distant Indices in an Array](https://leetcode.com/problems/find-all-k-distant-indices-in-an-array/) | [C++](./solutions/find-all-k-distant-indices-in-an-array/solution.hpp) | | | | | | +| 2206. | [Divide Array Into Equal Pairs](https://leetcode.com/problems/divide-array-into-equal-pairs/) | [C++](./solutions/divide-array-into-equal-pairs/solution.hpp) | | | | | | +| 2210. | [Count Hills and Valleys in an Array](https://leetcode.com/problems/count-hills-and-valleys-in-an-array/) | [C++](./solutions/count-hills-and-valleys-in-an-array/solution.hpp) | | | | | | +| 2215. | [Find the Difference of Two Arrays](https://leetcode.com/problems/find-the-difference-of-two-arrays/) | [C++](./solutions/find-the-difference-of-two-arrays/solution.hpp) | | | | | | +| 2218. | [Maximum Value of K Coins From Piles](https://leetcode.com/problems/maximum-value-of-k-coins-from-piles/) | [C++](./solutions/maximum-value-of-k-coins-from-piles/solution.hpp) | | | | | | +| 2220. | [Minimum Bit Flips to Convert Number](https://leetcode.com/problems/minimum-bit-flips-to-convert-number/) | [C++](./solutions/minimum-bit-flips-to-convert-number/solution.hpp) | | | | | | +| 2224. | [Minimum Number of Operations to Convert Time](https://leetcode.com/problems/minimum-number-of-operations-to-convert-time/) | [C++](./solutions/minimum-number-of-operations-to-convert-time/solution.hpp) | | | | | | +| 2231. | [Largest Number After Digit Swaps by Parity](https://leetcode.com/problems/largest-number-after-digit-swaps-by-parity/) | [C++](./solutions/largest-number-after-digit-swaps-by-parity/solution.hpp) | | | | | | +| 2235. | [Add Two Integers](https://leetcode.com/problems/add-two-integers/) | [C++](./solutions/add-two-integers/solution.hpp) | | | | | | +| 2236. | [Root Equals Sum of Children](https://leetcode.com/problems/root-equals-sum-of-children/) | [C++](./solutions/root-equals-sum-of-children/solution.hpp) | | | | | | +| 2239. | [Find Closest Number to Zero](https://leetcode.com/problems/find-closest-number-to-zero/) | [C++](./solutions/find-closest-number-to-zero/solution.hpp) | | | | | | +| 2243. | [Calculate Digit Sum of a String](https://leetcode.com/problems/calculate-digit-sum-of-a-string/) | [C++](./solutions/calculate-digit-sum-of-a-string/solution.hpp) | | | | | | +| 2246. | [Longest Path With Different Adjacent Characters](https://leetcode.com/problems/longest-path-with-different-adjacent-characters/) | [C++](./solutions/longest-path-with-different-adjacent-characters/solution.hpp) | | | | | | +| 2248. | [Intersection of Multiple Arrays](https://leetcode.com/problems/intersection-of-multiple-arrays/) | [C++](./solutions/intersection-of-multiple-arrays/solution.hpp) | | | | | | +| 2251. | [Number of Flowers in Full Bloom](https://leetcode.com/problems/number-of-flowers-in-full-bloom/) | [C++](./solutions/number-of-flowers-in-full-bloom/solution.hpp) | | | | | | +| 2255. | [Count Prefixes of a Given String](https://leetcode.com/problems/count-prefixes-of-a-given-string/) | [C++](./solutions/count-prefixes-of-a-given-string/solution.hpp) | | | | | | +| 2259. | [Remove Digit From Number to Maximize Result](https://leetcode.com/problems/remove-digit-from-number-to-maximize-result/) | [C++](./solutions/remove-digit-from-number-to-maximize-result/solution.hpp) | | | | | | +| 2264. | [Largest 3-Same-Digit Number in String](https://leetcode.com/problems/largest-3-same-digit-number-in-string/) | [C++](./solutions/largest-3-same-digit-number-in-string/solution.hpp) | | | | | | +| 2269. | [Find the K-Beauty of a Number](https://leetcode.com/problems/find-the-k-beauty-of-a-number/) | [C++](./solutions/find-the-k-beauty-of-a-number/solution.hpp) | | | | | | +| 2272. | [Substring With Largest Variance](https://leetcode.com/problems/substring-with-largest-variance/) | [C++](./solutions/substring-with-largest-variance/solution.hpp) | | | | | | +| 2273. | [Find Resultant Array After Removing Anagrams](https://leetcode.com/problems/find-resultant-array-after-removing-anagrams/) | [C++](./solutions/find-resultant-array-after-removing-anagrams/solution.hpp) | | | | | | +| 2278. | [Percentage of Letter in String](https://leetcode.com/problems/percentage-of-letter-in-string/) | [C++](./solutions/percentage-of-letter-in-string/solution.hpp) | | | | | | +| 2283. | [Check if Number Has Equal Digit Count and Digit Value](https://leetcode.com/problems/check-if-number-has-equal-digit-count-and-digit-value/) | [C++](./solutions/check-if-number-has-equal-digit-count-and-digit-value/solution.hpp) | | | | | | +| 2287. | [Rearrange Characters to Make Target String](https://leetcode.com/problems/rearrange-characters-to-make-target-string/) | [C++](./solutions/rearrange-characters-to-make-target-string/solution.hpp) | | | | | | +| 2293. | [Min Max Game](https://leetcode.com/problems/min-max-game/) | [C++](./solutions/min-max-game/solution.hpp) | | | | | | +| 2299. | [Strong Password Checker II](https://leetcode.com/problems/strong-password-checker-ii/) | [C++](./solutions/strong-password-checker-ii/solution.hpp) | | | | | | +| 2300. | [Successful Pairs of Spells and Potions](https://leetcode.com/problems/successful-pairs-of-spells-and-potions/) | [C++](./solutions/successful-pairs-of-spells-and-potions/solution.hpp) | | | | | | +| 2303. | [Calculate Amount Paid in Taxes](https://leetcode.com/problems/calculate-amount-paid-in-taxes/) | [C++](./solutions/calculate-amount-paid-in-taxes/solution.hpp) | | | | | | +| 2305. | [Fair Distribution of Cookies](https://leetcode.com/problems/fair-distribution-of-cookies/) | [C++](./solutions/fair-distribution-of-cookies/solution.hpp) | | | | | | +| 2309. | [Greatest English Letter in Upper and Lower Case](https://leetcode.com/problems/greatest-english-letter-in-upper-and-lower-case/) | [C++](./solutions/greatest-english-letter-in-upper-and-lower-case/solution.hpp) | | | | | | +| 2315. | [Count Asterisks](https://leetcode.com/problems/count-asterisks/) | [C++](./solutions/count-asterisks/solution.hpp) | | | | | | +| 2316. | [Count Unreachable Pairs of Nodes in an Undirected Graph](https://leetcode.com/problems/count-unreachable-pairs-of-nodes-in-an-undirected-graph/) | [C++](./solutions/count-unreachable-pairs-of-nodes-in-an-undirected-graph/solution.hpp) | | | | | | +| 2319. | [Check if Matrix Is X-Matrix](https://leetcode.com/problems/check-if-matrix-is-x-matrix/) | [C++](./solutions/check-if-matrix-is-x-matrix/solution.hpp) | | | | | | +| 2325. | [Decode the Message](https://leetcode.com/problems/decode-the-message/) | [C++](./solutions/decode-the-message/solution.hpp) | | | | | | +| 2328. | [Number of Increasing Paths in a Grid](https://leetcode.com/problems/number-of-increasing-paths-in-a-grid/) | [C++](./solutions/number-of-increasing-paths-in-a-grid/solution.hpp) | | | | | | +| 2331. | [Evaluate Boolean Binary Tree](https://leetcode.com/problems/evaluate-boolean-binary-tree/) | [C++](./solutions/evaluate-boolean-binary-tree/solution.hpp) | | | | | | +| 2335. | [Minimum Amount of Time to Fill Cups](https://leetcode.com/problems/minimum-amount-of-time-to-fill-cups/) | [C++](./solutions/minimum-amount-of-time-to-fill-cups/solution.hpp) | | | | | | +| 2336. | [Smallest Number in Infinite Set](https://leetcode.com/problems/smallest-number-in-infinite-set/) | [C++](./solutions/smallest-number-in-infinite-set/solution.hpp) | | | | | | +| 2341. | [Maximum Number of Pairs in Array](https://leetcode.com/problems/maximum-number-of-pairs-in-array/) | [C++](./solutions/maximum-number-of-pairs-in-array/solution.hpp) | | | | | | +| 2347. | [Best Poker Hand](https://leetcode.com/problems/best-poker-hand/) | [C++](./solutions/best-poker-hand/solution.hpp) | | | | | | +| 2348. | [Number of Zero-Filled Subarrays](https://leetcode.com/problems/number-of-zero-filled-subarrays/) | [C++](./solutions/number-of-zero-filled-subarrays/solution.hpp) | | | | | | +| 2350. | [Shortest Impossible Sequence of Rolls](https://leetcode.com/problems/shortest-impossible-sequence-of-rolls/) | [C++](./solutions/shortest-impossible-sequence-of-rolls/solution.hpp) | | | | | | +| 2351. | [First Letter to Appear Twice](https://leetcode.com/problems/first-letter-to-appear-twice/) | [C++](./solutions/first-letter-to-appear-twice/solution.hpp) | | | | | | +| 2352. | [Equal Row and Column Pairs](https://leetcode.com/problems/equal-row-and-column-pairs/) | [C++](./solutions/equal-row-and-column-pairs/solution.hpp) | | | | | | +| 2357. | [Make Array Zero by Subtracting Equal Amounts](https://leetcode.com/problems/make-array-zero-by-subtracting-equal-amounts/) | [C++](./solutions/make-array-zero-by-subtracting-equal-amounts/solution.hpp) | | | | | | +| 2360. | [Longest Cycle in a Graph](https://leetcode.com/problems/longest-cycle-in-a-graph/) | [C++](./solutions/longest-cycle-in-a-graph/solution.hpp) | | | | | | +| 2363. | [Merge Similar Items](https://leetcode.com/problems/merge-similar-items/) | [C++](./solutions/merge-similar-items/solution.hpp) | | | | | | +| 2366. | [Minimum Replacements to Sort the Array](https://leetcode.com/problems/minimum-replacements-to-sort-the-array/) | [C++](./solutions/minimum-replacements-to-sort-the-array/solution.hpp) | | | | | | +| 2367. | [Number of Arithmetic Triplets](https://leetcode.com/problems/number-of-arithmetic-triplets/) | [C++](./solutions/number-of-arithmetic-triplets/solution.hpp) | | | | | | +| 2369. | [Check if There is a Valid Partition For The Array](https://leetcode.com/problems/check-if-there-is-a-valid-partition-for-the-array/) | [C++](./solutions/check-if-there-is-a-valid-partition-for-the-array/solution.hpp) | | | | | | +| 2370. | [Longest Ideal Subsequence](https://leetcode.com/problems/longest-ideal-subsequence/) | [C++](./solutions/longest-ideal-subsequence/solution.hpp) | | | | | | +| 2373. | [Largest Local Values in a Matrix](https://leetcode.com/problems/largest-local-values-in-a-matrix/) | [C++](./solutions/largest-local-values-in-a-matrix/solution.hpp) | | | | | | +| 2379. | [Minimum Recolors to Get K Consecutive Black Blocks](https://leetcode.com/problems/minimum-recolors-to-get-k-consecutive-black-blocks/) | [C++](./solutions/minimum-recolors-to-get-k-consecutive-black-blocks/solution.hpp) | | | | | | +| 2383. | [Minimum Hours of Training to Win a Competition](https://leetcode.com/problems/minimum-hours-of-training-to-win-a-competition/) | [C++](./solutions/minimum-hours-of-training-to-win-a-competition/solution.hpp) | | | | | | +| 2389. | [Longest Subsequence With Limited Sum](https://leetcode.com/problems/longest-subsequence-with-limited-sum/) | [C++](./solutions/longest-subsequence-with-limited-sum/solution.hpp) | | | | | | +| 2390. | [Removing Stars From a String](https://leetcode.com/problems/removing-stars-from-a-string/) | [C++](./solutions/removing-stars-from-a-string/solution.hpp) | | | | | | +| 2395. | [Find Subarrays With Equal Sum](https://leetcode.com/problems/find-subarrays-with-equal-sum/) | [C++](./solutions/find-subarrays-with-equal-sum/solution.hpp) | | | | | | +| 2399. | [Check Distances Between Same Letters](https://leetcode.com/problems/check-distances-between-same-letters/) | [C++](./solutions/check-distances-between-same-letters/solution.hpp) | | | | | | +| 2404. | [Most Frequent Even Element](https://leetcode.com/problems/most-frequent-even-element/) | [C++](./solutions/most-frequent-even-element/solution.hpp) | | | | | | +| 2405. | [Optimal Partition of String](https://leetcode.com/problems/optimal-partition-of-string/) | [C++](./solutions/optimal-partition-of-string/solution.hpp) | | | | | | +| 2409. | [Count Days Spent Together](https://leetcode.com/problems/count-days-spent-together/) | [C++](./solutions/count-days-spent-together/solution.hpp) | | | | | | +| 2413. | [Smallest Even Multiple](https://leetcode.com/problems/smallest-even-multiple/) | [C++](./solutions/smallest-even-multiple/solution.hpp) | | | | | | +| 2418. | [Sort the People](https://leetcode.com/problems/sort-the-people/) | [C++](./solutions/sort-the-people/solution.hpp) | | | | | | +| 2423. | [Remove Letter To Equalize Frequency](https://leetcode.com/problems/remove-letter-to-equalize-frequency/) | [C++](./solutions/remove-letter-to-equalize-frequency/solution.hpp) | | | | | | +| 2425. | [Bitwise XOR of All Pairings](https://leetcode.com/problems/bitwise-xor-of-all-pairings/) | [C++](./solutions/bitwise-xor-of-all-pairings/solution.hpp) | | | | | | +| 2427. | [Number of Common Factors](https://leetcode.com/problems/number-of-common-factors/) | [C++](./solutions/number-of-common-factors/solution.hpp) | | | | | | +| 2432. | [The Employee That Worked on the Longest Task](https://leetcode.com/problems/the-employee-that-worked-on-the-longest-task/) | [C++](./solutions/the-employee-that-worked-on-the-longest-task/solution.hpp) | | | | | | +| 2437. | [Number of Valid Clock Times](https://leetcode.com/problems/number-of-valid-clock-times/) | [C++](./solutions/number-of-valid-clock-times/solution.hpp) | | | | | | +| 2439. | [Minimize Maximum of Array](https://leetcode.com/problems/minimize-maximum-of-array/) | [C++](./solutions/minimize-maximum-of-array/solution.hpp) | | | | | | +| 2441. | [Largest Positive Integer That Exists With Its Negative](https://leetcode.com/problems/largest-positive-integer-that-exists-with-its-negative/) | [C++](./solutions/largest-positive-integer-that-exists-with-its-negative/solution.hpp) | | | | | | +| 2444. | [Count Subarrays With Fixed Bounds](https://leetcode.com/problems/count-subarrays-with-fixed-bounds/) | [C++](./solutions/count-subarrays-with-fixed-bounds/solution.hpp) | | | | | | +| 2446. | [Determine if Two Events Have Conflict](https://leetcode.com/problems/determine-if-two-events-have-conflict/) | [C++](./solutions/determine-if-two-events-have-conflict/solution.hpp) | | | | | | +| 2448. | [Minimum Cost to Make Array Equal](https://leetcode.com/problems/minimum-cost-to-make-array-equal/) | [C++](./solutions/minimum-cost-to-make-array-equal/solution.hpp) | | | | | | +| 2451. | [Odd String Difference](https://leetcode.com/problems/odd-string-difference/) | [C++](./solutions/odd-string-difference/solution.hpp) | | | | | | +| 2455. | [Average Value of Even Numbers That Are Divisible by Three](https://leetcode.com/problems/average-value-of-even-numbers-that-are-divisible-by-three/) | [C++](./solutions/average-value-of-even-numbers-that-are-divisible-by-three/solution.hpp) | | | | | | +| 2460. | [Apply Operations to an Array](https://leetcode.com/problems/apply-operations-to-an-array/) | [C++](./solutions/apply-operations-to-an-array/solution.hpp) | | | | | | +| 2462. | [Total Cost to Hire K Workers](https://leetcode.com/problems/total-cost-to-hire-k-workers/) | [C++](./solutions/total-cost-to-hire-k-workers/solution.hpp) | | | | | | +| 2465. | [Number of Distinct Averages](https://leetcode.com/problems/number-of-distinct-averages/) | [C++](./solutions/number-of-distinct-averages/solution.hpp) | | | | | | +| 2466. | [Count Ways To Build Good Strings](https://leetcode.com/problems/count-ways-to-build-good-strings/) | [C++](./solutions/count-ways-to-build-good-strings/solution.hpp) | | | | | | +| 2469. | [Convert the Temperature](https://leetcode.com/problems/convert-the-temperature/) | [C++](./solutions/convert-the-temperature/solution.hpp) | | | | | | +| 2475. | [Number of Unequal Triplets in Array](https://leetcode.com/problems/number-of-unequal-triplets-in-array/) | [C++](./solutions/number-of-unequal-triplets-in-array/solution.hpp) | | | | | | +| 2481. | [Minimum Cuts to Divide a Circle](https://leetcode.com/problems/minimum-cuts-to-divide-a-circle/) | [C++](./solutions/minimum-cuts-to-divide-a-circle/solution.hpp) | | | | | | +| 2483. | [Minimum Penalty for a Shop](https://leetcode.com/problems/minimum-penalty-for-a-shop/) | [C++](./solutions/minimum-penalty-for-a-shop/solution.hpp) | | | | | | +| 2485. | [Find the Pivot Integer](https://leetcode.com/problems/find-the-pivot-integer/) | [C++](./solutions/find-the-pivot-integer/solution.hpp) | | | | | | +| 2490. | [Circular Sentence](https://leetcode.com/problems/circular-sentence/) | [C++](./solutions/circular-sentence/solution.hpp) | | | | | | +| 2492. | [Minimum Score of a Path Between Two Cities](https://leetcode.com/problems/minimum-score-of-a-path-between-two-cities/) | [C++](./solutions/minimum-score-of-a-path-between-two-cities/solution.hpp) | | | | | | +| 2496. | [Maximum Value of a String in an Array](https://leetcode.com/problems/maximum-value-of-a-string-in-an-array/) | [C++](./solutions/maximum-value-of-a-string-in-an-array/solution.hpp) | | | | | | +| 2500. | [Delete Greatest Value in Each Row](https://leetcode.com/problems/delete-greatest-value-in-each-row/) | [C++](./solutions/delete-greatest-value-in-each-row/solution.hpp) | | | | | | +| 2506. | [Count Pairs Of Similar Strings](https://leetcode.com/problems/count-pairs-of-similar-strings/) | [C++](./solutions/count-pairs-of-similar-strings/solution.hpp) | | | | | | +| 2511. | [Maximum Enemy Forts That Can Be Captured](https://leetcode.com/problems/maximum-enemy-forts-that-can-be-captured/) | [C++](./solutions/maximum-enemy-forts-that-can-be-captured/solution.hpp) | | | | | | +| 2515. | [Shortest Distance to Target String in a Circular Array](https://leetcode.com/problems/shortest-distance-to-target-string-in-a-circular-array/) | [C++](./solutions/shortest-distance-to-target-string-in-a-circular-array/solution.hpp) | | | | | | +| 2520. | [Count the Digits That Divide a Number](https://leetcode.com/problems/count-the-digits-that-divide-a-number/) | [C++](./solutions/count-the-digits-that-divide-a-number/solution.hpp) | | | | | | +| 2525. | [Categorize Box According to Criteria](https://leetcode.com/problems/categorize-box-according-to-criteria/) | [C++](./solutions/categorize-box-according-to-criteria/solution.hpp) | | | | | | +| 2529. | [Maximum Count of Positive Integer and Negative Integer](https://leetcode.com/problems/maximum-count-of-positive-integer-and-negative-integer/) | [C++](./solutions/maximum-count-of-positive-integer-and-negative-integer/solution.hpp) | | | | | | +| 2535. | [Difference Between Element Sum and Digit Sum of an Array](https://leetcode.com/problems/difference-between-element-sum-and-digit-sum-of-an-array/) | [C++](./solutions/difference-between-element-sum-and-digit-sum-of-an-array/solution.hpp) | | | | | | +| 2536. | [Increment Submatrices by One](https://leetcode.com/problems/increment-submatrices-by-one/) | [C++](./solutions/increment-submatrices-by-one/solution.hpp) | | | | | | +| 2540. | [Minimum Common Value](https://leetcode.com/problems/minimum-common-value/) | [C++](./solutions/minimum-common-value/solution.hpp) | | | | | | +| 2542. | [Maximum Subsequence Score](https://leetcode.com/problems/maximum-subsequence-score/) | [C++](./solutions/maximum-subsequence-score/solution.hpp) | | | | | | +| 2544. | [Alternating Digit Sum](https://leetcode.com/problems/alternating-digit-sum/) | [C++](./solutions/alternating-digit-sum/solution.hpp) | | | | | | +| 2549. | [Count Distinct Numbers on Board](https://leetcode.com/problems/count-distinct-numbers-on-board/) | [C++](./solutions/count-distinct-numbers-on-board/solution.hpp) | | | | | | +| 2551. | [Put Marbles in Bags](https://leetcode.com/problems/put-marbles-in-bags/) | [C++](./solutions/put-marbles-in-bags/solution.hpp) | | | | | | +| 2553. | [Separate the Digits in an Array](https://leetcode.com/problems/separate-the-digits-in-an-array/) | [C++](./solutions/separate-the-digits-in-an-array/solution.hpp) | | | | | | +| 2558. | [Take Gifts From the Richest Pile](https://leetcode.com/problems/take-gifts-from-the-richest-pile/) | [C++](./solutions/take-gifts-from-the-richest-pile/solution.hpp) | | | | | | +| 2562. | [Find the Array Concatenation Value](https://leetcode.com/problems/find-the-array-concatenation-value/) | [C++](./solutions/find-the-array-concatenation-value/solution.hpp) | | | | | | +| 2566. | [Maximum Difference by Remapping a Digit](https://leetcode.com/problems/maximum-difference-by-remapping-a-digit/) | [C++](./solutions/maximum-difference-by-remapping-a-digit/solution.hpp) | | | | | | +| 2570. | [Merge Two 2D Arrays by Summing Values](https://leetcode.com/problems/merge-two-2d-arrays-by-summing-values/) | [C++](./solutions/merge-two-2d-arrays-by-summing-values/solution.hpp) | | | | | | +| 2574. | [Left and Right Sum Differences](https://leetcode.com/problems/left-and-right-sum-differences/) | [C++](./solutions/left-and-right-sum-differences/solution.hpp) | | | | | | +| 2575. | [Find the Divisibility Array of a String](https://leetcode.com/problems/find-the-divisibility-array-of-a-string/) | [C++](./solutions/find-the-divisibility-array-of-a-string/solution.hpp) | | | | | | +| 2576. | [Find the Maximum Number of Marked Indices](https://leetcode.com/problems/find-the-maximum-number-of-marked-indices/) | [C++](./solutions/find-the-maximum-number-of-marked-indices/solution.hpp) | | | | | | +| 2577. | [Minimum Time to Visit a Cell In a Grid](https://leetcode.com/problems/minimum-time-to-visit-a-cell-in-a-grid/) | [C++](./solutions/minimum-time-to-visit-a-cell-in-a-grid/solution.hpp) | | | | | | +| 2578. | [Split With Minimum Sum](https://leetcode.com/problems/split-with-minimum-sum/) | [C++](./solutions/split-with-minimum-sum/solution.hpp) | | | | | | +| 2582. | [Pass the Pillow](https://leetcode.com/problems/pass-the-pillow/) | [C++](./solutions/pass-the-pillow/solution.hpp) | | | | | | +| 2586. | [Count the Number of Vowel Strings in Range](https://leetcode.com/problems/count-the-number-of-vowel-strings-in-range/) | [C++](./solutions/count-the-number-of-vowel-strings-in-range/solution.hpp) | | | | | | +| 2591. | [Distribute Money to Maximum Children](https://leetcode.com/problems/distribute-money-to-maximum-children/) | [C++](./solutions/distribute-money-to-maximum-children/solution.hpp) | | | | | | +| 2595. | [Number of Even and Odd Bits](https://leetcode.com/problems/number-of-even-and-odd-bits/) | [C++](./solutions/number-of-even-and-odd-bits/solution.hpp) | | | | | | +| 2600. | [K Items With the Maximum Sum](https://leetcode.com/problems/k-items-with-the-maximum-sum/) | [C++](./solutions/k-items-with-the-maximum-sum/solution.hpp) | | | | | | +| 2605. | [Form Smallest Number From Two Digit Arrays](https://leetcode.com/problems/form-smallest-number-from-two-digit-arrays/) | [C++](./solutions/form-smallest-number-from-two-digit-arrays/solution.hpp) | | | | | | +| 2609. | [Find the Longest Balanced Substring of a Binary String](https://leetcode.com/problems/find-the-longest-balanced-substring-of-a-binary-string/) | [C++](./solutions/find-the-longest-balanced-substring-of-a-binary-string/solution.hpp) | | | | | | +| 2614. | [Prime In Diagonal](https://leetcode.com/problems/prime-in-diagonal/) | [C++](./solutions/prime-in-diagonal/solution.hpp) | | | | | | +| 2616. | [Minimize the Maximum Difference of Pairs](https://leetcode.com/problems/minimize-the-maximum-difference-of-pairs/) | [C++](./solutions/minimize-the-maximum-difference-of-pairs/solution.hpp) | | | | | | +| 2639. | [Find the Width of Columns of a Grid](https://leetcode.com/problems/find-the-width-of-columns-of-a-grid/) | [C++](./solutions/find-the-width-of-columns-of-a-grid/solution.hpp) | | | | | | +| 2643. | [Row With Maximum Ones](https://leetcode.com/problems/row-with-maximum-ones/) | [C++](./solutions/row-with-maximum-ones/solution.hpp) | | | | | | +| 2644. | [Find the Maximum Divisibility Score](https://leetcode.com/problems/find-the-maximum-divisibility-score/) | [C++](./solutions/find-the-maximum-divisibility-score/solution.hpp) | | | | | | +| 2651. | [Calculate Delayed Arrival Time](https://leetcode.com/problems/calculate-delayed-arrival-time/) | [C++](./solutions/calculate-delayed-arrival-time/solution.hpp) | | | | | | +| 2652. | [Sum Multiples](https://leetcode.com/problems/sum-multiples/) | [C++](./solutions/sum-multiples/solution.hpp) | | | | | | +| 2656. | [Maximum Sum With Exactly K Elements ](https://leetcode.com/problems/maximum-sum-with-exactly-k-elements/) | [C++](./solutions/maximum-sum-with-exactly-k-elements/solution.hpp) | | | | | | +| 2660. | [Determine the Winner of a Bowling Game](https://leetcode.com/problems/determine-the-winner-of-a-bowling-game/) | [C++](./solutions/determine-the-winner-of-a-bowling-game/solution.hpp) | | | | | | +| 2670. | [Find the Distinct Difference Array](https://leetcode.com/problems/find-the-distinct-difference-array/) | [C++](./solutions/find-the-distinct-difference-array/solution.hpp) | | | | | | +| 2678. | [Number of Senior Citizens](https://leetcode.com/problems/number-of-senior-citizens/) | [C++](./solutions/number-of-senior-citizens/solution.hpp) | | | | | | +| 2682. | [Find the Losers of the Circular Game](https://leetcode.com/problems/find-the-losers-of-the-circular-game/) | [C++](./solutions/find-the-losers-of-the-circular-game/solution.hpp) | | | | | | +| 2696. | [Minimum String Length After Removing Substrings](https://leetcode.com/problems/minimum-string-length-after-removing-substrings/) | [C++](./solutions/minimum-string-length-after-removing-substrings/solution.hpp) | | | | | | +| 2697. | [Lexicographically Smallest Palindrome](https://leetcode.com/problems/lexicographically-smallest-palindrome/) | [C++](./solutions/lexicographically-smallest-palindrome/solution.hpp) | | | | | | +| 2706. | [Buy Two Chocolates](https://leetcode.com/problems/buy-two-chocolates/) | [C++](./solutions/buy-two-chocolates/solution.hpp) | | | | | | +| 2707. | [Extra Characters in a String](https://leetcode.com/problems/extra-characters-in-a-string/) | [C++](./solutions/extra-characters-in-a-string/solution.hpp) | | | | | | +| 2710. | [Remove Trailing Zeros From a String](https://leetcode.com/problems/remove-trailing-zeros-from-a-string/) | [C++](./solutions/remove-trailing-zeros-from-a-string/solution.hpp) | | | | | | +| 2716. | [Minimize String Length](https://leetcode.com/problems/minimize-string-length/) | [C++](./solutions/minimize-string-length/solution.hpp) | | | | | | +| 2717. | [Semi-Ordered Permutation](https://leetcode.com/problems/semi-ordered-permutation/) | [C++](./solutions/semi-ordered-permutation/solution.hpp) | | | | | | +| 2729. | [Check if The Number is Fascinating](https://leetcode.com/problems/check-if-the-number-is-fascinating/) | [C++](./solutions/check-if-the-number-is-fascinating/solution.hpp) | | | | | | +| 2733. | [Neither Minimum nor Maximum](https://leetcode.com/problems/neither-minimum-nor-maximum/) | [C++](./solutions/neither-minimum-nor-maximum/solution.hpp) | | | | | | +| 2739. | [Total Distance Traveled](https://leetcode.com/problems/total-distance-traveled/) | [C++](./solutions/total-distance-traveled/solution.hpp) | | | | | | +| 2742. | [Painting the Walls](https://leetcode.com/problems/painting-the-walls/) | [C++](./solutions/painting-the-walls/solution.hpp) | | | | | | +| 2744. | [Find Maximum Number of String Pairs](https://leetcode.com/problems/find-maximum-number-of-string-pairs/) | [C++](./solutions/find-maximum-number-of-string-pairs/solution.hpp) | | | | | | +| 2748. | [Number of Beautiful Pairs](https://leetcode.com/problems/number-of-beautiful-pairs/) | [C++](./solutions/number-of-beautiful-pairs/solution.hpp) | | | | | | +| 2760. | [Longest Even Odd Subarray With Threshold](https://leetcode.com/problems/longest-even-odd-subarray-with-threshold/) | [C++](./solutions/longest-even-odd-subarray-with-threshold/solution.hpp) | | | | | | +| 2765. | [Longest Alternating Subarray](https://leetcode.com/problems/longest-alternating-subarray/) | [C++](./solutions/longest-alternating-subarray/solution.hpp) | | | | | | +| 2769. | [Find the Maximum Achievable Number](https://leetcode.com/problems/find-the-maximum-achievable-number/) | [C++](./solutions/find-the-maximum-achievable-number/solution.hpp) | | | | | | +| 2778. | [Sum of Squares of Special Elements ](https://leetcode.com/problems/sum-of-squares-of-special-elements/) | [C++](./solutions/sum-of-squares-of-special-elements/solution.hpp) | | | | | | +| 2784. | [Check if Array is Good](https://leetcode.com/problems/check-if-array-is-good/) | [C++](./solutions/check-if-array-is-good/solution.hpp) | | | | | | +| 2788. | [Split Strings by Separator](https://leetcode.com/problems/split-strings-by-separator/) | [C++](./solutions/split-strings-by-separator/solution.hpp) | | | | | | +| 2798. | [Number of Employees Who Met the Target](https://leetcode.com/problems/number-of-employees-who-met-the-target/) | [C++](./solutions/number-of-employees-who-met-the-target/solution.hpp) | | | | | | +| 2806. | [Account Balance After Rounded Purchase](https://leetcode.com/problems/account-balance-after-rounded-purchase/) | [C++](./solutions/account-balance-after-rounded-purchase/solution.hpp) | | | | | | +| 2810. | [Faulty Keyboard](https://leetcode.com/problems/faulty-keyboard/) | [C++](./solutions/faulty-keyboard/solution.hpp) | | | | | | +| 2815. | [Max Pair Sum in an Array](https://leetcode.com/problems/max-pair-sum-in-an-array/) | [C++](./solutions/max-pair-sum-in-an-array/solution.hpp) | | | | | | +| 2824. | [Count Pairs Whose Sum is Less than Target](https://leetcode.com/problems/count-pairs-whose-sum-is-less-than-target/) | [C++](./solutions/count-pairs-whose-sum-is-less-than-target/solution.hpp) | | | | | | +| 2828. | [Check if a String Is an Acronym of Words](https://leetcode.com/problems/check-if-a-string-is-an-acronym-of-words/) | [C++](./solutions/check-if-a-string-is-an-acronym-of-words/solution.hpp) | | | | | | +| 2833. | [Furthest Point From Origin](https://leetcode.com/problems/furthest-point-from-origin/) | [C++](./solutions/furthest-point-from-origin/solution.hpp) | | | | | | +| 2839. | [Check if Strings Can be Made Equal With Operations I](https://leetcode.com/problems/check-if-strings-can-be-made-equal-with-operations-i/) | [C++](./solutions/check-if-strings-can-be-made-equal-with-operations-i/solution.hpp) | | | | | | +| 2843. | [ Count Symmetric Integers](https://leetcode.com/problems/count-symmetric-integers/) | [C++](./solutions/count-symmetric-integers/solution.hpp) | | | | | | +| 2848. | [Points That Intersect With Cars](https://leetcode.com/problems/points-that-intersect-with-cars/) | [C++](./solutions/points-that-intersect-with-cars/solution.hpp) | | | | | | +| 2855. | [Minimum Right Shifts to Sort the Array](https://leetcode.com/problems/minimum-right-shifts-to-sort-the-array/) | [C++](./solutions/minimum-right-shifts-to-sort-the-array/solution.hpp) | | | | | | +| 2859. | [Sum of Values at Indices With K Set Bits](https://leetcode.com/problems/sum-of-values-at-indices-with-k-set-bits/) | [C++](./solutions/sum-of-values-at-indices-with-k-set-bits/solution.hpp) | | | | | | +| 2864. | [Maximum Odd Binary Number](https://leetcode.com/problems/maximum-odd-binary-number/) | [C++](./solutions/maximum-odd-binary-number/solution.hpp) | | | | | | +| 2869. | [Minimum Operations to Collect Elements](https://leetcode.com/problems/minimum-operations-to-collect-elements/) | [C++](./solutions/minimum-operations-to-collect-elements/solution.hpp) | | | | | | +| 2873. | [Maximum Value of an Ordered Triplet I](https://leetcode.com/problems/maximum-value-of-an-ordered-triplet-i/) | [C++](./solutions/maximum-value-of-an-ordered-triplet-i/solution.hpp) | | | | | | +| 2894. | [Divisible and Non-divisible Sums Difference](https://leetcode.com/problems/divisible-and-non-divisible-sums-difference/) | [C++](./solutions/divisible-and-non-divisible-sums-difference/solution.hpp) | | | | | | +| 2899. | [Last Visited Integers](https://leetcode.com/problems/last-visited-integers/) | [C++](./solutions/last-visited-integers/solution.hpp) | | | | | | +| 2903. | [Find Indices With Index and Value Difference I](https://leetcode.com/problems/find-indices-with-index-and-value-difference-i/) | [C++](./solutions/find-indices-with-index-and-value-difference-i/solution.hpp) | | | | | | +| 2908. | [Minimum Sum of Mountain Triplets I](https://leetcode.com/problems/minimum-sum-of-mountain-triplets-i/) | [C++](./solutions/minimum-sum-of-mountain-triplets-i/solution.hpp) | | | | | | diff --git a/leetcode.py b/leetcode.py index b846ad21..57f21919 100644 --- a/leetcode.py +++ b/leetcode.py @@ -744,14 +744,9 @@ def update_readme_table() -> None: break file.write("\n") - file.write( - "| № | Title | Solution | Difficulty | Time " "| Space | Tags | Notes |\n" - ) - file.write( - "| - | ----- | -------- | ---------- | ---- |" " ---- | ----- | ----- |\n" - ) + file.write("|№|Title|Code|Difficulty|Time|Space|Tags|Notes|\n") + file.write("|-|-----|:--:|----------|:--:|:---:|----|-----|\n") - problems.sort(key=lambda x: int(x["ID"]), reverse=True) colors = get_colors(saturation=0.6, value=0.5) for problem in problems: task_id = problem["ID"] @@ -775,7 +770,7 @@ def update_readme_table() -> None: f"| [C++](./solutions/{slug}/solution.hpp) " f"| {difficulty_badge} " f"| {time} " - f"| {space}" + f"| {space} " f"| {' '.join(tags)} " f"| {notes} |\n" ) diff --git a/res/problems.json b/res/problems.json index bdebafd6..db74f7bf 100644 --- a/res/problems.json +++ b/res/problems.json @@ -8,8 +8,8 @@ "Array", "Hash Table" ], - "Space": "", - "Time": "", + "Space": "O(n)", + "Time": "O(n)", "Notes": "" }, { @@ -22,8 +22,8 @@ "Math", "Recursion" ], - "Space": "", - "Time": "", + "Space": "O(1)", + "Time": "O(n+m)", "Notes": "" }, { @@ -36,8 +36,8 @@ "String", "Sliding Window" ], - "Space": "", - "Time": "", + "Space": "O(1)", + "Time": "O(n)", "Notes": "" }, { @@ -50,8 +50,8 @@ "Binary Search", "Divide and Conquer" ], - "Space": "", - "Time": "", + "Space": "O(1)", + "Time": "O(log min(n,m))", "Notes": "" }, { @@ -63,9 +63,9 @@ "String", "Dynamic Programming" ], - "Space": "", - "Time": "", - "Notes": "" + "Space": "O(n)", + "Time": "O(n)", + "Notes": "[Manacher Algorithm](https://cp-algorithms.com/string/manacher.html)" }, { "ID": "6", @@ -75,8 +75,8 @@ "Tags": [ "String" ], - "Space": "", - "Time": "", + "Space": "O(1)", + "Time": "O(n)", "Notes": "" }, { @@ -87,8 +87,8 @@ "Tags": [ "Math" ], - "Space": "", - "Time": "", + "Space": "O(1)", + "Time": "O(log n)", "Notes": "" }, { @@ -99,8 +99,8 @@ "Tags": [ "String" ], - "Space": "", - "Time": "", + "Space": "O(1)", + "Time": "O(n)", "Notes": "" }, { @@ -111,8 +111,8 @@ "Tags": [ "Math" ], - "Space": "", - "Time": "", + "Space": "O(log n)", + "Time": "O(log n)", "Notes": "" }, { @@ -125,8 +125,8 @@ "Dynamic Programming", "Recursion" ], - "Space": "", - "Time": "", + "Space": "O(nm)", + "Time": "O(nm)", "Notes": "" }, { @@ -139,8 +139,8 @@ "Two Pointers", "Greedy" ], - "Space": "", - "Time": "", + "Space": "O(1)", + "Time": "O(n)", "Notes": "" }, { @@ -153,8 +153,8 @@ "Math", "String" ], - "Space": "", - "Time": "", + "Space": "O(1)", + "Time": "O(1)", "Notes": "" }, { @@ -167,8 +167,8 @@ "Math", "String" ], - "Space": "", - "Time": "", + "Space": "O(1)", + "Time": "O(n)", "Notes": "" }, { @@ -180,8 +180,8 @@ "String", "Trie" ], - "Space": "", - "Time": "", + "Space": "O(1)", + "Time": "O(nm)", "Notes": "" }, { @@ -194,8 +194,8 @@ "Two Pointers", "Sorting" ], - "Space": "", - "Time": "", + "Space": "O(n)", + "Time": "O(n2)", "Notes": "" }, { @@ -208,8 +208,8 @@ "Two Pointers", "Sorting" ], - "Space": "", - "Time": "", + "Space": "O(n)", + "Time": "O(n2)", "Notes": "" }, { @@ -222,8 +222,8 @@ "String", "Backtracking" ], - "Space": "", - "Time": "", + "Space": "O(n)", + "Time": "O(4n)", "Notes": "" }, { @@ -236,8 +236,8 @@ "Two Pointers", "Sorting" ], - "Space": "", - "Time": "", + "Space": "O(n)", + "Time": "O(n3)", "Notes": "" }, { @@ -249,8 +249,8 @@ "Linked List", "Two Pointers" ], - "Space": "", - "Time": "", + "Space": "O(1)", + "Time": "O(n)", "Notes": "" }, { @@ -262,8 +262,8 @@ "String", "Stack" ], - "Space": "", - "Time": "", + "Space": "O(n)", + "Time": "O(n)", "Notes": "" }, { @@ -275,8 +275,8 @@ "Linked List", "Recursion" ], - "Space": "", - "Time": "", + "Space": "O(1)", + "Time": "O(n+m)", "Notes": "" }, { @@ -289,8 +289,8 @@ "Dynamic Programming", "Backtracking" ], - "Space": "", - "Time": "", + "Space": "O(n)", + "Time": "O(4n)", "Notes": "" }, { @@ -304,8 +304,8 @@ "Heap (Priority Queue)", "Merge Sort" ], - "Space": "", - "Time": "", + "Space": "O(k)", + "Time": "O(n log k)", "Notes": "" }, { @@ -317,8 +317,8 @@ "Linked List", "Recursion" ], - "Space": "", - "Time": "", + "Space": "O(1)", + "Time": "O(n)", "Notes": "" }, { @@ -330,8 +330,8 @@ "Linked List", "Recursion" ], - "Space": "", - "Time": "", + "Space": "O(1)", + "Time": "O(n)", "Notes": "" }, { @@ -343,8 +343,8 @@ "Array", "Two Pointers" ], - "Space": "", - "Time": "", + "Space": "O(1)", + "Time": "O(n)", "Notes": "" }, { @@ -356,8 +356,8 @@ "Array", "Two Pointers" ], - "Space": "", - "Time": "", + "Space": "O(1)", + "Time": "O(n)", "Notes": "" }, { @@ -370,9 +370,9 @@ "String", "String Matching" ], - "Space": "", - "Time": "", - "Notes": "" + "Space": "O(m)", + "Time": "O(n+m)", + "Notes": "[KMP](https://en.wikipedia.org/wiki/Knuth%E2%80%93Morris%E2%80%93Pratt_algorithm)" }, { "ID": "30", @@ -384,8 +384,8 @@ "String", "Sliding Window" ], - "Space": "", - "Time": "", + "Space": "O(mk)", + "Time": "O(nmk)", "Notes": "" }, { @@ -397,8 +397,8 @@ "Array", "Two Pointers" ], - "Space": "", - "Time": "", + "Space": "O(1)", + "Time": "O(n)", "Notes": "" }, { @@ -411,8 +411,8 @@ "Dynamic Programming", "Stack" ], - "Space": "", - "Time": "", + "Space": "O(n)", + "Time": "O(n)", "Notes": "" }, { @@ -424,8 +424,8 @@ "Array", "Binary Search" ], - "Space": "", - "Time": "", + "Space": "O(1)", + "Time": "O(log n)", "Notes": "" }, { @@ -437,8 +437,8 @@ "Array", "Binary Search" ], - "Space": "", - "Time": "", + "Space": "O(1)", + "Time": "O(log n)", "Notes": "" }, { @@ -450,8 +450,8 @@ "Array", "Binary Search" ], - "Space": "", - "Time": "", + "Space": "O(1)", + "Time": "O(log n)", "Notes": "" }, { @@ -464,8 +464,8 @@ "Hash Table", "Matrix" ], - "Space": "", - "Time": "", + "Space": "O(n)", + "Time": "O(n2)", "Notes": "" }, { @@ -479,8 +479,8 @@ "Backtracking", "Matrix" ], - "Space": "", - "Time": "", + "Space": "O(1)", + "Time": "O(n2n2)", "Notes": "" }, { @@ -491,9 +491,9 @@ "Tags": [ "String" ], - "Space": "", - "Time": "", - "Notes": "" + "Space": "O(λn)", + "Time": "O(λn)", + "Notes": "[Look&Say](https://en.wikipedia.org/wiki/Look-and-say_sequence)" }, { "ID": "39", @@ -504,8 +504,8 @@ "Array", "Backtracking" ], - "Space": "", - "Time": "", + "Space": "O(t)", + "Time": "O(nt)", "Notes": "" }, { @@ -517,8 +517,8 @@ "Array", "Backtracking" ], - "Space": "", - "Time": "", + "Space": "O(n)", + "Time": "O(2n)", "Notes": "" }, { @@ -530,8 +530,8 @@ "Array", "Hash Table" ], - "Space": "", - "Time": "", + "Space": "O(1)", + "Time": "O(n)", "Notes": "" }, { @@ -546,8 +546,8 @@ "Stack", "Monotonic Stack" ], - "Space": "", - "Time": "", + "Space": "O(1)", + "Time": "O(n)", "Notes": "" }, { @@ -560,8 +560,8 @@ "String", "Simulation" ], - "Space": "", - "Time": "", + "Space": "O(n+m)", + "Time": "O(nm)", "Notes": "" }, { @@ -575,8 +575,8 @@ "Greedy", "Recursion" ], - "Space": "", - "Time": "", + "Space": "O(nm)", + "Time": "O(nm)", "Notes": "" }, { @@ -589,8 +589,8 @@ "Dynamic Programming", "Greedy" ], - "Space": "", - "Time": "", + "Space": "O(1)", + "Time": "O(n)", "Notes": "" }, { @@ -602,8 +602,8 @@ "Array", "Backtracking" ], - "Space": "", - "Time": "", + "Space": "O(n)", + "Time": "O(n!)", "Notes": "" }, { @@ -615,8 +615,8 @@ "Array", "Backtracking" ], - "Space": "", - "Time": "", + "Space": "O(n)", + "Time": "O(n!)", "Notes": "" }, { @@ -629,8 +629,8 @@ "Math", "Matrix" ], - "Space": "", - "Time": "", + "Space": "O(1)", + "Time": "O(n2)", "Notes": "" }, { @@ -644,8 +644,8 @@ "String", "Sorting" ], - "Space": "", - "Time": "", + "Space": "O(nk)", + "Time": "O(nk log k)", "Notes": "" }, { @@ -657,8 +657,8 @@ "Math", "Recursion" ], - "Space": "", - "Time": "", + "Space": "O(1)", + "Time": "O(log n)", "Notes": "" }, { diff --git a/solutions/add-two-numbers/solution.hpp b/solutions/add-two-numbers/solution.hpp index b193625a..a819a8be 100644 --- a/solutions/add-two-numbers/solution.hpp +++ b/solutions/add-two-numbers/solution.hpp @@ -5,26 +5,22 @@ class Solution { public: static ListNode *addTwoNumbers(ListNode *l1, ListNode *l2) { - auto dummy = ListNode(); - + ListNode dummy; + auto *node = &dummy; int carry = 0; - auto node = &dummy; while (l1 || l2 || carry) { - int sum = carry; if (l1) { - sum += l1->val; + carry += l1->val; l1 = l1->next; } if (l2) { - sum += l2->val; + carry += l2->val; l2 = l2->next; } - - carry = sum / 10; - node->next = new ListNode(sum % 10); + node->next = new ListNode(carry % 10); + carry /= 10; node = node->next; } - return dummy.next; } }; diff --git a/solutions/longest-common-prefix/solution.hpp b/solutions/longest-common-prefix/solution.hpp index 45d995c2..fa9bb0db 100644 --- a/solutions/longest-common-prefix/solution.hpp +++ b/solutions/longest-common-prefix/solution.hpp @@ -6,20 +6,14 @@ class Solution { public: static std::string longestCommonPrefix(const std::vector &strs) { - size_t j = 0; - while (isEqual(j, strs)) { - ++j; - } - return strs.front().substr(0, j); - } - -private: - static bool isEqual(size_t j, const std::vector &strs) { - for (const auto &str : strs) { - if (str.size() <= j || str[j] != strs.front()[j]) { - return false; + const int n = strs.size(), m = strs[0].size(); + for (int j = 0; j < m; ++j) { + for (int i = 0; i < n; ++i) { + if (std::ssize(strs[i]) <= j || strs[i][j] != strs[0][j]) { + return strs[0].substr(0, j); + } } } - return true; + return strs[0]; } }; diff --git a/solutions/longest-palindromic-substring/solution.hpp b/solutions/longest-palindromic-substring/solution.hpp index 07f1481f..14e3acd6 100644 --- a/solutions/longest-palindromic-substring/solution.hpp +++ b/solutions/longest-palindromic-substring/solution.hpp @@ -6,17 +6,28 @@ class Solution { public: static std::string longestPalindrome(std::string s) { - std::vector> dp(s.size(), - std::vector(s.size(), false)); - std::pair sub{0, 0}; - for (size_t k = 0; k < s.size(); ++k) { - for (size_t i = 0; i < s.size() - k; ++i) { - dp[i][i + k] = (k > 1 ? dp[i + 1][i + k - 1] : true) & s[i] == s[i + k]; - if (dp[i][i + k] && k + 1 > sub.second) { - sub = {i, k + 1}; - } + std::string t = "^"; + for (auto c : s) { + t += '#', t += c; + } + t += '#', t += '$'; + + std::vector p(t.size()); + for (int i = 1, l = 1, r = 1; i < std::ssize(t) - 1; ++i) { + const int j = l + r - i; + p[i] = std::max(0, std::min(r - i, p[j])); + + while (t[i - p[i]] == t[i + p[i]]) { + ++p[i]; + } + + if (i + p[i] > r) { + l = i - p[i], r = i + p[i]; } } - return s.substr(sub.first, sub.second); + + const auto c = std::ranges::max_element(p) - p.begin(); + const auto l = (c - p[c]) / 2, r = (c + p[c]) / 2; + return s.substr(l, r - l - 1); } }; diff --git a/solutions/longest-substring-without-repeating-characters/solution.hpp b/solutions/longest-substring-without-repeating-characters/solution.hpp index eac037d0..2279b5fc 100644 --- a/solutions/longest-substring-without-repeating-characters/solution.hpp +++ b/solutions/longest-substring-without-repeating-characters/solution.hpp @@ -7,15 +7,14 @@ class Solution { public: static int lengthOfLongestSubstring(std::string s) { - std::unordered_map letters; - size_t start = 0; - size_t length = 0; - for (size_t i = 0; i < s.size(); ++i) { - if (letters.count(s[i])) { - start = std::max(start, letters[s[i]] + 1); + std::unordered_map indexes; + int length = 0; + for (int i = 0, j = 0; j < std::ssize(s); ++j) { + if (indexes.contains(s[j])) { + i = std::max(i, indexes[s[j]] + 1); } - letters[s[i]] = i; - length = std::max(length, i - start + 1); + indexes[s[j]] = j; + length = std::max(length, j - i + 1); } return length; } diff --git a/solutions/median-of-two-sorted-arrays/solution.hpp b/solutions/median-of-two-sorted-arrays/solution.hpp index 5f92af2c..7877bf39 100644 --- a/solutions/median-of-two-sorted-arrays/solution.hpp +++ b/solutions/median-of-two-sorted-arrays/solution.hpp @@ -7,28 +7,28 @@ class Solution { public: static double findMedianSortedArrays(const std::vector &nums1, const std::vector &nums2) { - const int n1 = nums1.size(), n2 = nums2.size(); - if (n1 > n2) { + const int n = nums1.size(), m = nums2.size(); + if (n > m) { return findMedianSortedArrays(nums2, nums1); } - int left = 0, right = n1; + int left = 0, right = n; while (left <= right) { const auto l1 = left + (right - left) / 2; - const auto l2 = (n1 + n2 + 1) / 2 - l1; + const auto l2 = (n + m + 1) / 2 - l1; const auto f1 = l1 ? nums1[l1 - 1] : INT_MIN; - const auto f2 = l1 < n1 ? nums1[l1] : INT_MAX; + const auto f2 = l1 < n ? nums1[l1] : INT_MAX; const auto s1 = l2 ? nums2[l2 - 1] : INT_MIN; - const auto s2 = l2 < n2 ? nums2[l2] : INT_MAX; + const auto s2 = l2 < m ? nums2[l2] : INT_MAX; if (f1 > s2) { right = l1 - 1; } else if (f2 < s1) { left = l1 + 1; } else { - if ((n1 + n2) % 2 == 0) { + if ((n + m) % 2 == 0) { return (std::max(f1, s1) + std::min(f2, s2)) * 0.5; } else { return std::max(f1, s1); diff --git a/solutions/palindrome-number/solution.hpp b/solutions/palindrome-number/solution.hpp index d859fe66..331a021d 100644 --- a/solutions/palindrome-number/solution.hpp +++ b/solutions/palindrome-number/solution.hpp @@ -1,16 +1,13 @@ #pragma once +#include #include class Solution { public: - static bool isPalindrome(int x) { - const auto str = std::to_string(x); - for (size_t i = 0; i < str.size() / 2; ++i) { - if (str[i] != str[str.size() - i - 1]) { - return false; - } - } - return true; + static bool isPalindrome(int n) { + const auto str = std::to_string(n); + return std::equal(str.cbegin(), str.cbegin() + str.size() / 2, + str.crbegin()); } }; diff --git a/solutions/palindrome-number/test.cpp b/solutions/palindrome-number/test.cpp index 1a35aaa8..ca423319 100644 --- a/solutions/palindrome-number/test.cpp +++ b/solutions/palindrome-number/test.cpp @@ -4,27 +4,27 @@ TEST_CASE("Simple") { struct TestCase { - int x; + int n; bool expected; }; std::vector test_cases{ { - .x = 121, + .n = 121, .expected = true, }, { - .x = -121, + .n = -121, .expected = false, }, { - .x = 10, + .n = 10, .expected = false, }, }; - for (const auto &[x, expected] : test_cases) { - const auto actual = Solution::isPalindrome(x); + for (const auto &[n, expected] : test_cases) { + const auto actual = Solution::isPalindrome(n); REQUIRE(expected == actual); } } diff --git a/solutions/reverse-integer/solution.hpp b/solutions/reverse-integer/solution.hpp index 9f59a3f0..6ac1f1d3 100644 --- a/solutions/reverse-integer/solution.hpp +++ b/solutions/reverse-integer/solution.hpp @@ -4,19 +4,16 @@ class Solution { public: - static int reverse(int x) { - int res = 0; - while (x) { - int d = x % 10; - if (res > INT_MAX / 10 || res == INT_MAX / 10 && d > 7) { + static int reverse(int n) { + int ans = 0; + while (n) { + const auto r = n % 10; + if (ans > INT_MAX / 10 || ans < INT_MIN / 10) { return 0; } - if (res < INT_MIN / 10 || res == INT_MIN / 10 && d < -8) { - return 0; - } - res = res * 10 + d; - x /= 10; + ans = ans * 10 + r; + n /= 10; } - return res; + return ans; } }; diff --git a/solutions/reverse-integer/test.cpp b/solutions/reverse-integer/test.cpp index 85dde1cf..048fe898 100644 --- a/solutions/reverse-integer/test.cpp +++ b/solutions/reverse-integer/test.cpp @@ -4,27 +4,27 @@ TEST_CASE("Simple") { struct TestCase { - int x; + int n; int expected; }; std::vector test_cases{ { - .x = 123, + .n = 123, .expected = 321, }, { - .x = -123, + .n = -123, .expected = -321, }, { - .x = 120, + .n = 120, .expected = 21, }, }; - for (const auto &[x, expected] : test_cases) { - const auto actual = Solution::reverse(x); + for (const auto &[n, expected] : test_cases) { + const auto actual = Solution::reverse(n); REQUIRE(expected == actual); } } diff --git a/solutions/two-sum/solution.hpp b/solutions/two-sum/solution.hpp index 752b97ed..ce1a1e28 100644 --- a/solutions/two-sum/solution.hpp +++ b/solutions/two-sum/solution.hpp @@ -6,15 +6,13 @@ class Solution { public: static std::vector twoSum(const std::vector &nums, int target) { - std::unordered_map table; - int size = nums.size(); - for (int i = 0; i < size; ++i) { - if (auto it = table.find(nums[i]); it != table.end()) { - return {it->second, i}; + std::unordered_map map; + for (int i = 0; i < std::ssize(nums); ++i) { + if (map.contains(nums[i])) { + return {map[nums[i]], i}; } - table[target - nums[i]] = i; + map[target - nums[i]] = i; } - return {}; } }; diff --git a/solutions/valid-sudoku/solution.hpp b/solutions/valid-sudoku/solution.hpp index 052db042..99fe9da4 100644 --- a/solutions/valid-sudoku/solution.hpp +++ b/solutions/valid-sudoku/solution.hpp @@ -5,19 +5,19 @@ #include class Solution { - static const size_t SUDOKU_SIZE = 9; - static const char EMPTY = '.'; + static const size_t kSize = 9; + static const char kEmpty = '.'; public: static bool isValidSudoku(const std::vector> &board) { - std::array, SUDOKU_SIZE> rows; - std::array, SUDOKU_SIZE> cols; - std::array, SUDOKU_SIZE> boxes; + std::array, kSize> rows; + std::array, kSize> cols; + std::array, kSize> boxes; - for (size_t i = 0; i < SUDOKU_SIZE; ++i) { - for (size_t j = 0; j < SUDOKU_SIZE; ++j) { + for (size_t i = 0; i < kSize; ++i) { + for (size_t j = 0; j < kSize; ++j) { const auto c = board[i][j]; - if (c == EMPTY) { + if (c == kEmpty) { continue; } diff --git a/solutions/zigzag-conversion/solution.hpp b/solutions/zigzag-conversion/solution.hpp index ddeb2c70..49c06a3d 100644 --- a/solutions/zigzag-conversion/solution.hpp +++ b/solutions/zigzag-conversion/solution.hpp @@ -5,21 +5,21 @@ class Solution { public: - static std::string convert(std::string s, int num_rows) { - std::vector> rows(num_rows); - int i = 0, d = num_rows == 1 ? 0 : -1; - for (auto c : s) { - rows[i].push_back(c); - if (i == 0 || i == num_rows - 1) { - d *= -1; - } - i += d; + static std::string convert(std::string s, int numRows) { + if (numRows == 1 || numRows >= std::ssize(s)) { + return s; } std::string ans; - for (const auto &row : rows) { - for (auto c : row) { - ans += c; + for (int i = 0, step = 2 * numRows - 2; i < numRows; ++i) { + for (int j = i; j < std::ssize(s); j += step) { + ans.push_back(s[j]); + if (i != 0 && i != numRows - 1) { + const auto k = j + step - 2 * i; + if (k < std::ssize(s)) { + ans.push_back(s[k]); + } + } } } return ans;