├── 0502-ipo └── NOTES.md ├── 0001-two-sum ├── NOTES.md └── 0001-two-sum.cpp ├── 0078-subsets ├── NOTES.md └── 0078-subsets.cpp ├── 1-two-sum ├── NOTES.md └── 1-two-sum.cpp ├── 112-path-sum └── NOTES.md ├── 135-candy ├── NOTES.md └── 135-candy.cpp ├── 2620-counter ├── NOTES.md └── 2620-counter.js ├── 458-poor-pigs ├── NOTES.md └── 458-poor-pigs.cpp ├── 542-01-matrix └── NOTES.md ├── 78-subsets └── NOTES.md ├── 90-subsets-ii └── NOTES.md ├── 0038-count-and-say └── NOTES.md ├── 0046-permutations └── NOTES.md ├── 0054-spiral-matrix └── NOTES.md ├── 0055-jump-game ├── NOTES.md └── 0055-jump-game.cpp ├── 0071-simplify-path └── NOTES.md ├── 0072-edit-distance └── NOTES.md ├── 0075-sort-colors └── NOTES.md ├── 0077-combinations └── NOTES.md ├── 0079-word-search └── NOTES.md ├── 0091-decode-ways └── NOTES.md ├── 0100-same-tree └── NOTES.md ├── 0139-word-break └── NOTES.md ├── 0140-word-break-ii └── NOTES.md ├── 0146-lru-cache └── NOTES.md ├── 0174-dungeon-game └── NOTES.md ├── 0189-rotate-array ├── NOTES.md └── 0189-rotate-array.cpp ├── 0198-house-robber ├── NOTES.md └── 0198-house-robber.cpp ├── 0231-power-of-two ├── NOTES.md └── 0231-power-of-two.cpp ├── 0242-valid-anagram ├── NOTES.md └── 0242-valid-anagram.cpp ├── 0258-add-digits ├── NOTES.md └── 0258-add-digits.cpp ├── 0319-bulb-switcher ├── NOTES.md └── 0319-bulb-switcher.cpp ├── 0338-counting-bits ├── NOTES.md └── 0338-counting-bits.cpp ├── 0342-power-of-four ├── NOTES.md └── 0342-power-of-four.cpp ├── 0401-binary-watch └── NOTES.md ├── 0403-frog-jump └── NOTES.md ├── 0456-132-pattern ├── NOTES.md └── 0456-132-pattern.cpp ├── 0458-poor-pigs ├── NOTES.md └── 0458-poor-pigs.cpp ├── 0460-lfu-cache └── NOTES.md ├── 0542-01-matrix └── NOTES.md ├── 0645-set-mismatch └── NOTES.md ├── 0648-replace-words └── NOTES.md ├── 0649-dota2-senate └── NOTES.md ├── 0704-binary-search ├── NOTES.md └── 0704-binary-search.cpp ├── 0729-my-calendar-i └── NOTES.md ├── 0835-image-overlap └── NOTES.md ├── 0837-new-21-game └── NOTES.md ├── 0859-buddy-strings └── NOTES.md ├── 0899-orderly-queue ├── NOTES.md └── 0899-orderly-queue.cpp ├── 0912-sort-an-array └── NOTES.md ├── 0935-knight-dialer └── NOTES.md ├── 0948-bag-of-tokens └── NOTES.md ├── 101-symmetric-tree └── NOTES.md ├── 1094-car-pooling └── NOTES.md ├── 113-path-sum-ii └── NOTES.md ├── 1140-stone-game-ii └── NOTES.md ├── 1260-shift-2d-grid └── NOTES.md ├── 1518-water-bottles ├── NOTES.md └── 1518-water-bottles.cpp ├── 16-3sum-closest └── NOTES.md ├── 2665-counter-ii └── NOTES.md ├── 326-power-of-three ├── NOTES.md └── 326-power-of-three.cpp ├── 342-power-of-four ├── NOTES.md └── 342-power-of-four.cpp ├── 456-132-pattern └── NOTES.md ├── 48-rotate-image ├── NOTES.md └── 48-rotate-image.cpp ├── 595-big-countries └── NOTES.md ├── 62-unique-paths └── NOTES.md ├── 704-binary-search ├── NOTES.md └── 704-binary-search.cpp ├── 729-my-calendar-i └── NOTES.md ├── 733-flood-fill └── NOTES.md ├── 838-push-dominoes └── NOTES.md ├── 91-decode-ways └── NOTES.md ├── 916-word-subsets └── NOTES.md ├── 948-bag-of-tokens └── NOTES.md ├── 0020-valid-parentheses └── NOTES.md ├── 0040-combination-sum-ii └── NOTES.md ├── 0044-wildcard-matching └── NOTES.md ├── 0049-group-anagrams └── NOTES.md ├── 0057-insert-interval └── NOTES.md ├── 0059-spiral-matrix-ii └── NOTES.md ├── 0064-minimum-path-sum └── NOTES.md ├── 0068-text-justification └── NOTES.md ├── 0070-climbing-stairs ├── NOTES.md └── 0070-climbing-stairs.cpp ├── 0074-search-a-2d-matrix └── NOTES.md ├── 0085-maximal-rectangle └── NOTES.md ├── 0086-partition-list └── NOTES.md ├── 0087-scramble-string └── NOTES.md ├── 0101-symmetric-tree └── NOTES.md ├── 0137-single-number-ii ├── NOTES.md └── 0137-single-number-ii.cpp ├── 0141-linked-list-cycle └── NOTES.md ├── 0169-majority-element ├── NOTES.md └── 0169-majority-element.cpp ├── 0191-number-of-1-bits ├── NOTES.md └── 0191-number-of-1-bits.cpp ├── 0200-number-of-islands └── NOTES.md ├── 0205-isomorphic-strings └── NOTES.md ├── 0207-course-schedule └── NOTES.md ├── 0217-contains-duplicate ├── NOTES.md └── 0217-contains-duplicate.cpp ├── 0223-rectangle-area └── NOTES.md ├── 0224-basic-calculator └── NOTES.md ├── 0228-summary-ranges └── NOTES.md ├── 0257-binary-tree-paths └── NOTES.md ├── 0279-perfect-squares └── NOTES.md ├── 0312-burst-balloons └── NOTES.md ├── 0409-longest-palindrome └── NOTES.md ├── 0413-arithmetic-slices └── NOTES.md ├── 0443-string-compression └── NOTES.md ├── 0445-add-two-numbers-ii └── NOTES.md ├── 0463-island-perimeter └── NOTES.md ├── 0472-concatenated-words └── NOTES.md ├── 0486-predict-the-winner └── NOTES.md ├── 0506-relative-ranks └── NOTES.md ├── 0518-coin-change-ii └── NOTES.md ├── 0520-detect-capital └── NOTES.md ├── 0525-contiguous-array └── NOTES.md ├── 0605-can-place-flowers ├── NOTES.md └── 0605-can-place-flowers.cpp ├── 0621-task-scheduler ├── NOTES.md └── 0621-task-scheduler.cpp ├── 0650-2-keys-keyboard ├── NOTES.md └── 0650-2-keys-keyboard.cpp ├── 0661-image-smoother └── NOTES.md ├── 0705-design-hashset └── NOTES.md ├── 0706-design-hashmap └── NOTES.md ├── 0731-my-calendar-ii └── NOTES.md ├── 0735-asteroid-collision └── NOTES.md ├── 0739-daily-temperatures └── NOTES.md ├── 0766-toeplitz-matrix ├── NOTES.md └── 0766-toeplitz-matrix.cpp ├── 0767-reorganize-string └── NOTES.md ├── 0785-is-graph-bipartite └── NOTES.md ├── 0791-custom-sort-string └── NOTES.md ├── 0846-hand-of-straights └── NOTES.md ├── 0867-transpose-matrix ├── NOTES.md └── 0867-transpose-matrix.cpp ├── 0872-leaf-similar-trees └── NOTES.md ├── 0896-monotonic-array ├── NOTES.md └── 0896-monotonic-array.cpp ├── 0901-online-stock-span └── NOTES.md ├── 0904-fruit-into-baskets └── NOTES.md ├── 0909-snakes-and-ladders └── NOTES.md ├── 0934-shortest-bridge └── NOTES.md ├── 0938-range-sum-of-bst └── NOTES.md ├── 0942-di-string-match ├── NOTES.md └── 0942-di-string-match.cpp ├── 0980-unique-paths-iii └── NOTES.md ├── 1020-number-of-enclaves └── NOTES.md ├── 1035-uncrossed-lines └── NOTES.md ├── 1046-last-stone-weight ├── NOTES.md └── 1046-last-stone-weight.cpp ├── 1148-article-views-i ├── NOTES.md └── 1148-article-views-i.sql ├── 13-roman-to-integer └── NOTES.md ├── 1323-maximum-69-number ├── NOTES.md └── 1323-maximum-69-number.cpp ├── 1328-break-a-palindrome └── NOTES.md ├── 1402-reducing-dishes └── NOTES.md ├── 1416-restore-the-array └── NOTES.md ├── 1436-destination-city ├── NOTES.md └── 1436-destination-city.cpp ├── 1463-cherry-pickup-ii └── NOTES.md ├── 1473-paint-house-iii └── NOTES.md ├── 1683-invalid-tweets ├── NOTES.md └── 1683-invalid-tweets.sql ├── 1720-decode-xored-array ├── NOTES.md └── 1720-decode-xored-array.cpp ├── 175-combine-two-tables └── NOTES.md ├── 1766-tree-of-coprimes └── NOTES.md ├── 182-duplicate-emails ├── NOTES.md └── 182-duplicate-emails.sql ├── 1905-count-sub-islands └── NOTES.md ├── 200-number-of-islands └── NOTES.md ├── 226-invert-binary-tree └── NOTES.md ├── 2706-buy-two-chocolates ├── NOTES.md └── 2706-buy-two-chocolates.cpp ├── 2742-painting-the-walls └── NOTES.md ├── 2751-robot-collisions └── NOTES.md ├── 3133-minimum-array-end ├── NOTES.md └── 3133-minimum-array-end.cpp ├── 327-count-of-range-sum └── NOTES.md ├── 336-palindrome-pairs └── NOTES.md ├── 399-evaluate-division └── NOTES.md ├── 409-longest-palindrome └── NOTES.md ├── 42-trapping-rain-water └── NOTES.md ├── 43-multiply-strings └── NOTES.md ├── 547-number-of-provinces └── NOTES.md ├── 623-add-one-row-to-tree └── NOTES.md ├── 695-max-area-of-island └── NOTES.md ├── 732-my-calendar-iii └── NOTES.md ├── 858-mirror-reflection └── NOTES.md ├── 867-transpose-matrix ├── NOTES.md └── 867-transpose-matrix.cpp ├── 0023-merge-k-sorted-lists └── NOTES.md ├── 0024-swap-nodes-in-pairs └── NOTES.md ├── 0035-search-insert-position ├── NOTES.md └── 0035-search-insert-position.cpp ├── 0041-first-missing-positive ├── NOTES.md └── 0041-first-missing-positive.cpp ├── 0042-trapping-rain-water └── NOTES.md ├── 0058-length-of-last-word ├── NOTES.md └── 0058-length-of-last-word.cpp ├── 0093-restore-ip-addresses └── NOTES.md ├── 0097-interleaving-string └── NOTES.md ├── 0110-balanced-binary-tree └── NOTES.md ├── 0119-pascals-triangle-ii ├── NOTES.md └── 0119-pascals-triangle-ii.cpp ├── 0131-palindrome-partitioning └── NOTES.md ├── 0165-compare-version-numbers └── NOTES.md ├── 0214-shortest-palindrome └── NOTES.md ├── 0219-contains-duplicate-ii └── NOTES.md ├── 0229-majority-element-ii └── NOTES.md ├── 0234-palindrome-linked-list └── NOTES.md ├── 0239-sliding-window-maximum └── NOTES.md ├── 0240-search-a-2d-matrix-ii └── NOTES.md ├── 0310-minimum-height-trees └── NOTES.md ├── 0328-odd-even-linked-list └── NOTES.md ├── 0332-reconstruct-itinerary └── NOTES.md ├── 0347-top-k-frequent-elements └── NOTES.md ├── 0382-linked-list-random-node └── NOTES.md ├── 0389-find-the-difference ├── NOTES.md └── 0389-find-the-difference.cpp ├── 0410-split-array-largest-sum └── NOTES.md ├── 0427-construct-quad-tree └── NOTES.md ├── 0477-total-hamming-distance ├── NOTES.md └── 0477-total-hamming-distance.cpp ├── 0523-continuous-subarray-sum └── NOTES.md ├── 0526-beautiful-arrangement └── NOTES.md ├── 0560-subarray-sum-equals-k ├── NOTES.md └── 0560-subarray-sum-equals-k.cpp ├── 0576-out-of-boundary-paths └── NOTES.md ├── 0584-find-customer-referee ├── NOTES.md └── 0584-find-customer-referee.sql ├── 0623-add-one-row-to-tree └── NOTES.md ├── 0629-k-inverse-pairs-array └── NOTES.md ├── 0633-sum-of-square-numbers └── NOTES.md ├── 0647-palindromic-substrings └── NOTES.md ├── 0652-find-duplicate-subtrees └── NOTES.md ├── 0692-top-k-frequent-words └── NOTES.md ├── 0779-k-th-symbol-in-grammar ├── NOTES.md └── 0779-k-th-symbol-in-grammar.cpp ├── 0784-letter-case-permutation └── NOTES.md ├── 0839-similar-string-groups └── NOTES.md ├── 0875-koko-eating-bananas └── NOTES.md ├── 0880-decoded-string-at-index └── NOTES.md ├── 0881-boats-to-save-people └── NOTES.md ├── 0965-univalued-binary-tree └── NOTES.md ├── 0997-find-the-town-judge └── NOTES.md ├── 1002-find-common-characters ├── NOTES.md └── 1002-find-common-characters.py ├── 1048-longest-string-chain └── NOTES.md ├── 1049-last-stone-weight-ii └── NOTES.md ├── 1052-grumpy-bookstore-owner └── NOTES.md ├── 1095-find-in-mountain-array └── NOTES.md ├── 1122-relative-sort-array └── NOTES.md ├── 1137-n-th-tribonacci-number ├── NOTES.md └── 1137-n-th-tribonacci-number.cpp ├── 1219-path-with-maximum-gold └── NOTES.md ├── 1395-count-number-of-teams └── NOTES.md ├── 14-longest-common-prefix └── NOTES.md ├── 1405-longest-happy-string └── NOTES.md ├── 1424-diagonal-traverse-ii └── NOTES.md ├── 1472-design-browser-history └── NOTES.md ├── 1480-running-sum-of-1d-array ├── NOTES.md └── 1480-running-sum-of-1d-array.cpp ├── 1512-number-of-good-pairs ├── NOTES.md └── 1512-number-of-good-pairs.cpp ├── 1529-minimum-suffix-flips └── NOTES.md ├── 1531-string-compression-ii └── NOTES.md ├── 1544-make-the-string-great └── NOTES.md ├── 1550-three-consecutive-odds ├── NOTES.md └── 1550-three-consecutive-odds.cpp ├── 1572-matrix-diagonal-sum ├── NOTES.md └── 1572-matrix-diagonal-sum.cpp ├── 1603-design-parking-system └── NOTES.md ├── 1615-maximal-network-rank └── NOTES.md ├── 1630-arithmetic-subarrays └── NOTES.md ├── 1763-longest-nice-substring └── NOTES.md ├── 1813-sentence-similarity-iii └── NOTES.md ├── 1833-maximum-ice-cream-bars ├── NOTES.md └── 1833-maximum-ice-cream-bars.cpp ├── 1834-single-threaded-cpu └── NOTES.md ├── 1929-concatenation-of-array ├── NOTES.md └── 1929-concatenation-of-array.cpp ├── 196-delete-duplicate-emails ├── NOTES.md └── 196-delete-duplicate-emails.sql ├── 2050-parallel-courses-iii └── NOTES.md ├── 2104-sum-of-subarray-ranges └── NOTES.md ├── 219-contains-duplicate-ii └── NOTES.md ├── 234-palindrome-linked-list └── NOTES.md ├── 2421-number-of-good-paths └── NOTES.md ├── 2485-find-the-pivot-integer ├── NOTES.md └── 2485-find-the-pivot-integer.cpp ├── 2551-put-marbles-in-bags └── NOTES.md ├── 2629-function-composition └── NOTES.md ├── 2785-sort-vowels-in-a-string └── NOTES.md ├── 307-range-sum-query-mutable └── NOTES.md ├── 473-matchsticks-to-square └── NOTES.md ├── 511-game-play-analysis-i └── NOTES.md ├── 584-find-customer-referee └── NOTES.md ├── 622-design-circular-queue └── NOTES.md ├── 629-k-inverse-pairs-array └── NOTES.md ├── 658-find-k-closest-elements └── NOTES.md ├── 794-valid-tic-tac-toe-state └── NOTES.md ├── 804-unique-morse-code-words └── NOTES.md ├── 869-reordered-power-of-2 ├── NOTES.md └── 869-reordered-power-of-2.cpp ├── 890-find-and-replace-pattern └── NOTES.md ├── 936-stamping-the-sequence └── NOTES.md ├── 0004-median-of-two-sorted-arrays └── NOTES.md ├── 0032-longest-valid-parentheses └── NOTES.md ├── 0076-minimum-window-substring └── NOTES.md ├── 0111-minimum-depth-of-binary-tree └── NOTES.md ├── 0124-binary-tree-maximum-path-sum └── NOTES.md ├── 0129-sum-root-to-leaf-numbers └── NOTES.md ├── 0151-reverse-words-in-a-string └── NOTES.md ├── 0168-excel-sheet-column-title ├── NOTES.md └── 0168-excel-sheet-column-title.cpp ├── 0208-implement-trie-prefix-tree └── NOTES.md ├── 0209-minimum-size-subarray-sum └── NOTES.md ├── 0222-count-complete-tree-nodes └── NOTES.md ├── 0225-implement-stack-using-queues └── NOTES.md ├── 0232-implement-queue-using-stacks └── NOTES.md ├── 0237-delete-node-in-a-linked-list ├── NOTES.md └── 0237-delete-node-in-a-linked-list.cpp ├── 0238-product-of-array-except-self └── NOTES.md ├── 0287-find-the-duplicate-number ├── NOTES.md └── 0287-find-the-duplicate-number.cpp ├── 0295-find-median-from-data-stream └── NOTES.md ├── 0316-remove-duplicate-letters └── NOTES.md ├── 0341-flatten-nested-list-iterator └── NOTES.md ├── 0345-reverse-vowels-of-a-string └── NOTES.md ├── 0368-largest-divisible-subset └── NOTES.md ├── 0374-guess-number-higher-or-lower └── NOTES.md ├── 0380-insert-delete-getrandom-o1 └── NOTES.md ├── 0435-non-overlapping-intervals └── NOTES.md ├── 0451-sort-characters-by-frequency └── NOTES.md ├── 0459-repeated-substring-pattern ├── NOTES.md └── 0459-repeated-substring-pattern.cpp ├── 0491-non-decreasing-subsequences └── NOTES.md ├── 0513-find-bottom-left-tree-value └── NOTES.md ├── 0552-student-attendance-record-ii └── NOTES.md ├── 0559-maximum-depth-of-n-ary-tree └── NOTES.md ├── 0564-find-the-closest-palindrome └── NOTES.md ├── 0643-maximum-average-subarray-i └── NOTES.md ├── 0662-maximum-width-of-binary-tree └── NOTES.md ├── 0713-subarray-product-less-than-k └── NOTES.md ├── 0725-split-linked-list-in-parts └── NOTES.md ├── 0746-min-cost-climbing-stairs └── NOTES.md ├── 0786-k-th-smallest-prime-fraction └── NOTES.md ├── 0802-find-eventual-safe-states └── NOTES.md ├── 0823-binary-trees-with-factors └── NOTES.md ├── 0826-most-profit-assigning-work └── NOTES.md ├── 0834-sum-of-distances-in-tree └── NOTES.md ├── 0844-backspace-string-compare └── NOTES.md ├── 0876-middle-of-the-linked-list └── NOTES.md ├── 0907-sum-of-subarray-minimums └── NOTES.md ├── 0930-binary-subarrays-with-sum └── NOTES.md ├── 0931-minimum-falling-path-sum └── NOTES.md ├── 0946-validate-stack-sequences └── NOTES.md ├── 0974-subarray-sums-divisible-by-k ├── NOTES.md └── 0974-subarray-sums-divisible-by-k.cpp ├── 0976-largest-perimeter-triangle └── NOTES.md ├── 0977-squares-of-a-sorted-array └── NOTES.md ├── 0983-minimum-cost-for-tickets └── NOTES.md ├── 1004-max-consecutive-ones-iii └── NOTES.md ├── 1079-letter-tile-possibilities └── NOTES.md ├── 1105-filling-bookcase-shelves └── NOTES.md ├── 1125-smallest-sufficient-team └── NOTES.md ├── 1143-longest-common-subsequence └── NOTES.md ├── 1145-binary-tree-coloring-game └── NOTES.md ├── 1207-unique-number-of-occurrences ├── NOTES.md └── 1207-unique-number-of-occurrences.cpp ├── 1220-count-vowels-permutation └── NOTES.md ├── 1254-number-of-closed-islands └── NOTES.md ├── 128-longest-consecutive-sequence └── NOTES.md ├── 1289-minimum-falling-path-sum-ii └── NOTES.md ├── 1329-sort-the-matrix-diagonally └── NOTES.md ├── 1382-balance-a-binary-search-tree └── NOTES.md ├── 1396-design-underground-system └── NOTES.md ├── 1425-constrained-subsequence-sum └── NOTES.md ├── 1539-kth-missing-positive-number └── NOTES.md ├── 1547-minimum-cost-to-cut-a-stick └── NOTES.md ├── 1675-minimize-deviation-in-array └── NOTES.md ├── 1679-max-number-of-k-sum-pairs └── NOTES.md ├── 1706-where-will-the-ball-fall └── NOTES.md ├── 1732-find-the-highest-altitude ├── NOTES.md └── 1732-find-the-highest-altitude.cpp ├── 1768-merge-strings-alternately └── NOTES.md ├── 1791-find-center-of-star-graph └── NOTES.md ├── 1829-maximum-xor-for-each-query └── NOTES.md ├── 183-customers-who-never-order └── NOTES.md ├── 1845-seat-reservation-manager └── NOTES.md ├── 1863-sum-of-all-subset-xor-totals └── NOTES.md ├── 1903-largest-odd-number-in-string ├── NOTES.md └── 1903-largest-odd-number-in-string.cpp ├── 1971-find-if-path-exists-in-graph └── NOTES.md ├── 1980-find-unique-binary-string ├── NOTES.md └── 1980-find-unique-binary-string.cpp ├── 199-binary-tree-right-side-view └── NOTES.md ├── 209-minimum-size-subarray-sum └── NOTES.md ├── 2090-k-radius-subarray-averages └── NOTES.md ├── 2092-find-all-people-with-secret └── NOTES.md ├── 2101-detonate-the-maximum-bombs └── NOTES.md ├── 2181-merge-nodes-in-between-zeros └── NOTES.md ├── 2256-minimum-average-difference └── NOTES.md ├── 2304-minimum-path-cost-in-a-grid └── NOTES.md ├── 2305-fair-distribution-of-cookies └── NOTES.md ├── 2317-maximum-xor-after-operations └── NOTES.md ├── 2331-evaluate-boolean-binary-tree └── NOTES.md ├── 2352-equal-row-and-column-pairs └── NOTES.md ├── 2360-longest-cycle-in-a-graph └── NOTES.md ├── 2370-longest-ideal-subsequence ├── NOTES.md └── 2370-longest-ideal-subsequence.cpp ├── 238-product-of-array-except-self └── NOTES.md ├── 2390-removing-stars-from-a-string ├── NOTES.md └── 2390-removing-stars-from-a-string.cpp ├── 2405-optimal-partition-of-string ├── NOTES.md └── 2405-optimal-partition-of-string.cpp ├── 2439-minimize-maximum-of-array └── NOTES.md ├── 2462-total-cost-to-hire-k-workers └── NOTES.md ├── 2483-minimum-penalty-for-a-shop ├── NOTES.md └── 2483-minimum-penalty-for-a-shop.cpp ├── 2542-maximum-subsequence-score └── NOTES.md ├── 2626-array-reduce-transformation ├── NOTES.md └── 2626-array-reduce-transformation.js ├── 2634-filter-elements-from-array ├── NOTES.md └── 2634-filter-elements-from-array.js ├── 2641-cousins-in-binary-tree-ii └── NOTES.md ├── 2667-create-hello-world-function ├── NOTES.md └── 2667-create-hello-world-function.js ├── 2678-number-of-senior-citizens ├── NOTES.md └── 2678-number-of-senior-citizens.cpp ├── 2707-extra-characters-in-a-string └── NOTES.md ├── 2748-number-of-beautiful-pairs └── NOTES.md ├── 2864-maximum-odd-binary-number ├── NOTES.md └── 2864-maximum-odd-binary-number.cpp ├── 3011-find-if-array-can-be-sorted └── NOTES.md ├── 33-search-in-rotated-sorted-array └── NOTES.md ├── 374-guess-number-higher-or-lower └── NOTES.md ├── 417-pacific-atlantic-water-flow └── NOTES.md ├── 5-longest-palindromic-substring └── NOTES.md ├── 557-reverse-words-in-a-string-iii └── NOTES.md ├── 596-classes-more-than-5-students ├── NOTES.md └── 596-classes-more-than-5-students.sql ├── 653-two-sum-iv-input-is-a-bst └── NOTES.md ├── 713-subarray-product-less-than-k └── NOTES.md ├── 802-find-eventual-safe-states └── NOTES.md ├── 823-binary-trees-with-factors └── NOTES.md ├── 825-friends-of-appropriate-ages └── NOTES.md ├── 98-validate-binary-search-tree └── NOTES.md ├── 981-time-based-key-value-store └── NOTES.md ├── 0005-longest-palindromic-substring └── NOTES.md ├── 0019-remove-nth-node-from-end-of-list └── NOTES.md ├── 0033-search-in-rotated-sorted-array └── NOTES.md ├── 0121-best-time-to-buy-and-sell-stock └── NOTES.md ├── 0138-copy-list-with-random-pointer └── NOTES.md ├── 0145-binary-tree-postorder-traversal └── NOTES.md ├── 0150-evaluate-reverse-polish-notation └── NOTES.md ├── 0215-kth-largest-element-in-an-array ├── NOTES.md └── 0215-kth-largest-element-in-an-array.cpp ├── 0241-different-ways-to-add-parentheses └── NOTES.md ├── 0334-increasing-triplet-subsequence └── NOTES.md ├── 0352-data-stream-as-disjoint-intervals └── NOTES.md ├── 0373-find-k-pairs-with-smallest-sums └── NOTES.md ├── 0405-convert-a-number-to-hexadecimal ├── NOTES.md └── 0405-convert-a-number-to-hexadecimal.cpp ├── 0442-find-all-duplicates-in-an-array └── NOTES.md ├── 0446-arithmetic-slices-ii-subsequence └── NOTES.md ├── 0501-find-mode-in-binary-search-tree └── NOTES.md ├── 0516-longest-palindromic-subsequence └── NOTES.md ├── 0557-reverse-words-in-a-string-iii └── NOTES.md ├── 0583-delete-operation-for-two-strings └── NOTES.md ├── 0589-n-ary-tree-preorder-traversal └── NOTES.md ├── 0590-n-ary-tree-postorder-traversal └── NOTES.md ├── 0688-knight-probability-in-chessboard └── NOTES.md ├── 0698-partition-to-k-equal-sum-subsets └── NOTES.md ├── 0701-insert-into-a-binary-search-tree └── NOTES.md ├── 0703-kth-largest-element-in-a-stream └── NOTES.md ├── 0797-all-paths-from-source-to-target └── NOTES.md ├── 0857-minimum-cost-to-hire-k-workers └── NOTES.md ├── 0864-shortest-path-to-get-all-keys └── NOTES.md ├── 0884-uncommon-words-from-two-sentences └── NOTES.md ├── 0950-reveal-cards-in-increasing-order └── NOTES.md ├── 0979-distribute-coins-in-binary-tree └── NOTES.md ├── 102-binary-tree-level-order-traversal └── NOTES.md ├── 1027-longest-arithmetic-subsequence └── NOTES.md ├── 1043-partition-array-for-maximum-sum └── NOTES.md ├── 1091-shortest-path-in-binary-matrix └── NOTES.md ├── 1110-delete-nodes-and-return-forest └── NOTES.md ├── 1124-longest-well-performing-interval └── NOTES.md ├── 114-flatten-binary-tree-to-linked-list └── NOTES.md ├── 1232-check-if-it-is-a-straight-line └── NOTES.md ├── 1248-count-number-of-nice-subarrays └── NOTES.md ├── 1338-reduce-array-size-to-the-half └── NOTES.md ├── 1352-product-of-the-last-k-numbers └── NOTES.md ├── 1383-maximum-performance-of-a-team └── NOTES.md ├── 1387-sort-integers-by-the-power-value └── NOTES.md ├── 144-binary-tree-preorder-traversal └── NOTES.md ├── 1444-number-of-ways-of-cutting-a-pizza └── NOTES.md ├── 1448-count-good-nodes-in-binary-tree └── NOTES.md ├── 1451-rearrange-words-in-a-sentence └── NOTES.md ├── 1514-path-with-maximum-probability └── NOTES.md ├── 1535-find-the-winner-of-an-array-game └── NOTES.md ├── 1584-min-cost-to-connect-all-points └── NOTES.md ├── 1627-graph-connectivity-with-threshold └── NOTES.md ├── 1642-furthest-building-you-can-reach └── NOTES.md ├── 1669-merge-in-between-linked-lists └── NOTES.md ├── 1688-count-of-matches-in-tournament ├── NOTES.md └── 1688-count-of-matches-in-tournament.cpp ├── 1716-calculate-money-in-leetcode-bank ├── NOTES.md └── 1716-calculate-money-in-leetcode-bank.cpp ├── 1721-swapping-nodes-in-a-linked-list └── NOTES.md ├── 1757-recyclable-and-low-fat-products ├── NOTES.md └── 1757-recyclable-and-low-fat-products.sql ├── 1760-minimum-limit-of-balls-in-a-bag └── NOTES.md ├── 1793-maximum-score-of-a-good-subarray └── NOTES.md ├── 1797-design-authentication-manager └── NOTES.md ├── 1822-sign-of-the-product-of-an-array ├── NOTES.md └── 1822-sign-of-the-product-of-an-array.cpp ├── 1832-check-if-the-sentence-is-pangram ├── NOTES.md └── 1832-check-if-the-sentence-is-pangram.cpp ├── 1884-egg-drop-with-2-eggs-and-n-floors └── NOTES.md ├── 19-remove-nth-node-from-end-of-list └── NOTES.md ├── 1915-number-of-wonderful-substrings └── NOTES.md ├── 2053-kth-distinct-string-in-an-array ├── NOTES.md └── 2053-kth-distinct-string-in-an-array.cpp ├── 2100-find-good-days-to-rob-the-bank └── NOTES.md ├── 2125-number-of-laser-beams-in-a-bank └── NOTES.md ├── 2140-solving-questions-with-brainpower └── NOTES.md ├── 2187-minimum-time-to-complete-trips └── NOTES.md ├── 2206-divide-array-into-equal-pairs ├── NOTES.md └── 2206-divide-array-into-equal-pairs.cpp ├── 2215-find-the-difference-of-two-arrays └── NOTES.md ├── 2251-number-of-flowers-in-full-bloom └── NOTES.md ├── 2255-count-prefixes-of-a-given-string └── NOTES.md ├── 2285-maximum-total-importance-of-roads └── NOTES.md ├── 2336-smallest-number-in-infinite-set └── NOTES.md ├── 2348-number-of-zero-filled-subarrays ├── NOTES.md └── 2348-number-of-zero-filled-subarrays.cpp ├── 2415-reverse-odd-levels-of-binary-tree └── NOTES.md ├── 2416-sum-of-prefix-scores-of-strings └── NOTES.md ├── 2444-count-subarrays-with-fixed-bounds └── NOTES.md ├── 2448-minimum-cost-to-make-array-equal └── NOTES.md ├── 2463-minimum-total-distance-traveled └── NOTES.md ├── 2487-remove-nodes-from-linked-list └── NOTES.md ├── 2597-the-number-of-beautiful-subsets └── NOTES.md ├── 2709-greatest-common-divisor-traversal └── NOTES.md ├── 2938-separate-black-and-white-balls └── NOTES.md ├── 300-longest-increasing-subsequence └── NOTES.md ├── 318-maximum-product-of-word-lengths └── NOTES.md ├── 387-first-unique-character-in-a-string └── NOTES.md ├── 406-queue-reconstruction-by-height └── NOTES.md ├── 429-n-ary-tree-level-order-traversal └── NOTES.md ├── 606-construct-string-from-binary-tree └── NOTES.md ├── 637-average-of-levels-in-binary-tree └── NOTES.md ├── 792-number-of-matching-subsequences └── NOTES.md ├── 871-minimum-number-of-refueling-stops └── NOTES.md ├── 894-all-possible-full-binary-trees └── NOTES.md ├── 985-sum-of-even-numbers-after-queries └── NOTES.md ├── 0017-letter-combinations-of-a-phone-number └── NOTES.md ├── 0026-remove-duplicates-from-sorted-array ├── NOTES.md └── 0026-remove-duplicates-from-sorted-array.cpp ├── 0387-first-unique-character-in-a-string └── NOTES.md ├── 0515-find-largest-value-in-each-tree-row └── NOTES.md ├── 0530-minimum-absolute-difference-in-bst └── NOTES.md ├── 0783-minimum-distance-between-bst-nodes └── NOTES.md ├── 0863-all-nodes-distance-k-in-binary-tree └── NOTES.md ├── 0926-flip-string-to-monotone-increasing └── NOTES.md ├── 0945-minimum-increment-to-make-array-unique └── NOTES.md ├── 0958-check-completeness-of-a-binary-tree └── NOTES.md ├── 0988-smallest-string-starting-from-leaf └── NOTES.md ├── 0992-subarrays-with-k-different-integers └── NOTES.md ├── 1022-sum-of-root-to-leaf-binary-numbers └── NOTES.md ├── 1038-binary-search-tree-to-greater-sum-tree └── NOTES.md ├── 1071-greatest-common-divisor-of-strings ├── NOTES.md └── 1071-greatest-common-divisor-of-strings.cpp ├── 1129-shortest-path-with-alternating-colors └── NOTES.md ├── 1130-minimum-cost-tree-from-leaf-values └── NOTES.md ├── 1155-number-of-dice-rolls-with-target-sum └── NOTES.md ├── 1161-maximum-level-sum-of-a-binary-tree └── NOTES.md ├── 1208-get-equal-substrings-within-budget └── NOTES.md ├── 1255-maximum-score-words-formed-by-letters └── NOTES.md ├── 1335-minimum-difficulty-of-a-job-schedule └── NOTES.md ├── 1356-sort-integers-by-the-number-of-1-bits ├── NOTES.md └── 1356-sort-integers-by-the-number-of-1-bits.cpp ├── 1372-longest-zigzag-path-in-a-binary-tree └── NOTES.md ├── 1376-time-needed-to-inform-all-employees └── NOTES.md ├── 1441-build-an-array-with-stack-operations └── NOTES.md ├── 1458-max-dot-product-of-two-subsequences └── NOTES.md ├── 1561-maximum-number-of-coins-you-can-get ├── NOTES.md └── 1561-maximum-number-of-coins-you-can-get.cpp ├── 1578-minimum-time-to-make-rope-colorful └── NOTES.md ├── 1582-special-positions-in-a-binary-matrix └── NOTES.md ├── 1657-determine-if-two-strings-are-close ├── NOTES.md └── 1657-determine-if-two-strings-are-close.cpp ├── 1700-number-of-students-unable-to-eat-lunch └── NOTES.md ├── 1717-maximum-score-from-removing-substrings └── NOTES.md ├── 1727-largest-submatrix-with-rearrangements └── NOTES.md ├── 1743-restore-the-array-from-adjacent-pairs └── NOTES.md ├── 1749-maximum-absolute-sum-of-any-subarray └── NOTES.md ├── 1759-count-number-of-homogenous-substrings └── NOTES.md ├── 1823-find-the-winner-of-the-circular-game ├── NOTES.md └── 1823-find-the-winner-of-the-circular-game.cpp ├── 1838-frequency-of-the-most-frequent-element └── NOTES.md ├── 1877-minimize-maximum-pair-sum-in-array └── NOTES.md ├── 1921-eliminate-maximum-number-of-monsters └── NOTES.md ├── 1926-nearest-exit-from-entrance-in-maze └── NOTES.md ├── 1970-last-day-where-you-can-still-cross └── NOTES.md ├── 2136-earliest-possible-day-of-full-bloom └── NOTES.md ├── 2141-maximum-running-time-of-n-computers └── NOTES.md ├── 2222-number-of-ways-to-select-buildings └── NOTES.md ├── 2225-find-players-with-zero-or-one-losses └── NOTES.md ├── 2244-minimum-rounds-to-complete-all-tasks └── NOTES.md ├── 2264-largest-3-same-digit-number-in-string ├── NOTES.md └── 2264-largest-3-same-digit-number-in-string.cpp ├── 2300-successful-pairs-of-spells-and-potions └── NOTES.md ├── 2327-number-of-people-aware-of-a-secret └── NOTES.md ├── 2328-number-of-increasing-paths-in-a-grid └── NOTES.md ├── 236-lowest-common-ancestor-of-a-binary-tree └── NOTES.md ├── 2389-longest-subsequence-with-limited-sum └── NOTES.md ├── 2433-find-the-original-array-of-prefix-xor ├── NOTES.md └── 2433-find-the-original-array-of-prefix-xor.cpp ├── 2980-check-if-bitwise-or-has-trailing-zeros ├── NOTES.md └── 2980-check-if-bitwise-or-has-trailing-zeros.cpp ├── 3005-count-elements-with-maximum-frequency └── NOTES.md ├── 329-longest-increasing-path-in-a-matrix └── NOTES.md ├── 363-max-sum-of-rectangle-no-larger-than-k └── NOTES.md ├── 378-kth-smallest-element-in-a-sorted-matrix └── NOTES.md ├── 718-maximum-length-of-repeated-subarray └── NOTES.md ├── 0211-design-add-and-search-words-data-structure └── NOTES.md ├── 0452-minimum-number-of-arrows-to-burst-balloons └── NOTES.md ├── 0673-number-of-longest-increasing-subsequence └── NOTES.md ├── 0712-minimum-ascii-delete-sum-for-two-strings └── NOTES.md ├── 0744-find-smallest-letter-greater-than-target └── NOTES.md ├── 0947-most-stones-removed-with-same-row-or-column └── NOTES.md ├── 0995-minimum-number-of-k-consecutive-bit-flips └── NOTES.md ├── 1011-capacity-to-ship-packages-within-d-days └── NOTES.md ├── 1047-remove-all-adjacent-duplicates-in-string ├── NOTES.md └── 1047-remove-all-adjacent-duplicates-in-string.cpp ├── 1074-number-of-submatrices-that-sum-to-target └── NOTES.md ├── 108-convert-sorted-array-to-binary-search-tree └── NOTES.md ├── 1080-insufficient-nodes-in-root-to-leaf-paths └── NOTES.md ├── 1249-minimum-remove-to-make-valid-parentheses └── NOTES.md ├── 1261-find-elements-in-a-contaminated-binary-tree └── NOTES.md ├── 1315-sum-of-nodes-with-even-valued-grandparent └── NOTES.md ├── 1351-count-negative-numbers-in-a-sorted-matrix ├── NOTES.md └── 1351-count-negative-numbers-in-a-sorted-matrix.cpp ├── 1359-count-all-valid-pickup-and-delivery-options ├── NOTES.md └── 1359-count-all-valid-pickup-and-delivery-options.cpp ├── 1423-maximum-points-you-can-obtain-from-cards └── NOTES.md ├── 1431-kids-with-the-greatest-number-of-candies └── NOTES.md ├── 1457-pseudo-palindromic-paths-in-a-binary-tree └── NOTES.md ├── 1464-maximum-product-of-two-elements-in-an-array ├── NOTES.md └── 1464-maximum-product-of-two-elements-in-an-array.cpp ├── 1482-minimum-number-of-days-to-make-m-bouquets └── NOTES.md ├── 1614-maximum-nesting-depth-of-the-parentheses ├── NOTES.md └── 1614-maximum-nesting-depth-of-the-parentheses.cpp ├── 1653-minimum-deletions-to-make-string-balanced └── NOTES.md ├── 1662-check-if-two-string-arrays-are-equivalent ├── NOTES.md └── 1662-check-if-two-string-arrays-are-equivalent.cpp ├── 181-employees-earning-more-than-their-managers ├── NOTES.md └── 181-employees-earning-more-than-their-managers.sql ├── 1857-largest-color-value-in-a-directed-graph └── NOTES.md ├── 1930-unique-length-3-palindromic-subsequences └── NOTES.md ├── 2044-count-number-of-maximum-bitwise-or-subsets ├── NOTES.md └── 2044-count-number-of-maximum-bitwise-or-subsets.cpp ├── 2091-removing-minimum-and-maximum-from-array └── NOTES.md ├── 2095-delete-the-middle-node-of-a-linked-list └── NOTES.md ├── 2108-find-first-palindromic-string-in-the-array └── NOTES.md ├── 2147-number-of-ways-to-divide-a-long-corridor └── NOTES.md ├── 2161-partition-array-according-to-given-pivot └── NOTES.md ├── 2193-minimum-number-of-moves-to-make-palindrome └── NOTES.md ├── 2265-count-nodes-equal-to-average-of-subtree └── NOTES.md ├── 2279-maximum-bags-with-full-capacity-of-rocks ├── NOTES.md └── 2279-maximum-bags-with-full-capacity-of-rocks.cpp ├── 2391-minimum-amount-of-time-to-collect-garbage └── NOTES.md ├── 2491-divide-players-into-teams-of-equal-skill └── NOTES.md ├── 2492-minimum-score-of-a-path-between-two-cities └── NOTES.md ├── 2635-apply-transform-over-each-element-in-array ├── NOTES.md └── 2635-apply-transform-over-each-element-in-array.js ├── 2642-design-graph-with-shortest-path-calculator └── NOTES.md ├── 2749-minimum-operations-to-make-the-integer-zero ├── NOTES.md └── 2749-minimum-operations-to-make-the-integer-zero.cpp ├── 2750-ways-to-split-array-into-good-subarrays └── NOTES.md ├── 30-substring-with-concatenation-of-all-words └── NOTES.md ├── 3075-maximize-happiness-of-selected-children └── NOTES.md ├── 3185-count-pairs-that-form-a-complete-day-ii ├── NOTES.md └── 3185-count-pairs-that-form-a-complete-day-ii.cpp ├── 659-split-array-into-consecutive-subsequences └── NOTES.md ├── 744-find-smallest-letter-greater-than-target └── NOTES.md ├── 967-numbers-with-same-consecutive-differences └── NOTES.md ├── 0003-longest-substring-without-repeating-characters ├── NOTES.md └── 0003-longest-substring-without-repeating-characters.cpp ├── 0309-best-time-to-buy-and-sell-stock-with-cooldown └── NOTES.md ├── 0632-smallest-range-covering-elements-from-k-lists └── NOTES.md ├── 1031-maximum-sum-of-two-non-overlapping-subarrays └── NOTES.md ├── 1061-lexicographically-smallest-equivalent-string └── NOTES.md ├── 117-populating-next-right-pointers-in-each-node-ii └── NOTES.md ├── 1203-sort-items-by-groups-respecting-dependencies └── NOTES.md ├── 1287-element-appearing-more-than-25-in-sorted-array └── NOTES.md ├── 1319-number-of-operations-to-make-network-connected └── NOTES.md ├── 1378-replace-employee-id-with-the-unique-identifier ├── NOTES.md └── 1378-replace-employee-id-with-the-unique-identifier.sql ├── 1443-minimum-time-to-collect-all-apples-in-a-tree └── NOTES.md ├── 1481-least-number-of-unique-integers-after-k-removals └── NOTES.md ├── 1502-can-make-arithmetic-progression-from-sequence ├── NOTES.md └── 1502-can-make-arithmetic-progression-from-sequence.cpp ├── 1503-last-moment-before-all-ants-fall-out-of-a-plank ├── NOTES.md └── 1503-last-moment-before-all-ants-fall-out-of-a-plank.cpp ├── 1557-minimum-number-of-vertices-to-reach-all-nodes ├── NOTES.md └── 1557-minimum-number-of-vertices-to-reach-all-nodes.cpp ├── 1569-number-of-ways-to-reorder-array-to-get-same-bst └── NOTES.md ├── 1611-minimum-one-bit-operations-to-make-integers-zero ├── NOTES.md └── 1611-minimum-one-bit-operations-to-make-integers-zero.cpp ├── 1624-largest-substring-between-two-equal-characters └── NOTES.md ├── 1685-sum-of-absolute-differences-in-a-sorted-array └── NOTES.md ├── 1751-maximum-number-of-events-that-can-be-attended-ii └── NOTES.md ├── 1913-maximum-product-difference-between-two-pairs └── NOTES.md ├── 2246-longest-path-with-different-adjacent-characters └── NOTES.md ├── 2250-count-number-of-rectangles-containing-each-point └── NOTES.md ├── 235-lowest-common-ancestor-of-a-binary-search-tree └── NOTES.md ├── 2486-append-characters-to-string-to-make-subsequence ├── NOTES.md └── 2486-append-characters-to-string-to-make-subsequence.cpp ├── 2610-convert-an-array-into-a-2d-array-with-conditions └── NOTES.md ├── 2816-double-a-number-represented-as-a-linked-list └── NOTES.md ├── 2849-determine-if-a-cell-is-reachable-at-a-given-time ├── NOTES.md └── 2849-determine-if-a-cell-is-reachable-at-a-given-time.cpp ├── 3090-maximum-length-substring-with-two-occurrences └── NOTES.md ├── 3217-delete-nodes-from-linked-list-present-in-array └── NOTES.md ├── 586-customer-placing-the-largest-number-of-orders ├── NOTES.md └── 586-customer-placing-the-largest-number-of-orders.sql ├── 0028-find-the-index-of-the-first-occurrence-in-a-string └── NOTES.md ├── 0714-best-time-to-buy-and-sell-stock-with-transaction-fee └── NOTES.md ├── 0762-prime-number-of-set-bits-in-binary-representation ├── NOTES.md └── 0762-prime-number-of-set-bits-in-binary-representation.cpp ├── 1171-remove-zero-sum-consecutive-nodes-from-linked-list └── NOTES.md ├── 1218-longest-arithmetic-subsequence-of-given-difference └── NOTES.md ├── 1282-group-the-people-given-the-group-size-they-belong-to └── NOTES.md ├── 1293-shortest-path-in-a-grid-with-obstacles-elimination └── NOTES.md ├── 1312-minimum-insertion-steps-to-make-a-string-palindrome └── NOTES.md ├── 1358-number-of-substrings-containing-all-three-characters └── NOTES.md ├── 1442-count-triplets-that-can-form-two-arrays-of-equal-xor └── NOTES.md ├── 1493-longest-subarray-of-1s-after-deleting-one-element └── NOTES.md ├── 1566-detect-pattern-of-length-m-repeated-k-or-more-times └── NOTES.md ├── 1608-special-array-with-x-elements-greater-than-or-equal-x └── NOTES.md ├── 1671-minimum-number-of-removals-to-make-mountain-array └── NOTES.md ├── 1758-minimum-changes-to-make-alternating-binary-string ├── NOTES.md └── 1758-minimum-changes-to-make-alternating-binary-string.cpp ├── 1802-maximum-value-at-a-given-index-in-a-bounded-array └── NOTES.md ├── 2009-minimum-number-of-operations-to-make-array-continuous └── NOTES.md ├── 2294-partition-array-such-that-maximum-difference-is-k ├── NOTES.md └── 2294-partition-array-such-that-maximum-difference-is-k.cpp ├── 2482-difference-between-ones-and-zeros-in-row-and-column └── NOTES.md ├── 2958-length-of-longest-subarray-with-at-most-k-frequency ├── NOTES.md └── 2958-length-of-longest-subarray-with-at-most-k-frequency.cpp ├── 2981-find-longest-special-substring-that-occurs-thrice-i └── NOTES.md ├── 3302-find-the-lexicographically-smallest-valid-sequence └── NOTES.md ├── 3303-find-the-occurrence-of-first-almost-equal-substring └── NOTES.md ├── 34-find-first-and-last-position-of-element-in-sorted-array └── NOTES.md ├── 0034-find-first-and-last-position-of-element-in-sorted-array └── NOTES.md ├── 0106-construct-binary-tree-from-inorder-and-postorder-traversal └── NOTES.md ├── 105-construct-binary-tree-from-preorder-and-inorder-traversal └── NOTES.md ├── 1170-compare-strings-by-frequency-of-the-smallest-character └── NOTES.md ├── 1456-maximum-number-of-vowels-in-a-substring-of-given-length └── NOTES.md ├── 1466-reorder-routes-to-make-all-paths-lead-to-the-city-zero └── NOTES.md ├── 1639-number-of-ways-to-form-a-target-string-given-a-dictionary └── NOTES.md ├── 1647-minimum-deletions-to-make-character-frequencies-unique └── NOTES.md ├── 1689-partitioning-into-minimum-number-of-deci-binary-numbers ├── NOTES.md └── 1689-partitioning-into-minimum-number-of-deci-binary-numbers.cpp ├── 1769-minimum-number-of-operations-to-move-all-balls-to-each-box └── NOTES.md ├── 1770-maximum-score-from-performing-multiplication-operations └── NOTES.md ├── 1964-find-the-longest-valid-obstacle-course-at-each-position └── NOTES.md ├── 2064-minimized-maximum-of-products-distributed-to-any-store └── NOTES.md ├── 2275-largest-combination-with-bitwise-and-greater-than-zero └── NOTES.md ├── 2962-count-subarrays-where-max-element-appears-at-least-k-times └── NOTES.md ├── 1239-maximum-length-of-a-concatenated-string-with-unique-characters └── NOTES.md ├── 1371-find-the-longest-substring-containing-vowels-in-even-counts └── NOTES.md ├── 1498-number-of-subsequences-that-satisfy-the-given-sum-condition └── NOTES.md ├── 1637-widest-vertical-area-between-two-points-containing-no-points ├── NOTES.md └── 1637-widest-vertical-area-between-two-points-containing-no-points.cpp ├── 1379-find-a-corresponding-node-of-a-binary-tree-in-a-clone-of-that-tree └── NOTES.md ├── 1420-build-array-where-you-can-find-the-maximum-exactly-k-comparisons └── NOTES.md ├── 1465-maximum-area-of-a-piece-of-cake-after-horizontal-and-vertical-cuts └── NOTES.md ├── 1489-find-critical-and-pseudo-critical-edges-in-minimum-spanning-tree └── NOTES.md ├── 1509-minimum-difference-between-largest-and-smallest-value-in-three-moves └── NOTES.md ├── 1438-longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit └── NOTES.md ├── 0292-nim-game └── 0292-nim-game.cpp ├── 0176-second-highest-salary └── 0176-second-highest-salary.sql ├── 0595-big-countries └── 0595-big-countries.sql ├── 1068-product-sales-analysis-i └── 1068-product-sales-analysis-i.sql ├── 2649-count-total-number-of-colored-cells └── 2649-count-total-number-of-colored-cells.cpp ├── 3091-apply-operations-to-make-sum-of-array-greater-than-or-equal-to-k └── 3091-apply-operations-to-make-sum-of-array-greater-than-or-equal-to-k.cpp ├── 0201-bitwise-and-of-numbers-range └── 0201-bitwise-and-of-numbers-range.cpp ├── 509-fibonacci-number └── 509-fibonacci-number.cpp ├── 2107-find-unique-binary-string └── 2107-find-unique-binary-string.cpp ├── 3429-special-array-i └── 3429-special-array-i.cpp ├── 0268-missing-number └── 0268-missing-number.cpp ├── 3447-clear-digits └── 3447-clear-digits.cpp ├── 2000-reverse-prefix-of-word └── 2000-reverse-prefix-of-word.cpp ├── 0905-sort-array-by-parity └── 0905-sort-array-by-parity.cpp ├── 2997-minimum-number-of-operations-to-make-array-xor-equal-to-k └── 2997-minimum-number-of-operations-to-make-array-xor-equal-to-k.cpp ├── 1051-height-checker └── 1051-height-checker.cpp ├── 3651-transformed-array └── 3651-transformed-array.cpp ├── 0780-max-chunks-to-make-sorted └── 0780-max-chunks-to-make-sorted.cpp ├── 462-minimum-moves-to-equal-array-elements-ii └── 462-minimum-moves-to-equal-array-elements-ii.cpp ├── 383-ransom-note └── 383-ransom-note.cpp ├── 1468-check-if-n-and-its-double-exist └── 1468-check-if-n-and-its-double-exist.cpp ├── 0153-find-minimum-in-rotated-sorted-array └── 0153-find-minimum-in-rotated-sorted-array.cpp ├── 2232-adding-spaces-to-a-string └── 2232-adding-spaces-to-a-string.cpp ├── 1502-construct-k-palindrome-strings └── 1502-construct-k-palindrome-strings.cpp ├── 2037-minimum-number-of-moves-to-seat-everyone └── 2037-minimum-number-of-moves-to-seat-everyone.cpp ├── 3184-count-pairs-that-form-a-complete-day-i └── 3184-count-pairs-that-form-a-complete-day-i.cpp ├── 0790-domino-and-tromino-tiling └── 0790-domino-and-tromino-tiling.cpp ├── 2966-divide-array-into-arrays-with-max-difference └── 2966-divide-array-into-arrays-with-max-difference.cpp ├── 1545-find-kth-bit-in-nth-binary-string └── 1545-find-kth-bit-in-nth-binary-string.cpp ├── 2145-grid-game └── 2145-grid-game.cpp ├── 2441-largest-positive-integer-that-exists-with-its-negative └── 2441-largest-positive-integer-that-exists-with-its-negative.cpp ├── 2533-bitwise-xor-of-all-pairings └── 2533-bitwise-xor-of-all-pairings.cpp ├── 0933-number-of-recent-calls └── 0933-number-of-recent-calls.cpp ├── 1404-number-of-steps-to-reduce-a-number-in-binary-representation-to-one └── 1404-number-of-steps-to-reduce-a-number-in-binary-representation-to-one.cpp ├── 2914-minimum-number-of-changes-to-make-binary-string-beautiful └── 2914-minimum-number-of-changes-to-make-binary-string-beautiful.cpp ├── 2971-find-polygon-with-the-largest-perimeter └── 2971-find-polygon-with-the-largest-perimeter.cpp ├── 1878-check-if-array-is-sorted-and-rotated └── 1878-check-if-array-is-sorted-and-rotated.cpp ├── 1927-maximum-ascending-subarray-sum └── 1927-maximum-ascending-subarray-sum.cpp ├── 0260-single-number-iii └── 0260-single-number-iii.cpp ├── 0264-ugly-number-ii └── 0264-ugly-number-ii.cpp └── 0678-valid-parenthesis-string └── 0678-valid-parenthesis-string.cpp /0502-ipo/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0001-two-sum/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0078-subsets/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1-two-sum/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /112-path-sum/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /135-candy/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2620-counter/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /458-poor-pigs/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /542-01-matrix/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /78-subsets/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /90-subsets-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0038-count-and-say/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0046-permutations/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0054-spiral-matrix/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0055-jump-game/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0071-simplify-path/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0072-edit-distance/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0075-sort-colors/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0077-combinations/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0079-word-search/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0091-decode-ways/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0100-same-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0139-word-break/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0140-word-break-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0146-lru-cache/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0174-dungeon-game/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0189-rotate-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0198-house-robber/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0231-power-of-two/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0242-valid-anagram/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0258-add-digits/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0319-bulb-switcher/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0338-counting-bits/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0342-power-of-four/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0401-binary-watch/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0403-frog-jump/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0456-132-pattern/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0458-poor-pigs/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0460-lfu-cache/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0542-01-matrix/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0645-set-mismatch/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0648-replace-words/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0649-dota2-senate/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0704-binary-search/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0729-my-calendar-i/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0835-image-overlap/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0837-new-21-game/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0859-buddy-strings/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0899-orderly-queue/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0912-sort-an-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0935-knight-dialer/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0948-bag-of-tokens/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /101-symmetric-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1094-car-pooling/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /113-path-sum-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1140-stone-game-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1260-shift-2d-grid/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1518-water-bottles/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /16-3sum-closest/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2665-counter-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /326-power-of-three/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /342-power-of-four/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /456-132-pattern/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /48-rotate-image/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /595-big-countries/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /62-unique-paths/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /704-binary-search/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /729-my-calendar-i/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /733-flood-fill/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /838-push-dominoes/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /91-decode-ways/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /916-word-subsets/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /948-bag-of-tokens/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0020-valid-parentheses/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0040-combination-sum-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0044-wildcard-matching/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0049-group-anagrams/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0057-insert-interval/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0059-spiral-matrix-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0064-minimum-path-sum/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0068-text-justification/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0070-climbing-stairs/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0074-search-a-2d-matrix/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0085-maximal-rectangle/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0086-partition-list/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0087-scramble-string/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0101-symmetric-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0137-single-number-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0141-linked-list-cycle/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0169-majority-element/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0191-number-of-1-bits/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0200-number-of-islands/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0205-isomorphic-strings/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0207-course-schedule/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0217-contains-duplicate/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0223-rectangle-area/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0224-basic-calculator/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0228-summary-ranges/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0257-binary-tree-paths/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0279-perfect-squares/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0312-burst-balloons/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0409-longest-palindrome/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0413-arithmetic-slices/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0443-string-compression/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0445-add-two-numbers-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0463-island-perimeter/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0472-concatenated-words/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0486-predict-the-winner/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0506-relative-ranks/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0518-coin-change-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0520-detect-capital/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0525-contiguous-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0605-can-place-flowers/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0621-task-scheduler/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0650-2-keys-keyboard/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0661-image-smoother/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0705-design-hashset/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0706-design-hashmap/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0731-my-calendar-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0735-asteroid-collision/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0739-daily-temperatures/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0766-toeplitz-matrix/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0767-reorganize-string/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0785-is-graph-bipartite/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0791-custom-sort-string/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0846-hand-of-straights/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0867-transpose-matrix/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0872-leaf-similar-trees/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0896-monotonic-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0901-online-stock-span/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0904-fruit-into-baskets/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0909-snakes-and-ladders/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0934-shortest-bridge/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0938-range-sum-of-bst/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0942-di-string-match/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0980-unique-paths-iii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1020-number-of-enclaves/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1035-uncrossed-lines/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1046-last-stone-weight/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1148-article-views-i/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /13-roman-to-integer/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1323-maximum-69-number/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1328-break-a-palindrome/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1402-reducing-dishes/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1416-restore-the-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1436-destination-city/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1463-cherry-pickup-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1473-paint-house-iii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1683-invalid-tweets/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1720-decode-xored-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /175-combine-two-tables/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1766-tree-of-coprimes/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /182-duplicate-emails/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1905-count-sub-islands/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /200-number-of-islands/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /226-invert-binary-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2706-buy-two-chocolates/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2742-painting-the-walls/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2751-robot-collisions/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /3133-minimum-array-end/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /327-count-of-range-sum/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /336-palindrome-pairs/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /399-evaluate-division/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /409-longest-palindrome/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /42-trapping-rain-water/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /43-multiply-strings/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /547-number-of-provinces/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /623-add-one-row-to-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /695-max-area-of-island/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /732-my-calendar-iii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /858-mirror-reflection/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /867-transpose-matrix/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0023-merge-k-sorted-lists/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0024-swap-nodes-in-pairs/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0035-search-insert-position/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0041-first-missing-positive/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0042-trapping-rain-water/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0058-length-of-last-word/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0093-restore-ip-addresses/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0097-interleaving-string/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0110-balanced-binary-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0119-pascals-triangle-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0131-palindrome-partitioning/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0165-compare-version-numbers/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0214-shortest-palindrome/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0219-contains-duplicate-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0229-majority-element-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0234-palindrome-linked-list/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0239-sliding-window-maximum/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0240-search-a-2d-matrix-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0310-minimum-height-trees/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0328-odd-even-linked-list/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0332-reconstruct-itinerary/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0347-top-k-frequent-elements/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0382-linked-list-random-node/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0389-find-the-difference/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0410-split-array-largest-sum/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0427-construct-quad-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0477-total-hamming-distance/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0523-continuous-subarray-sum/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0526-beautiful-arrangement/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0560-subarray-sum-equals-k/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0576-out-of-boundary-paths/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0584-find-customer-referee/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0623-add-one-row-to-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0629-k-inverse-pairs-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0633-sum-of-square-numbers/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0647-palindromic-substrings/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0652-find-duplicate-subtrees/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0692-top-k-frequent-words/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0779-k-th-symbol-in-grammar/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0784-letter-case-permutation/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0839-similar-string-groups/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0875-koko-eating-bananas/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0880-decoded-string-at-index/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0881-boats-to-save-people/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0965-univalued-binary-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0997-find-the-town-judge/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1002-find-common-characters/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1048-longest-string-chain/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1049-last-stone-weight-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1052-grumpy-bookstore-owner/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1095-find-in-mountain-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1122-relative-sort-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1137-n-th-tribonacci-number/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1219-path-with-maximum-gold/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1395-count-number-of-teams/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /14-longest-common-prefix/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1405-longest-happy-string/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1424-diagonal-traverse-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1472-design-browser-history/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1480-running-sum-of-1d-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1512-number-of-good-pairs/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1529-minimum-suffix-flips/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1531-string-compression-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1544-make-the-string-great/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1550-three-consecutive-odds/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1572-matrix-diagonal-sum/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1603-design-parking-system/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1615-maximal-network-rank/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1630-arithmetic-subarrays/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1763-longest-nice-substring/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1813-sentence-similarity-iii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1833-maximum-ice-cream-bars/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1834-single-threaded-cpu/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1929-concatenation-of-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /196-delete-duplicate-emails/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2050-parallel-courses-iii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2104-sum-of-subarray-ranges/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /219-contains-duplicate-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /234-palindrome-linked-list/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2421-number-of-good-paths/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2485-find-the-pivot-integer/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2551-put-marbles-in-bags/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2629-function-composition/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2785-sort-vowels-in-a-string/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /307-range-sum-query-mutable/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /473-matchsticks-to-square/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /511-game-play-analysis-i/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /584-find-customer-referee/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /622-design-circular-queue/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /629-k-inverse-pairs-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /658-find-k-closest-elements/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /794-valid-tic-tac-toe-state/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /804-unique-morse-code-words/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /869-reordered-power-of-2/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /890-find-and-replace-pattern/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /936-stamping-the-sequence/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0004-median-of-two-sorted-arrays/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0032-longest-valid-parentheses/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0076-minimum-window-substring/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0111-minimum-depth-of-binary-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0124-binary-tree-maximum-path-sum/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0129-sum-root-to-leaf-numbers/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0151-reverse-words-in-a-string/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0168-excel-sheet-column-title/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0208-implement-trie-prefix-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0209-minimum-size-subarray-sum/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0222-count-complete-tree-nodes/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0225-implement-stack-using-queues/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0232-implement-queue-using-stacks/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0237-delete-node-in-a-linked-list/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0238-product-of-array-except-self/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0287-find-the-duplicate-number/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0295-find-median-from-data-stream/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0316-remove-duplicate-letters/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0341-flatten-nested-list-iterator/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0345-reverse-vowels-of-a-string/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0368-largest-divisible-subset/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0374-guess-number-higher-or-lower/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0380-insert-delete-getrandom-o1/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0435-non-overlapping-intervals/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0451-sort-characters-by-frequency/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0459-repeated-substring-pattern/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0491-non-decreasing-subsequences/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0513-find-bottom-left-tree-value/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0552-student-attendance-record-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0559-maximum-depth-of-n-ary-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0564-find-the-closest-palindrome/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0643-maximum-average-subarray-i/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0662-maximum-width-of-binary-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0713-subarray-product-less-than-k/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0725-split-linked-list-in-parts/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0746-min-cost-climbing-stairs/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0786-k-th-smallest-prime-fraction/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0802-find-eventual-safe-states/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0823-binary-trees-with-factors/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0826-most-profit-assigning-work/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0834-sum-of-distances-in-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0844-backspace-string-compare/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0876-middle-of-the-linked-list/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0907-sum-of-subarray-minimums/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0930-binary-subarrays-with-sum/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0931-minimum-falling-path-sum/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0946-validate-stack-sequences/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0974-subarray-sums-divisible-by-k/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0976-largest-perimeter-triangle/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0977-squares-of-a-sorted-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0983-minimum-cost-for-tickets/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1004-max-consecutive-ones-iii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1079-letter-tile-possibilities/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1105-filling-bookcase-shelves/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1125-smallest-sufficient-team/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1143-longest-common-subsequence/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1145-binary-tree-coloring-game/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1207-unique-number-of-occurrences/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1220-count-vowels-permutation/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1254-number-of-closed-islands/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /128-longest-consecutive-sequence/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1289-minimum-falling-path-sum-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1329-sort-the-matrix-diagonally/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1382-balance-a-binary-search-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1396-design-underground-system/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1425-constrained-subsequence-sum/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1539-kth-missing-positive-number/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1547-minimum-cost-to-cut-a-stick/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1675-minimize-deviation-in-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1679-max-number-of-k-sum-pairs/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1706-where-will-the-ball-fall/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1732-find-the-highest-altitude/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1768-merge-strings-alternately/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1791-find-center-of-star-graph/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1829-maximum-xor-for-each-query/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /183-customers-who-never-order/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1845-seat-reservation-manager/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1863-sum-of-all-subset-xor-totals/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1903-largest-odd-number-in-string/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1971-find-if-path-exists-in-graph/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1980-find-unique-binary-string/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /199-binary-tree-right-side-view/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /209-minimum-size-subarray-sum/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2090-k-radius-subarray-averages/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2092-find-all-people-with-secret/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2101-detonate-the-maximum-bombs/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2181-merge-nodes-in-between-zeros/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2256-minimum-average-difference/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2304-minimum-path-cost-in-a-grid/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2305-fair-distribution-of-cookies/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2317-maximum-xor-after-operations/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2331-evaluate-boolean-binary-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2352-equal-row-and-column-pairs/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2360-longest-cycle-in-a-graph/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2370-longest-ideal-subsequence/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /238-product-of-array-except-self/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2390-removing-stars-from-a-string/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2405-optimal-partition-of-string/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2439-minimize-maximum-of-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2462-total-cost-to-hire-k-workers/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2483-minimum-penalty-for-a-shop/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2542-maximum-subsequence-score/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2626-array-reduce-transformation/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2634-filter-elements-from-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2641-cousins-in-binary-tree-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2667-create-hello-world-function/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2678-number-of-senior-citizens/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2707-extra-characters-in-a-string/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2748-number-of-beautiful-pairs/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2864-maximum-odd-binary-number/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /3011-find-if-array-can-be-sorted/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /33-search-in-rotated-sorted-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /374-guess-number-higher-or-lower/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /417-pacific-atlantic-water-flow/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /5-longest-palindromic-substring/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /557-reverse-words-in-a-string-iii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /596-classes-more-than-5-students/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /653-two-sum-iv-input-is-a-bst/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /713-subarray-product-less-than-k/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /802-find-eventual-safe-states/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /823-binary-trees-with-factors/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /825-friends-of-appropriate-ages/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /98-validate-binary-search-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /981-time-based-key-value-store/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0005-longest-palindromic-substring/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0019-remove-nth-node-from-end-of-list/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0033-search-in-rotated-sorted-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0121-best-time-to-buy-and-sell-stock/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0138-copy-list-with-random-pointer/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0145-binary-tree-postorder-traversal/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0150-evaluate-reverse-polish-notation/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0215-kth-largest-element-in-an-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0241-different-ways-to-add-parentheses/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0334-increasing-triplet-subsequence/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0352-data-stream-as-disjoint-intervals/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0373-find-k-pairs-with-smallest-sums/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0405-convert-a-number-to-hexadecimal/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0442-find-all-duplicates-in-an-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0446-arithmetic-slices-ii-subsequence/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0501-find-mode-in-binary-search-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0516-longest-palindromic-subsequence/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0557-reverse-words-in-a-string-iii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0583-delete-operation-for-two-strings/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0589-n-ary-tree-preorder-traversal/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0590-n-ary-tree-postorder-traversal/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0688-knight-probability-in-chessboard/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0698-partition-to-k-equal-sum-subsets/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0701-insert-into-a-binary-search-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0703-kth-largest-element-in-a-stream/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0797-all-paths-from-source-to-target/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0857-minimum-cost-to-hire-k-workers/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0864-shortest-path-to-get-all-keys/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0884-uncommon-words-from-two-sentences/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0950-reveal-cards-in-increasing-order/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0979-distribute-coins-in-binary-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /102-binary-tree-level-order-traversal/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1027-longest-arithmetic-subsequence/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1043-partition-array-for-maximum-sum/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1091-shortest-path-in-binary-matrix/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1110-delete-nodes-and-return-forest/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1124-longest-well-performing-interval/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /114-flatten-binary-tree-to-linked-list/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1232-check-if-it-is-a-straight-line/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1248-count-number-of-nice-subarrays/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1338-reduce-array-size-to-the-half/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1352-product-of-the-last-k-numbers/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1383-maximum-performance-of-a-team/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1387-sort-integers-by-the-power-value/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /144-binary-tree-preorder-traversal/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1444-number-of-ways-of-cutting-a-pizza/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1448-count-good-nodes-in-binary-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1451-rearrange-words-in-a-sentence/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1514-path-with-maximum-probability/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1535-find-the-winner-of-an-array-game/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1584-min-cost-to-connect-all-points/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1627-graph-connectivity-with-threshold/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1642-furthest-building-you-can-reach/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1669-merge-in-between-linked-lists/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1688-count-of-matches-in-tournament/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1716-calculate-money-in-leetcode-bank/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1721-swapping-nodes-in-a-linked-list/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1757-recyclable-and-low-fat-products/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1760-minimum-limit-of-balls-in-a-bag/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1793-maximum-score-of-a-good-subarray/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1797-design-authentication-manager/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1822-sign-of-the-product-of-an-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1832-check-if-the-sentence-is-pangram/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1884-egg-drop-with-2-eggs-and-n-floors/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /19-remove-nth-node-from-end-of-list/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1915-number-of-wonderful-substrings/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2053-kth-distinct-string-in-an-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2100-find-good-days-to-rob-the-bank/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2125-number-of-laser-beams-in-a-bank/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2140-solving-questions-with-brainpower/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2187-minimum-time-to-complete-trips/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2206-divide-array-into-equal-pairs/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2215-find-the-difference-of-two-arrays/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2251-number-of-flowers-in-full-bloom/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2255-count-prefixes-of-a-given-string/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2285-maximum-total-importance-of-roads/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2336-smallest-number-in-infinite-set/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2348-number-of-zero-filled-subarrays/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2415-reverse-odd-levels-of-binary-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2416-sum-of-prefix-scores-of-strings/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2444-count-subarrays-with-fixed-bounds/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2448-minimum-cost-to-make-array-equal/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2463-minimum-total-distance-traveled/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2487-remove-nodes-from-linked-list/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2597-the-number-of-beautiful-subsets/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2709-greatest-common-divisor-traversal/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2938-separate-black-and-white-balls/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /300-longest-increasing-subsequence/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /318-maximum-product-of-word-lengths/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /387-first-unique-character-in-a-string/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /406-queue-reconstruction-by-height/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /429-n-ary-tree-level-order-traversal/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /606-construct-string-from-binary-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /637-average-of-levels-in-binary-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /792-number-of-matching-subsequences/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /871-minimum-number-of-refueling-stops/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /894-all-possible-full-binary-trees/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /985-sum-of-even-numbers-after-queries/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0017-letter-combinations-of-a-phone-number/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0026-remove-duplicates-from-sorted-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0387-first-unique-character-in-a-string/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0515-find-largest-value-in-each-tree-row/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0530-minimum-absolute-difference-in-bst/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0783-minimum-distance-between-bst-nodes/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0863-all-nodes-distance-k-in-binary-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0926-flip-string-to-monotone-increasing/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0945-minimum-increment-to-make-array-unique/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0958-check-completeness-of-a-binary-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0988-smallest-string-starting-from-leaf/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0992-subarrays-with-k-different-integers/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1022-sum-of-root-to-leaf-binary-numbers/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1038-binary-search-tree-to-greater-sum-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1071-greatest-common-divisor-of-strings/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1129-shortest-path-with-alternating-colors/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1130-minimum-cost-tree-from-leaf-values/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1155-number-of-dice-rolls-with-target-sum/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1161-maximum-level-sum-of-a-binary-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1208-get-equal-substrings-within-budget/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1255-maximum-score-words-formed-by-letters/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1335-minimum-difficulty-of-a-job-schedule/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1356-sort-integers-by-the-number-of-1-bits/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1372-longest-zigzag-path-in-a-binary-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1376-time-needed-to-inform-all-employees/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1441-build-an-array-with-stack-operations/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1458-max-dot-product-of-two-subsequences/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1561-maximum-number-of-coins-you-can-get/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1578-minimum-time-to-make-rope-colorful/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1582-special-positions-in-a-binary-matrix/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1657-determine-if-two-strings-are-close/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1700-number-of-students-unable-to-eat-lunch/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1717-maximum-score-from-removing-substrings/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1727-largest-submatrix-with-rearrangements/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1743-restore-the-array-from-adjacent-pairs/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1749-maximum-absolute-sum-of-any-subarray/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1759-count-number-of-homogenous-substrings/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1823-find-the-winner-of-the-circular-game/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1838-frequency-of-the-most-frequent-element/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1877-minimize-maximum-pair-sum-in-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1921-eliminate-maximum-number-of-monsters/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1926-nearest-exit-from-entrance-in-maze/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1970-last-day-where-you-can-still-cross/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2136-earliest-possible-day-of-full-bloom/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2141-maximum-running-time-of-n-computers/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2222-number-of-ways-to-select-buildings/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2225-find-players-with-zero-or-one-losses/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2244-minimum-rounds-to-complete-all-tasks/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2264-largest-3-same-digit-number-in-string/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2300-successful-pairs-of-spells-and-potions/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2327-number-of-people-aware-of-a-secret/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2328-number-of-increasing-paths-in-a-grid/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /236-lowest-common-ancestor-of-a-binary-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2389-longest-subsequence-with-limited-sum/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2433-find-the-original-array-of-prefix-xor/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2980-check-if-bitwise-or-has-trailing-zeros/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /3005-count-elements-with-maximum-frequency/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /329-longest-increasing-path-in-a-matrix/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /363-max-sum-of-rectangle-no-larger-than-k/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /378-kth-smallest-element-in-a-sorted-matrix/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /718-maximum-length-of-repeated-subarray/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0211-design-add-and-search-words-data-structure/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0452-minimum-number-of-arrows-to-burst-balloons/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0673-number-of-longest-increasing-subsequence/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0712-minimum-ascii-delete-sum-for-two-strings/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0744-find-smallest-letter-greater-than-target/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0947-most-stones-removed-with-same-row-or-column/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0995-minimum-number-of-k-consecutive-bit-flips/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1011-capacity-to-ship-packages-within-d-days/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1047-remove-all-adjacent-duplicates-in-string/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1074-number-of-submatrices-that-sum-to-target/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /108-convert-sorted-array-to-binary-search-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1080-insufficient-nodes-in-root-to-leaf-paths/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1249-minimum-remove-to-make-valid-parentheses/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1261-find-elements-in-a-contaminated-binary-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1315-sum-of-nodes-with-even-valued-grandparent/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1351-count-negative-numbers-in-a-sorted-matrix/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1359-count-all-valid-pickup-and-delivery-options/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1423-maximum-points-you-can-obtain-from-cards/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1431-kids-with-the-greatest-number-of-candies/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1457-pseudo-palindromic-paths-in-a-binary-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1464-maximum-product-of-two-elements-in-an-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1482-minimum-number-of-days-to-make-m-bouquets/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1614-maximum-nesting-depth-of-the-parentheses/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1653-minimum-deletions-to-make-string-balanced/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1662-check-if-two-string-arrays-are-equivalent/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /181-employees-earning-more-than-their-managers/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1857-largest-color-value-in-a-directed-graph/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1930-unique-length-3-palindromic-subsequences/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2044-count-number-of-maximum-bitwise-or-subsets/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2091-removing-minimum-and-maximum-from-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2095-delete-the-middle-node-of-a-linked-list/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2108-find-first-palindromic-string-in-the-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2147-number-of-ways-to-divide-a-long-corridor/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2161-partition-array-according-to-given-pivot/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2193-minimum-number-of-moves-to-make-palindrome/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2265-count-nodes-equal-to-average-of-subtree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2279-maximum-bags-with-full-capacity-of-rocks/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2391-minimum-amount-of-time-to-collect-garbage/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2491-divide-players-into-teams-of-equal-skill/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2492-minimum-score-of-a-path-between-two-cities/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2635-apply-transform-over-each-element-in-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2642-design-graph-with-shortest-path-calculator/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2749-minimum-operations-to-make-the-integer-zero/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2750-ways-to-split-array-into-good-subarrays/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /30-substring-with-concatenation-of-all-words/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /3075-maximize-happiness-of-selected-children/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /3185-count-pairs-that-form-a-complete-day-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /659-split-array-into-consecutive-subsequences/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /744-find-smallest-letter-greater-than-target/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /967-numbers-with-same-consecutive-differences/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0003-longest-substring-without-repeating-characters/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0309-best-time-to-buy-and-sell-stock-with-cooldown/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0632-smallest-range-covering-elements-from-k-lists/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1031-maximum-sum-of-two-non-overlapping-subarrays/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1061-lexicographically-smallest-equivalent-string/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /117-populating-next-right-pointers-in-each-node-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1203-sort-items-by-groups-respecting-dependencies/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1287-element-appearing-more-than-25-in-sorted-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1319-number-of-operations-to-make-network-connected/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1378-replace-employee-id-with-the-unique-identifier/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1443-minimum-time-to-collect-all-apples-in-a-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1481-least-number-of-unique-integers-after-k-removals/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1502-can-make-arithmetic-progression-from-sequence/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1503-last-moment-before-all-ants-fall-out-of-a-plank/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1557-minimum-number-of-vertices-to-reach-all-nodes/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1569-number-of-ways-to-reorder-array-to-get-same-bst/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1611-minimum-one-bit-operations-to-make-integers-zero/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1624-largest-substring-between-two-equal-characters/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1685-sum-of-absolute-differences-in-a-sorted-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1751-maximum-number-of-events-that-can-be-attended-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1913-maximum-product-difference-between-two-pairs/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2246-longest-path-with-different-adjacent-characters/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2250-count-number-of-rectangles-containing-each-point/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /235-lowest-common-ancestor-of-a-binary-search-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2486-append-characters-to-string-to-make-subsequence/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2610-convert-an-array-into-a-2d-array-with-conditions/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2816-double-a-number-represented-as-a-linked-list/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2849-determine-if-a-cell-is-reachable-at-a-given-time/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /3090-maximum-length-substring-with-two-occurrences/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /3217-delete-nodes-from-linked-list-present-in-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /586-customer-placing-the-largest-number-of-orders/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0028-find-the-index-of-the-first-occurrence-in-a-string/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0714-best-time-to-buy-and-sell-stock-with-transaction-fee/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0762-prime-number-of-set-bits-in-binary-representation/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1171-remove-zero-sum-consecutive-nodes-from-linked-list/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1218-longest-arithmetic-subsequence-of-given-difference/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1282-group-the-people-given-the-group-size-they-belong-to/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1293-shortest-path-in-a-grid-with-obstacles-elimination/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1312-minimum-insertion-steps-to-make-a-string-palindrome/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1358-number-of-substrings-containing-all-three-characters/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1442-count-triplets-that-can-form-two-arrays-of-equal-xor/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1493-longest-subarray-of-1s-after-deleting-one-element/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1566-detect-pattern-of-length-m-repeated-k-or-more-times/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1608-special-array-with-x-elements-greater-than-or-equal-x/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1671-minimum-number-of-removals-to-make-mountain-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1758-minimum-changes-to-make-alternating-binary-string/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1802-maximum-value-at-a-given-index-in-a-bounded-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2009-minimum-number-of-operations-to-make-array-continuous/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2294-partition-array-such-that-maximum-difference-is-k/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2482-difference-between-ones-and-zeros-in-row-and-column/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2958-length-of-longest-subarray-with-at-most-k-frequency/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2981-find-longest-special-substring-that-occurs-thrice-i/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /3302-find-the-lexicographically-smallest-valid-sequence/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /3303-find-the-occurrence-of-first-almost-equal-substring/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /34-find-first-and-last-position-of-element-in-sorted-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0034-find-first-and-last-position-of-element-in-sorted-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0106-construct-binary-tree-from-inorder-and-postorder-traversal/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /105-construct-binary-tree-from-preorder-and-inorder-traversal/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1170-compare-strings-by-frequency-of-the-smallest-character/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1456-maximum-number-of-vowels-in-a-substring-of-given-length/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1466-reorder-routes-to-make-all-paths-lead-to-the-city-zero/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1639-number-of-ways-to-form-a-target-string-given-a-dictionary/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1647-minimum-deletions-to-make-character-frequencies-unique/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1689-partitioning-into-minimum-number-of-deci-binary-numbers/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1769-minimum-number-of-operations-to-move-all-balls-to-each-box/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1770-maximum-score-from-performing-multiplication-operations/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1964-find-the-longest-valid-obstacle-course-at-each-position/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2064-minimized-maximum-of-products-distributed-to-any-store/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2275-largest-combination-with-bitwise-and-greater-than-zero/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2962-count-subarrays-where-max-element-appears-at-least-k-times/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1239-maximum-length-of-a-concatenated-string-with-unique-characters/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1371-find-the-longest-substring-containing-vowels-in-even-counts/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1498-number-of-subsequences-that-satisfy-the-given-sum-condition/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1637-widest-vertical-area-between-two-points-containing-no-points/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1379-find-a-corresponding-node-of-a-binary-tree-in-a-clone-of-that-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1420-build-array-where-you-can-find-the-maximum-exactly-k-comparisons/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1465-maximum-area-of-a-piece-of-cake-after-horizontal-and-vertical-cuts/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1489-find-critical-and-pseudo-critical-edges-in-minimum-spanning-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1509-minimum-difference-between-largest-and-smallest-value-in-three-moves/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1438-longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0292-nim-game/0292-nim-game.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | bool canWinNim(int n) { 4 | return (n % 4) != 0; 5 | } 6 | }; -------------------------------------------------------------------------------- /0319-bulb-switcher/0319-bulb-switcher.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int bulbSwitch(int n) { 4 | return sqrt(n); 5 | } 6 | }; -------------------------------------------------------------------------------- /1683-invalid-tweets/1683-invalid-tweets.sql: -------------------------------------------------------------------------------- 1 | # Write your MySQL query statement below 2 | SELECT tweet_id FROM Tweets 3 | WHERE LENGTH(content) > 15 -------------------------------------------------------------------------------- /0176-second-highest-salary/0176-second-highest-salary.sql: -------------------------------------------------------------------------------- 1 | select max(salary) as SecondHighestSalary from Employee 2 | where salary < (select max(salary) from Employee); -------------------------------------------------------------------------------- /0191-number-of-1-bits/0191-number-of-1-bits.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int hammingWeight(uint32_t n) { 4 | return __builtin_popcount(n); 5 | } 6 | }; -------------------------------------------------------------------------------- /0584-find-customer-referee/0584-find-customer-referee.sql: -------------------------------------------------------------------------------- 1 | # Write your MySQL query statement below 2 | SELECT name FROM Customer 3 | WHERE referee_id IS NULL OR referee_id != 2 -------------------------------------------------------------------------------- /0595-big-countries/0595-big-countries.sql: -------------------------------------------------------------------------------- 1 | # Write your MySQL query statement below 2 | SELECT name, population, area FROM World 3 | WHERE area >= 3000000 OR population >= 25000000 -------------------------------------------------------------------------------- /182-duplicate-emails/182-duplicate-emails.sql: -------------------------------------------------------------------------------- 1 | # Write your MySQL query statement below 2 | 3 | select p1.email Email from Person p1 4 | group by p1.email 5 | having Count(*) > 1 -------------------------------------------------------------------------------- /1148-article-views-i/1148-article-views-i.sql: -------------------------------------------------------------------------------- 1 | # Write your MySQL query statement below 2 | SELECT DISTINCT(author_id) as id FROM Views 3 | WHERE author_id = viewer_id 4 | ORDER BY author_id -------------------------------------------------------------------------------- /0342-power-of-four/0342-power-of-four.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | bool isPowerOfFour(int n) { 4 | return ((n > 0) && ((n & n - 1) == 0) && (n % 3 == 1)); 5 | } 6 | }; -------------------------------------------------------------------------------- /596-classes-more-than-5-students/596-classes-more-than-5-students.sql: -------------------------------------------------------------------------------- 1 | # Write your MySQL query statement below 2 | SELECT CLASS 3 | FROM COURSES 4 | GROUP BY CLASS 5 | HAVING COUNT(STUDENT)>4; -------------------------------------------------------------------------------- /0258-add-digits/0258-add-digits.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int addDigits(int num) { 4 | if ( num == 0 ) return 0; 5 | return num%9 == 0 ? 9 : num%9 ; 6 | } 7 | }; -------------------------------------------------------------------------------- /1757-recyclable-and-low-fat-products/1757-recyclable-and-low-fat-products.sql: -------------------------------------------------------------------------------- 1 | # Write your MySQL query statement below 2 | select product_id from Products 3 | where low_fats = 'Y' AND recyclable = 'Y' -------------------------------------------------------------------------------- /1068-product-sales-analysis-i/1068-product-sales-analysis-i.sql: -------------------------------------------------------------------------------- 1 | # Write your MySQL query statement below 2 | SELECT p.product_name, s.year, s.price FROM Product p 3 | JOIN Sales s ON p.product_id = s.product_id -------------------------------------------------------------------------------- /0458-poor-pigs/0458-poor-pigs.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int poorPigs(int buckets, int timeDetect, int timeTest) { 4 | return ceil(log2(buckets)/log2(int(timeTest/timeDetect)+1)); 5 | } 6 | }; -------------------------------------------------------------------------------- /0459-repeated-substring-pattern/0459-repeated-substring-pattern.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | bool repeatedSubstringPattern(string str) { 4 | return (str + str).find(str, 1) < str.size(); 5 | } 6 | }; -------------------------------------------------------------------------------- /458-poor-pigs/458-poor-pigs.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int poorPigs(int buckets, int minutesToDie, int minutesToTest) { 4 | return ceil(log(buckets)/log(minutesToTest / minutesToDie + 1)); 5 | } 6 | }; -------------------------------------------------------------------------------- /0242-valid-anagram/0242-valid-anagram.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | bool isAnagram(string s, string t) { 4 | sort(s.begin(), s.end()); 5 | sort(t.begin(), t.end()); 6 | return s == t; 7 | } 8 | }; -------------------------------------------------------------------------------- /2649-count-total-number-of-colored-cells/2649-count-total-number-of-colored-cells.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | long long coloredCells(int n) { 4 | return 1LL + (long long)n * (long long)(n - 1) * 2LL; 5 | } 6 | }; -------------------------------------------------------------------------------- /0896-monotonic-array/0896-monotonic-array.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | bool isMonotonic(vector& nums) { 4 | return is_sorted(nums.begin(),nums.end()) || is_sorted(nums.begin(),nums.end(),greater()); 5 | } 6 | }; -------------------------------------------------------------------------------- /1378-replace-employee-id-with-the-unique-identifier/1378-replace-employee-id-with-the-unique-identifier.sql: -------------------------------------------------------------------------------- 1 | # Write your MySQL query statement below 2 | SELECT eu.unique_id, e.name FROM Employees e 3 | LEFT JOIN EmployeeUNI eu ON eu.id = e.id -------------------------------------------------------------------------------- /326-power-of-three/326-power-of-three.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | bool isPowerOfThree(int n) { 4 | if (n < 1) return false; 5 | 6 | while (n % 3 == 0) n /= 3; 7 | 8 | return n == 1; 9 | } 10 | }; -------------------------------------------------------------------------------- /196-delete-duplicate-emails/196-delete-duplicate-emails.sql: -------------------------------------------------------------------------------- 1 | # Please write a DELETE statement and DO NOT write a SELECT statement. 2 | # Write your MySQL query statement below 3 | delete p2 from Person p1, Person p2 4 | where (p1.email = p2.email and p1.id < p2.id) -------------------------------------------------------------------------------- /181-employees-earning-more-than-their-managers/181-employees-earning-more-than-their-managers.sql: -------------------------------------------------------------------------------- 1 | # Write your MySQL query statement below 2 | select e1.name Employee from Employee e1 3 | where e1.salary > (select e2.salary from employee e2 where e2.id = e1.managerid) 4 | -------------------------------------------------------------------------------- /2706-buy-two-chocolates/2706-buy-two-chocolates.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int buyChoco(vector& p, int money) { 4 | nth_element(begin(p), begin(p) + 1, end(p)); 5 | return money < p[0] + p[1] ? money : money - p[0] - p[1]; 6 | } 7 | }; -------------------------------------------------------------------------------- /586-customer-placing-the-largest-number-of-orders/586-customer-placing-the-largest-number-of-orders.sql: -------------------------------------------------------------------------------- 1 | # Write your MySQL query statement below 2 | SELECT CUSTOMER_NUMBER 3 | FROM ORDERS 4 | GROUP BY CUSTOMER_NUMBER 5 | ORDER BY COUNT(CUSTOMER_NUMBER) DESC 6 | LIMIT 1; -------------------------------------------------------------------------------- /3133-minimum-array-end/3133-minimum-array-end.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | long long minEnd(int n, int x) { 4 | long long ans = x; 5 | while (--n) { 6 | ans = (ans + 1) | x; 7 | } 8 | return ans; 9 | } 10 | }; -------------------------------------------------------------------------------- /2485-find-the-pivot-integer/2485-find-the-pivot-integer.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int pivotInteger(int n) { 4 | int ans = (n * n + n ) /2; 5 | int sq = sqrt(ans); 6 | if(sq * sq == ans)return sq; 7 | else return -1; 8 | } 9 | }; 10 | -------------------------------------------------------------------------------- /3091-apply-operations-to-make-sum-of-array-greater-than-or-equal-to-k/3091-apply-operations-to-make-sum-of-array-greater-than-or-equal-to-k.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int minOperations(int k) { 4 | int x = sqrt(k); 5 | return x + (k - 1) / x - 1; 6 | } 7 | }; -------------------------------------------------------------------------------- /0201-bitwise-and-of-numbers-range/0201-bitwise-and-of-numbers-range.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int rangeBitwiseAnd(int left, int right) { 4 | int x = right; 5 | while(x>left){ 6 | x = x&(x-1); 7 | } 8 | return x; 9 | } 10 | }; -------------------------------------------------------------------------------- /0231-power-of-two/0231-power-of-two.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | bool isPowerOfTwo(int n) { 4 | for (int i = 0; i < 31; ++i) { 5 | if ((1 << i) == n) { 6 | return true; 7 | } 8 | } 9 | return false; 10 | } 11 | }; -------------------------------------------------------------------------------- /0338-counting-bits/0338-counting-bits.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | vector countBits(int n) { 4 | vector ans; 5 | for (int i = 0 ; i <= n ; ++i) { 6 | ans.push_back(__builtin_popcount(i)); 7 | } 8 | return ans; 9 | } 10 | }; -------------------------------------------------------------------------------- /1071-greatest-common-divisor-of-strings/1071-greatest-common-divisor-of-strings.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | 3 | public: string gcdOfStrings(string str1, string str2) { 4 | 5 | return (str1 + str2 == str2 + str1) ? 6 | 7 | str1.substr(0, gcd(size(str1), size(str2))) : ""; 8 | 9 | } 10 | 11 | }; -------------------------------------------------------------------------------- /2864-maximum-odd-binary-number/2864-maximum-odd-binary-number.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | string maximumOddBinaryNumber(string& s) { 4 | int n=s.size(), n1=count(s.begin(), s.end(), '1'), n0=n-n1; 5 | return string(n1-1, '1')+string(n0, '0')+string(1, '1'); 6 | 7 | } 8 | }; -------------------------------------------------------------------------------- /509-fibonacci-number/509-fibonacci-number.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int fib(int n) { 4 | int dp[35]; 5 | dp[0] = 0, dp[1] = 1; 6 | for (int i = 2 ; i <= n; i++){ 7 | dp[i] = dp[i - 1] + dp[i - 2]; 8 | } 9 | return dp[n]; 10 | } 11 | }; -------------------------------------------------------------------------------- /1980-find-unique-binary-string/1980-find-unique-binary-string.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | string findDifferentBinaryString(vector& nums) { 4 | string ans=""; 5 | for(int i=0; i& nums) { 4 | string ans=""; 5 | for(int i=0; i getConcatenation(vector& nums) { 4 | int n = nums.size(); 5 | for (int i = 0; i < n; ++i) { 6 | nums.push_back(nums[i]); 7 | } 8 | return nums; 9 | } 10 | }; -------------------------------------------------------------------------------- /0942-di-string-match/0942-di-string-match.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | vector diStringMatch(string S) { 4 | vector res; 5 | for (int l = 0, h = S.size(), i = 0; i <= S.size(); ++i) 6 | res.push_back(i == S.size() || S[i] == 'I' ? l++ : h--); 7 | return res; 8 | } 9 | }; -------------------------------------------------------------------------------- /1002-find-common-characters/1002-find-common-characters.py: -------------------------------------------------------------------------------- 1 | from collections import Counter 2 | 3 | class Solution: 4 | def commonChars(self, A: List[str]) -> List[str]: 5 | res = Counter(A[0]) 6 | 7 | for a in A: 8 | res &= Counter(a) 9 | 10 | return res.elements() -------------------------------------------------------------------------------- /2667-create-hello-world-function/2667-create-hello-world-function.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @return {Function} 3 | */ 4 | var createHelloWorld = function() { 5 | return function(...args) { 6 | return "Hello World"; 7 | } 8 | }; 9 | 10 | /** 11 | * const f = createHelloWorld(); 12 | * f(); // "Hello World" 13 | */ -------------------------------------------------------------------------------- /342-power-of-four/342-power-of-four.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | bool isPowerOfFour(int n) { 4 | int i = 1; 5 | long long x = 1; 6 | while (x != n && x < pow(2, 31)){ 7 | x = x * 4; 8 | } 9 | if (x == n) return true; 10 | return false; 11 | } 12 | }; -------------------------------------------------------------------------------- /0070-climbing-stairs/0070-climbing-stairs.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int climbStairs(int n) { 4 | int dp[n + 5]; 5 | dp[0] = 1; 6 | dp[1] = 1; 7 | for (int i = 2 ; i <= n ; i++){ 8 | dp[i] = dp[i - 1] + dp[i - 2]; 9 | } 10 | return dp[n]; 11 | } 12 | }; -------------------------------------------------------------------------------- /0215-kth-largest-element-in-an-array/0215-kth-largest-element-in-an-array.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int findKthLargest(vector& nums, int k) { 4 | priority_queue q(nums.begin(), nums.end()); 5 | k--; 6 | while(k--) 7 | q.pop(); 8 | return q.top(); 9 | } 10 | }; -------------------------------------------------------------------------------- /1689-partitioning-into-minimum-number-of-deci-binary-numbers/1689-partitioning-into-minimum-number-of-deci-binary-numbers.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int minPartitions(string s) { 4 | int x = 0; 5 | for(auto &it:s){ 6 | x = max(x,it-'0'); 7 | } 8 | return x; 9 | } 10 | }; -------------------------------------------------------------------------------- /0189-rotate-array/0189-rotate-array.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | void rotate(vector& nums, int k) { 4 | int n = nums.size(); 5 | k = k % n; 6 | reverse(nums.begin(), nums.end()); 7 | reverse(nums.begin(), nums.begin() + k); 8 | reverse(nums.begin() + k, nums.end()); 9 | } 10 | }; -------------------------------------------------------------------------------- /1716-calculate-money-in-leetcode-bank/1716-calculate-money-in-leetcode-bank.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int totalMoney(int n) { 4 | int s = 1, ans = 0; 5 | while (n > 0) { 6 | for (int i = 0; i < 7 && n-- > 0; ++i) ans += s + i; 7 | s++; 8 | } 9 | return ans; 10 | } 11 | }; -------------------------------------------------------------------------------- /1732-find-the-highest-altitude/1732-find-the-highest-altitude.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int largestAltitude(vector& gain) { 4 | int ans = 0; 5 | int cur = 0; 6 | for (auto &g : gain){ 7 | cur += g; 8 | ans = max(ans, cur); 9 | } 10 | return ans; 11 | } 12 | }; -------------------------------------------------------------------------------- /2620-counter/2620-counter.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @param {number} n 3 | * @return {Function} counter 4 | */ 5 | var createCounter = function(n) { 6 | return function() { 7 | return n++; 8 | }; 9 | }; 10 | 11 | /** 12 | * const counter = createCounter(10) 13 | * counter() // 10 14 | * counter() // 11 15 | * counter() // 12 16 | */ -------------------------------------------------------------------------------- /1550-three-consecutive-odds/1550-three-consecutive-odds.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | bool threeConsecutiveOdds(vector& arr) 4 | { 5 | int n = arr.size(); 6 | for(int i=0;i& nums) { 4 | int a = 1; 5 | for(auto i : nums){ 6 | if(i==0) return 0; 7 | else if(i>0) a *=1; 8 | else a *= -1; 9 | } 10 | return a; 11 | } 12 | }; -------------------------------------------------------------------------------- /2433-find-the-original-array-of-prefix-xor/2433-find-the-original-array-of-prefix-xor.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | vector findArray(vector& pref) { 4 | vector ans = {pref[0]}; 5 | for (int i = 1 ; i < pref.size() ; i++){ 6 | ans.push_back(pref[i - 1] ^ pref[i]); 7 | } 8 | return ans; 9 | } 10 | }; -------------------------------------------------------------------------------- /2634-filter-elements-from-array/2634-filter-elements-from-array.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @param {number[]} arr 3 | * @param {Function} fn 4 | * @return {number[]} 5 | */ 6 | var filter = function(arr, fn) { 7 | let newArray = []; 8 | for (let i = 0 ; i < arr.length ; ++i){ 9 | if (fn(arr[i], i)) newArray.push(arr[i]); 10 | } 11 | return newArray; 12 | }; -------------------------------------------------------------------------------- /3429-special-array-i/3429-special-array-i.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | bool isArraySpecial(vector& nums) { 4 | if (nums.size() == 2) return nums[0] % 2 != nums[1] % 2; 5 | for (int i = 0; i < nums.size() - 1; ++i) { 6 | if (nums[i] % 2 == nums[i + 1] % 2) return false; 7 | } 8 | return true; 9 | } 10 | }; -------------------------------------------------------------------------------- /0268-missing-number/0268-missing-number.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int missingNumber(vector& nums) { 4 | int result = nums.size(); 5 | int i=0; 6 | 7 | for(int num:nums){ 8 | result ^= num; 9 | result ^= i; 10 | i++; 11 | } 12 | 13 | return result; 14 | } 15 | }; -------------------------------------------------------------------------------- /1047-remove-all-adjacent-duplicates-in-string/1047-remove-all-adjacent-duplicates-in-string.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | string removeDuplicates(string& s) { 4 | int i = 0; 5 | for(int j = 1; j < s.size(); ++j) 6 | if (i < 0 || s[i] != s[j]) s[++i] = s[j]; 7 | else --i; 8 | return s.substr(0, i + 1); 9 | } 10 | }; -------------------------------------------------------------------------------- /1758-minimum-changes-to-make-alternating-binary-string/1758-minimum-changes-to-make-alternating-binary-string.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int minOperations(string s) { 4 | int res = 0, n = s.length(); 5 | for (int i = 0; i < n; ++i) 6 | if (s[i] - '0' != i % 2) 7 | res++; 8 | return min(res, n - res); 9 | } 10 | }; -------------------------------------------------------------------------------- /1572-matrix-diagonal-sum/1572-matrix-diagonal-sum.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int diagonalSum(vector>& mat) { 4 | int n = mat.size() , ans = 0; 5 | for(int i = 0; i < n; ++i){ 6 | ans += mat[i][i]; 7 | if(i != n - i - 1) 8 | ans += mat[i][n - i - 1]; 9 | } 10 | return ans; 11 | } 12 | }; -------------------------------------------------------------------------------- /2635-apply-transform-over-each-element-in-array/2635-apply-transform-over-each-element-in-array.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @param {number[]} arr 3 | * @param {Function} fn 4 | * @return {number[]} 5 | */ 6 | var map = function(arr, fn) { 7 | let newArray = []; 8 | for (let i = 0 ; i < arr.length ; i++) { 9 | newArray.push(fn(arr[i], i)); 10 | } 11 | return newArray; 12 | }; -------------------------------------------------------------------------------- /3447-clear-digits/3447-clear-digits.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | string clearDigits(string s) { 4 | string ans; 5 | for (char &c : s) { 6 | if (isdigit(c) && !ans.empty()) { 7 | ans.pop_back(); 8 | } else { 9 | ans += c; 10 | } 11 | } 12 | return ans; 13 | } 14 | }; 15 | -------------------------------------------------------------------------------- /1512-number-of-good-pairs/1512-number-of-good-pairs.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int numIdenticalPairs(vector& nums) { 4 | int ans=0; 5 | int n=nums.size(); 6 | for (int i=0;i= 0) { 6 | if ((num[i] - '0') & 1) { 7 | return num.substr(0, i + 1); 8 | } 9 | --i; 10 | } 11 | return ""; 12 | } 13 | }; -------------------------------------------------------------------------------- /2000-reverse-prefix-of-word/2000-reverse-prefix-of-word.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | string reversePrefix(string word, char ch) { 4 | for(int i = 0; i < word.size(); ++i) { 5 | if (word[i] == ch) { 6 | reverse(word.begin(), word.begin() + i + 1); 7 | break; 8 | } 9 | } 10 | return word; 11 | } 12 | }; -------------------------------------------------------------------------------- /0905-sort-array-by-parity/0905-sort-array-by-parity.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | vector sortArrayByParity(vector& A) { 4 | int j=0; 5 | for(int i=0;i runningSum(vector& nums) { 4 | vector ans; 5 | ans.push_back(nums[0]); 6 | int n = nums.size(); 7 | for (int i = 1 ; i < n ; i++){ 8 | ans.push_back(nums[i] + ans[ans.size() - 1]); 9 | } 10 | return ans; 11 | } 12 | }; -------------------------------------------------------------------------------- /2390-removing-stars-from-a-string/2390-removing-stars-from-a-string.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | string removeStars(string s) { 4 | string ans = ""; 5 | for(auto &c : s){ 6 | if(c == '*') 7 | ans.pop_back(); 8 | else 9 | ans.push_back(c); 10 | c++; 11 | } 12 | return ans; 13 | } 14 | }; -------------------------------------------------------------------------------- /2997-minimum-number-of-operations-to-make-array-xor-equal-to-k/2997-minimum-number-of-operations-to-make-array-xor-equal-to-k.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int minOperations(vector& nums, int k) { 4 | int allXor = 0; 5 | for (auto& num: nums) { 6 | allXor ^= num; 7 | } 8 | 9 | return __builtin_popcount(allXor ^ k); 10 | } 11 | }; -------------------------------------------------------------------------------- /1051-height-checker/1051-height-checker.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int heightChecker(vector& heights) { 4 | vector sorted(heights.begin(), heights.end()); 5 | sort(heights.begin(), heights.end()); 6 | int n=heights.size(), ans=0; 7 | for(int i=0; i decode(vector& encoded, int first) { 4 | int n = encoded.size(); 5 | vector ans; 6 | ans.push_back(first); 7 | for (int i = 0 ; i < n ; i++){ 8 | ans.push_back(ans[ans.size() - 1] ^ encoded[i]); 9 | } 10 | return ans; 11 | } 12 | }; -------------------------------------------------------------------------------- /2678-number-of-senior-citizens/2678-number-of-senior-citizens.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int countSeniors(vector& details) { 4 | int cnt = 0; 5 | for(const auto& person : details){ 6 | int age = stoi(person.substr(11, 2)); 7 | if(age > 60){ 8 | cnt++; 9 | } 10 | } 11 | return cnt; 12 | } 13 | }; -------------------------------------------------------------------------------- /2405-optimal-partition-of-string/2405-optimal-partition-of-string.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int partitionString(string s) { 4 | int xr=0,ans=1; 5 | for(int i=0;i0 ? t>=d: t!=1; 9 | } 10 | }; -------------------------------------------------------------------------------- /3651-transformed-array/3651-transformed-array.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | vector constructTransformedArray(vector& nums) { 4 | int n = nums.size(); 5 | vector ans(n); 6 | for (int i = 0; i < n; ++i) { 7 | if (nums[i] != 0) { 8 | ans[i] = nums[abs(i + nums[i] % n + n) % n]; 9 | } 10 | } 11 | return ans; 12 | } 13 | }; -------------------------------------------------------------------------------- /1359-count-all-valid-pickup-and-delivery-options/1359-count-all-valid-pickup-and-delivery-options.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int countOrders(int n) { 4 | uint64_t v = fact(n*2); 5 | return fact(n*2); 6 | } 7 | 8 | uint64_t fact(uint64_t n) { 9 | if(n == 2) return 1; 10 | return ((n >> !(n & 1)) * fact (n-1)) % m; 11 | } 12 | 13 | const uint64_t m = 1e9 + 7; 14 | }; -------------------------------------------------------------------------------- /2206-divide-array-into-equal-pairs/2206-divide-array-into-equal-pairs.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | bool divideArray(vector& nums) { 4 | map ma; 5 | for (auto &num : nums){ 6 | ma[num]++; 7 | } 8 | for (auto &m : ma){ 9 | if (m.second & 1){ 10 | return false; 11 | } 12 | } 13 | return true; 14 | } 15 | }; -------------------------------------------------------------------------------- /2279-maximum-bags-with-full-capacity-of-rocks/2279-maximum-bags-with-full-capacity-of-rocks.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int maximumBags(vector& C, vector& R, int add) { 4 | int n = size(R), cnt=0; 5 | for(int i = 0;i < n; i++) R[i] = C[i] - R[i]; 6 | sort(begin(R), end(R)); 7 | for(int i = 0;i < n && R[i] - add <= 0; i++) cnt++, add -= R[i]; 8 | return cnt; 9 | } 10 | }; -------------------------------------------------------------------------------- /0217-contains-duplicate/0217-contains-duplicate.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | bool containsDuplicate(vector& nums) { 4 | set distinct; 5 | for (auto &n : nums) { 6 | int before = distinct.size(); 7 | distinct.insert(n); 8 | if (before == distinct.size()) { 9 | return true; 10 | } 11 | } 12 | return false; 13 | } 14 | }; -------------------------------------------------------------------------------- /0780-max-chunks-to-make-sorted/0780-max-chunks-to-make-sorted.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int maxChunksToSorted(vector& arr) { 4 | int curSum = 0, sum = 0, ans = 0; 5 | for (int i = 0; i < arr.size(); ++i) { 6 | curSum += arr[i]; 7 | sum += i; 8 | if (curSum == sum) { 9 | ++ans; 10 | } 11 | } 12 | return ans; 13 | } 14 | }; -------------------------------------------------------------------------------- /1464-maximum-product-of-two-elements-in-an-array/1464-maximum-product-of-two-elements-in-an-array.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int maxProduct(vector& nums) { 4 | auto m1 = 0, m2 = 0; 5 | for (auto n: nums) { 6 | if (n > m1) 7 | m2 = exchange(m1, n); 8 | else 9 | m2 = max(m2, n); 10 | } 11 | return (m1 - 1) * (m2 - 1); 12 | } 13 | }; -------------------------------------------------------------------------------- /1503-last-moment-before-all-ants-fall-out-of-a-plank/1503-last-moment-before-all-ants-fall-out-of-a-plank.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int getLastMoment(int n, vector& left, vector& right) { 4 | int maxLeft = left.empty() ? 0 : *max_element(left.begin(), left.end()); 5 | int minRight = right.empty() ? n : *min_element(right.begin(), right.end()); 6 | return max(maxLeft, n - minRight); 7 | } 8 | }; -------------------------------------------------------------------------------- /462-minimum-moves-to-equal-array-elements-ii/462-minimum-moves-to-equal-array-elements-ii.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int minMoves2(vector& nums) { 4 | int n = nums.size(); 5 | sort(nums.begin(), nums.end()); 6 | int mid = nums[n/2]; 7 | int ans = 0; 8 | for (int i = 0 ; i < n ; i++){ 9 | ans += abs(mid-nums[i]); 10 | } 11 | return ans; 12 | } 13 | }; -------------------------------------------------------------------------------- /48-rotate-image/48-rotate-image.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | void rotate(vector>& matrix) { 4 | int n = matrix.size(); 5 | for(int i=0;i& nums) { 4 | int appearOnce = 0, appearTwice = 0; 5 | for(int index = 0; index < nums.size(); index++) { 6 | appearOnce = (appearOnce ^ nums[index]) & ~(appearTwice); 7 | appearTwice = (appearTwice ^ nums[index]) & ~(appearOnce); 8 | } 9 | return appearOnce; 10 | } 11 | }; -------------------------------------------------------------------------------- /0198-house-robber/0198-house-robber.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int rob(vector& nums) { 4 | int n = nums.size(); 5 | if (n == 1) return nums[0]; 6 | int dp[n + 1]; 7 | dp[0] = nums[0]; 8 | dp[1] = max(nums[0], nums[1]); 9 | for (int i = 2 ; i < n ; i++){ 10 | dp[i] = max(dp[i - 1], dp[i - 2] + nums[i]); 11 | } 12 | return dp[n - 1]; 13 | } 14 | }; -------------------------------------------------------------------------------- /2370-longest-ideal-subsequence/2370-longest-ideal-subsequence.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int longestIdealString(string s, int k) { 4 | int n = s.size(), dp[150] = {}, ans = 0; 5 | for (auto &c : s) { 6 | for (int j = c - k; j <= c + k; ++j) { 7 | dp[c] = max(dp[c], dp[j]); 8 | } 9 | ans = max(ans, ++dp[c]); 10 | } 11 | return ans; 12 | } 13 | }; -------------------------------------------------------------------------------- /0001-two-sum/0001-two-sum.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | vector twoSum(vector& nums, int target) { 4 | int n = nums.size(); 5 | map ma; 6 | for (int i = 0 ; i < n ; i++){ 7 | if (ma.find(target - nums[i]) != ma.end()){ 8 | return {i, ma[target - nums[i]]}; 9 | } 10 | ma[nums[i]] = i; 11 | } 12 | return {}; 13 | } 14 | }; -------------------------------------------------------------------------------- /0766-toeplitz-matrix/0766-toeplitz-matrix.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | bool isToeplitzMatrix(vector>& matrix) { 4 | int m = matrix[0].size(); 5 | int n = matrix.size(); 6 | for (int i = 1 ; i < n ; i++){ 7 | for (int j = 1 ; j < m ; j++){ 8 | if (matrix[i - 1][j - 1] != matrix[i][j]) return false; 9 | } 10 | } 11 | return true; 12 | } 13 | }; -------------------------------------------------------------------------------- /0899-orderly-queue/0899-orderly-queue.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | string orderlyQueue(string s, int k) { 4 | if (k > 1){ 5 | sort(s.begin(), s.end()); 6 | return s; 7 | } 8 | string tmp = s; 9 | for (int i = 0 ; i < s.size() ; i++){ 10 | tmp = tmp.substr(1, tmp.size()) + tmp[0]; 11 | s = min(s, tmp); 12 | } 13 | return s; 14 | } 15 | }; -------------------------------------------------------------------------------- /1688-count-of-matches-in-tournament/1688-count-of-matches-in-tournament.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int numberOfMatches(int n) { 4 | if (n == 1) { 5 | return 0; 6 | } 7 | if (n == 2) { 8 | return 1; 9 | } 10 | if (n & 1) { 11 | return (n - 1) / 2 + numberOfMatches(((n - 1) / 2 ) +1); 12 | } 13 | return n/2 + numberOfMatches(n/2); 14 | } 15 | }; -------------------------------------------------------------------------------- /2486-append-characters-to-string-to-make-subsequence/2486-append-characters-to-string-to-make-subsequence.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int appendCharacters(string s, string t) { 4 | int i = 0, j = 0; 5 | while (i < s.size() && j < t.size()) { 6 | if (s[i] == t[j]) { 7 | ++j; 8 | } 9 | ++i; 10 | } 11 | 12 | return t.size() - j; 13 | } 14 | }; -------------------------------------------------------------------------------- /3185-count-pairs-that-form-a-complete-day-ii/3185-count-pairs-that-form-a-complete-day-ii.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | long long countCompleteDayPairs(vector& hours) { 4 | long long ans = 0; 5 | map mp; 6 | for (int i = 0; i < hours.size(); ++i) { 7 | ans += mp[(24 - hours[i] % 24) % 24]; 8 | mp[hours[i] % 24]++; 9 | } 10 | return ans; 11 | } 12 | }; -------------------------------------------------------------------------------- /383-ransom-note/383-ransom-note.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | bool canConstruct(string ransomNote, string magazine) { 4 | map occ; 5 | for (auto &c : magazine){ 6 | occ[c]++; 7 | } 8 | for (auto &c : ransomNote){ 9 | if (occ[c] == 0){ 10 | return false; 11 | } 12 | occ[c]--; 13 | } 14 | return true; 15 | } 16 | }; -------------------------------------------------------------------------------- /1518-water-bottles/1518-water-bottles.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int numWaterBottles(int numBottles, int numExchange) { 4 | int ans = numBottles; 5 | int currentEmpty = numBottles; 6 | while (currentEmpty >= numExchange) { 7 | ans += currentEmpty / numExchange; 8 | currentEmpty = currentEmpty / numExchange + currentEmpty % numExchange; 9 | } 10 | return ans; 11 | } 12 | }; -------------------------------------------------------------------------------- /1436-destination-city/1436-destination-city.cpp: -------------------------------------------------------------------------------- 1 | class Solution {//Hashset 2 | public: 3 | string destCity(vector>& paths) { 4 | unordered_set startingCities; 5 | for(auto& e: paths) startingCities.insert(e[0]); 6 | for(auto& e: paths) 7 | if(startingCities.find(e[1]) == startingCities.end()) return e[1]; 8 | return ""; 9 | } 10 | }; -------------------------------------------------------------------------------- /0026-remove-duplicates-from-sorted-array/0026-remove-duplicates-from-sorted-array.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int removeDuplicates(vector& nums) { 4 | if (!nums.size()) return 0; 5 | int k = 1; 6 | for (int i = 1 ; i < nums.size() ; i++){ 7 | if (nums[i] != nums[k - 1]){ 8 | k++; 9 | nums[k - 1] = nums[i]; 10 | } 11 | } 12 | return k; 13 | } 14 | }; -------------------------------------------------------------------------------- /1557-minimum-number-of-vertices-to-reach-all-nodes/1557-minimum-number-of-vertices-to-reach-all-nodes.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | vector findSmallestSetOfVertices(int n, vector>& edges) { 4 | vector v(n,0),ans; 5 | for(auto &i: edges){ 6 | v[i[1]]++; 7 | } 8 | for(int i = 0; i < n; i++){ 9 | if(!v[i])ans.push_back(i); 10 | } 11 | return ans; 12 | } 13 | }; -------------------------------------------------------------------------------- /0650-2-keys-keyboard/0650-2-keys-keyboard.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int minSteps(int n) { 4 | vector dp(n + 1, 1000); 5 | 6 | dp[1] = 0; 7 | for (int i = 2; i <= n; i++) { 8 | for (int j = 1; j <= i / 2; j++) { 9 | if (i % j == 0) { 10 | dp[i] = min(dp[i], dp[j] + i / j); 11 | } 12 | } 13 | } 14 | 15 | return dp[n]; 16 | } 17 | }; -------------------------------------------------------------------------------- /1468-check-if-n-and-its-double-exist/1468-check-if-n-and-its-double-exist.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | bool checkIfExist(vector& arr) { 4 | for (int i = 0; i < arr.size(); ++i) { 5 | for (int j = i + 1; j < arr.size(); ++j) { 6 | if (arr[i] * 2 == arr[j] || arr[i] == arr[j] * 2) { 7 | return true; 8 | } 9 | } 10 | } 11 | return false; 12 | } 13 | }; -------------------------------------------------------------------------------- /0153-find-minimum-in-rotated-sorted-array/0153-find-minimum-in-rotated-sorted-array.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int findMin(vector& nums) { 4 | int left = 0, right = nums.size() - 1; 5 | while (nums[left] > nums[right] && left < right){ 6 | int mid = (right + left) / 2; 7 | if (nums[mid] > nums[right]) left = mid + 1; 8 | else right = mid; 9 | } 10 | return nums[left]; 11 | } 12 | }; -------------------------------------------------------------------------------- /1137-n-th-tribonacci-number/1137-n-th-tribonacci-number.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int tribonacci(int n) { 4 | if (n <= 2) { 5 | return min(n, 1); 6 | } 7 | 8 | int a = 0, b = 1, c = 1; 9 | int ans = 0; 10 | for (int i = 3; i <= n; ++i) { 11 | ans = a + b + c; 12 | a = b; 13 | b = c; 14 | c = ans; 15 | } 16 | return ans; 17 | } 18 | }; -------------------------------------------------------------------------------- /1561-maximum-number-of-coins-you-can-get/1561-maximum-number-of-coins-you-can-get.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int maxCoins(vector& piles) { 4 | sort(piles.begin(), piles.end()); 5 | int cur = piles.size() - 2; 6 | int cnt = piles.size() / 3; 7 | int ans = 0; 8 | while (cnt){ 9 | ans += piles[cur]; 10 | cur -= 2; 11 | cnt--; 12 | } 13 | return ans; 14 | } 15 | }; -------------------------------------------------------------------------------- /1662-check-if-two-string-arrays-are-equivalent/1662-check-if-two-string-arrays-are-equivalent.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | bool arrayStringsAreEqual(vector& word1, vector& word2) { 4 | int n1 = word1.size(); 5 | int n2 = word2.size(); 6 | string s1 = "",s2 = ""; 7 | for (int i = 0; i < n1; i++) s1 += word1[i]; 8 | for (int i = 0; i < n2; i++) s2 += word2[i]; 9 | return (s1 == s2); 10 | } 11 | }; -------------------------------------------------------------------------------- /2232-adding-spaces-to-a-string/2232-adding-spaces-to-a-string.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | string addSpaces(string s, vector& spaces) { 4 | int n = s.size(), j = 0; 5 | string ans; 6 | for (int i = 0; i < n; ++i) { 7 | if (j < spaces.size() && i == spaces[j]) { 8 | ans += ' '; 9 | ++j; 10 | } 11 | ans += s[i]; 12 | } 13 | return ans; 14 | } 15 | }; -------------------------------------------------------------------------------- /1351-count-negative-numbers-in-a-sorted-matrix/1351-count-negative-numbers-in-a-sorted-matrix.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int countNegatives(vector>& grid) { 4 | 5 | int n = grid.size(); 6 | int ans = 0; 7 | 8 | for(int i=0;i freq(26, 0); 6 | for (auto &c : s) { 7 | freq[c - 'a']++; 8 | } 9 | int cnt = 0; 10 | for (int i = 0; i < 26; ++i) { 11 | cnt += (freq[i] & 1); 12 | } 13 | return cnt <= k; 14 | } 15 | }; -------------------------------------------------------------------------------- /0055-jump-game/0055-jump-game.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | bool canJump(vector& nums) { 4 | int cur; //maximum element can be reached a moment 5 | cur = nums[0];// at first the maximum element we can reach is nums[0] 6 | for (int i = 0 ; i < nums.size() ; ++i){ 7 | if (cur < i){ 8 | return false; 9 | } 10 | cur = max(i + nums[i], cur); 11 | } 12 | return true; 13 | } 14 | }; -------------------------------------------------------------------------------- /1502-can-make-arithmetic-progression-from-sequence/1502-can-make-arithmetic-progression-from-sequence.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | bool canMakeArithmeticProgression(vector& arr) { 4 | sort(arr.begin(), arr.end()); 5 | int currentDifference = abs(arr[0] - arr[1]); 6 | for (int i = 1; i < arr.size() - 1 ; ++i){ 7 | if (currentDifference != abs(arr[i] - arr[i + 1])) return false; 8 | } 9 | return true; 10 | } 11 | }; -------------------------------------------------------------------------------- /2044-count-number-of-maximum-bitwise-or-subsets/2044-count-number-of-maximum-bitwise-or-subsets.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int countMaxOrSubsets(vector& nums) { 4 | int max_or = 0; 5 | int dp[1<<17] = {1}; 6 | for (auto &num : nums){ 7 | for (int i = max_or ; i >= 0 ; i--){ 8 | dp[i|num] += dp[i]; 9 | } 10 | max_or |= num; 11 | } 12 | return dp[max_or]; 13 | } 14 | }; -------------------------------------------------------------------------------- /0605-can-place-flowers/0605-can-place-flowers.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | bool canPlaceFlowers(vector& flowerbed, int n) { 4 | 5 | for (int i = 0 ; i < flowerbed.size() ; i++) { 6 | if (flowerbed[i] == 1 || ((i - 1) >= 0 && flowerbed[i - 1] != 0) || ((i + 1) < flowerbed.size() && flowerbed[i + 1] != 0)) continue; 7 | flowerbed[i] = 1; 8 | n--; 9 | } 10 | 11 | return n <= 0; 12 | } 13 | }; -------------------------------------------------------------------------------- /2037-minimum-number-of-moves-to-seat-everyone/2037-minimum-number-of-moves-to-seat-everyone.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int minMovesToSeat(vector& seats, vector& students) { 4 | sort(seats.begin(), seats.end()); 5 | sort(students.begin(), students.end()); 6 | int ans = 0; 7 | for (int i = 0, j = 0; i < seats.size(); ++i, ++j) { 8 | ans += abs(seats[i] - students[j]); 9 | } 10 | return ans; 11 | } 12 | }; -------------------------------------------------------------------------------- /2264-largest-3-same-digit-number-in-string/2264-largest-3-same-digit-number-in-string.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | string largestGoodInteger(string num) { 4 | int result = -1; 5 | for (int i = 0; i + 2 < num.length(); i++) { 6 | if (num[i] == num[i + 1] && num[i] == num[i + 2]) { 7 | result = max(result, num[i] - '0'); 8 | } 9 | } 10 | return (result == -1) ? "" : string(3, '0' + result); 11 | } 12 | }; -------------------------------------------------------------------------------- /2980-check-if-bitwise-or-has-trailing-zeros/2980-check-if-bitwise-or-has-trailing-zeros.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | bool hasTrailingZeros(vector& nums) { 4 | int evenCount = 0; 5 | for (auto &num : nums) { 6 | if (!(num & 1)) { 7 | ++evenCount; 8 | } 9 | if (!(evenCount & 1) && evenCount > 0) { 10 | return true; 11 | } 12 | } 13 | return false; 14 | } 15 | }; -------------------------------------------------------------------------------- /0456-132-pattern/0456-132-pattern.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | bool find132pattern(vector& nums) { 4 | int s3 = INT_MIN; 5 | stack st; 6 | for(int i = nums.size() - 1; i >= 0; --i){ 7 | if(nums[i] < s3) return true; 8 | else while(!st.empty() && nums[i] > st.top()){ 9 | s3 = st.top(); st.pop(); 10 | } 11 | st.push(nums[i]); 12 | } 13 | return false; 14 | } 15 | }; -------------------------------------------------------------------------------- /0704-binary-search/0704-binary-search.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int search(vector& nums, int target) { 4 | int n = nums.size(); 5 | int left = 0,right = n-1; 6 | while (left <= right){ 7 | int mid = left + (right-left)/2; 8 | if (nums[mid] == target) return mid; 9 | if (nums[mid] < target) left = mid + 1; 10 | if (nums[mid] > target) right = mid-1; 11 | } 12 | return -1; 13 | } 14 | }; -------------------------------------------------------------------------------- /0779-k-th-symbol-in-grammar/0779-k-th-symbol-in-grammar.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int kthGrammar(int n, int k) { 4 | int ans = 0, l = 0, r = (1 << n) - 1, mid; 5 | while (l < r) { 6 | mid = l + (r - l) / 2; 7 | if (k - 1 <= mid) { 8 | r = mid; 9 | } 10 | else { 11 | l = ++mid; 12 | ans ^= 1; 13 | } 14 | } 15 | return ans; 16 | } 17 | }; -------------------------------------------------------------------------------- /1046-last-stone-weight/1046-last-stone-weight.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int lastStoneWeight(vector& stones) { 4 | priority_queue, less> pq(stones.begin(), stones.end()); 5 | 6 | while(pq.size() > 1){ 7 | int x = pq.top(); pq.pop(); 8 | int y = pq.top(); pq.pop(); 9 | if (x < y) pq.push(y-x); 10 | else pq.push(x-y); 11 | } 12 | return pq.top(); 13 | } 14 | }; -------------------------------------------------------------------------------- /704-binary-search/704-binary-search.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int search(vector& nums, int target) { 4 | int n = nums.size(); 5 | int left = 0,right = n-1; 6 | while (left <= right){ 7 | int mid = left + (right-left)/2; 8 | if (nums[mid] == target) return mid; 9 | if (nums[mid] < target) left = mid + 1; 10 | if (nums[mid] > target) right = mid-1; 11 | } 12 | return -1; 13 | } 14 | }; -------------------------------------------------------------------------------- /869-reordered-power-of-2/869-reordered-power-of-2.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | bool reorderedPowerOf2(int n) { 4 | string s=to_string(n); 5 | sort(s.begin(), s.end()); 6 | while(s[0]=='0') 7 | next_permutation(s.begin(), s.end()); 8 | do{ 9 | int temp=stoi(s); 10 | if(temp > 0 && !(temp & (temp-1)))return true; 11 | }while(next_permutation(s.begin(), s.end())); 12 | return false; 13 | } 14 | }; -------------------------------------------------------------------------------- /0058-length-of-last-word/0058-length-of-last-word.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int lengthOfLastWord(string s) { 4 | int count = 0, len = s.length(); 5 | for(int i = len - 1; i >= 0; i--){ 6 | if(s[i] == ' '){ 7 | if(count > 0){ 8 | return count; 9 | } 10 | } 11 | else{ 12 | count++; 13 | } 14 | } 15 | return count; 16 | } 17 | 18 | }; -------------------------------------------------------------------------------- /0621-task-scheduler/0621-task-scheduler.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int leastInterval(vector& tasks, int n) { 4 | unordered_mapmp; 5 | int count = 0; 6 | for(auto e : tasks) 7 | { 8 | mp[e]++; 9 | count = max(count, mp[e]); 10 | } 11 | 12 | int ans = (count-1)*(n+1); 13 | for(auto e : mp) if(e.second == count) ans++; 14 | return max((int)tasks.size(), ans); 15 | } 16 | }; -------------------------------------------------------------------------------- /3184-count-pairs-that-form-a-complete-day-i/3184-count-pairs-that-form-a-complete-day-i.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int countCompleteDayPairs(vector& hours) { 4 | int ans = 0; 5 | for (int i = 0; i < hours.size(); ++i) { 6 | for (int j = i + 1; j < hours.size(); ++j) { 7 | if ((hours[i] + hours[j]) % 24 == 0) { 8 | ++ans; 9 | } 10 | } 11 | } 12 | return ans; 13 | } 14 | }; -------------------------------------------------------------------------------- /0867-transpose-matrix/0867-transpose-matrix.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | vector> transpose(vector>& matrix) { 4 | vector> ans; 5 | 6 | for (int i = 0 ; i < matrix[0].size() ; i++){ 7 | vector tmp; 8 | for (int j = 0 ; j < matrix.size() ; j++){ 9 | tmp.push_back(matrix[j][i]); 10 | } 11 | ans.push_back(tmp); 12 | } 13 | return ans; 14 | } 15 | }; -------------------------------------------------------------------------------- /0974-subarray-sums-divisible-by-k/0974-subarray-sums-divisible-by-k.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int subarraysDivByK(vector& arr, int k) { 4 | int n = arr.size(); 5 | int ans = 0; 6 | vector pref(k, 0); 7 | int sum = 0; 8 | pref[0]++; 9 | for(int i = 0 ; i < n ; i++){ 10 | sum += arr[i]; 11 | int rem = (sum % k + k) % k; 12 | ans += pref[rem]; 13 | pref[rem]++; 14 | } 15 | return ans; 16 | } 17 | }; -------------------------------------------------------------------------------- /135-candy/135-candy.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int candy(vector& arr) { 4 | int cand[100001] = {0}; 5 | int n = arr.size(); 6 | for(int i = 1; i < n; i++) 7 | if(arr[i] > arr[i-1]) cand[i] = cand[i-1] + 1; 8 | for(int i = n-2; i>= 0; i--) 9 | if(arr[i] > arr[i+1]) cand[i] = max(cand[i], cand[i+1] + 1); 10 | int sum = n; 11 | for(int i = 0; i < n; i++) sum += cand[i]; 12 | return sum; 13 | } 14 | }; -------------------------------------------------------------------------------- /867-transpose-matrix/867-transpose-matrix.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | vector> transpose(vector>& matrix) { 4 | vector> ans; 5 | 6 | for (int i = 0 ; i < matrix[0].size() ; i++){ 7 | vector tmp; 8 | for (int j = 0 ; j < matrix.size() ; j++){ 9 | tmp.push_back(matrix[j][i]); 10 | } 11 | ans.push_back(tmp); 12 | } 13 | return ans; 14 | } 15 | }; -------------------------------------------------------------------------------- /0035-search-insert-position/0035-search-insert-position.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int searchInsert(vector& nums, int target) { 4 | int left =0; 5 | int right = nums.size()-1; 6 | while(left<= right){ 7 | int mid = left + (right-left)/2; 8 | if(nums[mid] == target) return mid; 9 | 10 | else if(nums[mid] > target) right = mid-1; 11 | else left = mid+1; 12 | 13 | } 14 | return left; 15 | } 16 | }; -------------------------------------------------------------------------------- /0041-first-missing-positive/0041-first-missing-positive.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int firstMissingPositive(vector& nums) { 4 | int n = nums.size(); 5 | for (int i = 0; i < n; i++) 6 | while (nums[i] > 0 && nums[i] <= n && nums[nums[i] - 1] != nums[i]) 7 | swap(nums[i], nums[nums[i] - 1]); 8 | for (int i = 0; i < n; i++) 9 | if (nums[i] != i + 1) 10 | return i + 1; 11 | return n + 1; 12 | } 13 | }; -------------------------------------------------------------------------------- /0237-delete-node-in-a-linked-list/0237-delete-node-in-a-linked-list.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Definition for singly-linked list. 3 | * struct ListNode { 4 | * int val; 5 | * ListNode *next; 6 | * ListNode(int x) : val(x), next(NULL) {} 7 | * }; 8 | */ 9 | class Solution { 10 | public: 11 | void deleteNode(ListNode* node) { 12 | //The idea is to copy the data from the node->next to node 13 | node->val = node->next->val; 14 | node->next = node->next->next; 15 | } 16 | }; -------------------------------------------------------------------------------- /0405-convert-a-number-to-hexadecimal/0405-convert-a-number-to-hexadecimal.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | string toHex(int num) { 4 | if (num == 0) { 5 | return "0"; 6 | } 7 | int HEXA = 16; 8 | string S = "0123456789abcdef"; 9 | unsigned int n = num; 10 | string res; 11 | 12 | while (n > 0) { 13 | res = S[n % HEXA] + res; 14 | n /= HEXA; 15 | } 16 | return res; 17 | } 18 | }; -------------------------------------------------------------------------------- /0790-domino-and-tromino-tiling/0790-domino-and-tromino-tiling.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | const int MOD = (1e9) + 7; 4 | int numTilings(int N) { 5 | vector dp(1001,0); 6 | dp[1] = 1; 7 | dp[2] = 2; 8 | dp[3] = 5; 9 | if(N <= 3) 10 | return dp[N]; 11 | for(int i = 4; i <= N; ++i){ 12 | dp[i] = 2 * dp[i - 1] + dp[i - 3]; 13 | dp[i] %= MOD; 14 | } 15 | return dp[N]; 16 | } 17 | }; -------------------------------------------------------------------------------- /1823-find-the-winner-of-the-circular-game/1823-find-the-winner-of-the-circular-game.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int findTheWinner(int n, int k) { 4 | queue q; 5 | for(int i=1;i<=n;++i){q.push(i);} 6 | while(q.size()>=2){ 7 | for(int i=0;i> divideArray(vector& nums, int k) { 4 | vector> ans; 5 | sort(nums.begin(), nums.end()); 6 | for(int i = 2; i < nums.size(); i += 3){ 7 | if(nums[i] - nums[i - 2] > k) return {}; 8 | ans.push_back({nums[i-2], nums[i-1], nums[i]}); 9 | } 10 | return ans; 11 | } 12 | }; -------------------------------------------------------------------------------- /1545-find-kth-bit-in-nth-binary-string/1545-find-kth-bit-in-nth-binary-string.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | char findKthBit(int n, int k) { 4 | if (n == 1) { 5 | return '0'; 6 | } 7 | int len = 1 << n; 8 | if (k == len / 2) { 9 | return '1'; 10 | } 11 | 12 | if (k < len / 2) { 13 | return findKthBit(n - 1, k); 14 | } 15 | return findKthBit(n - 1, len - k) == '1' ? '0' : '1'; 16 | } 17 | }; -------------------------------------------------------------------------------- /1614-maximum-nesting-depth-of-the-parentheses/1614-maximum-nesting-depth-of-the-parentheses.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int maxDepth(string s) { 4 | int ans = 0; 5 | int open = 0, closed = 0; 6 | for (auto &c : s) { 7 | if (c == '(') { 8 | ++open; 9 | } 10 | if (c == ')') { 11 | ++closed; 12 | } 13 | ans = max(ans, open - closed); 14 | } 15 | return ans; 16 | } 17 | }; -------------------------------------------------------------------------------- /2483-minimum-penalty-for-a-shop/2483-minimum-penalty-for-a-shop.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int bestClosingTime(string customers) { 4 | int max_score = 0, score = 0, best_hour = -1; 5 | for(int i = 0; i < customers.size(); ++i) { 6 | score += (customers[i] == 'Y') ? 1 : -1; 7 | if(score > max_score) { 8 | max_score = score; 9 | best_hour = i; 10 | } 11 | } 12 | return best_hour + 1; 13 | } 14 | }; -------------------------------------------------------------------------------- /0168-excel-sheet-column-title/0168-excel-sheet-column-title.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | string convertToTitle(int columnNumber) { 4 | int n = columnNumber; 5 | string ans; 6 | while (n > 0) { 7 | n--; 8 | auto [q, r] = div(n, 26); 9 | ans.push_back(char('A'+r)); 10 | n = q; 11 | } 12 | reverse(ans.begin(), ans.end()); // Reverse the ans string 13 | return ans; // Return the reversed ans string 14 | } 15 | }; -------------------------------------------------------------------------------- /0169-majority-element/0169-majority-element.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int majorityElement(vector& nums) { 4 | int count = 0; 5 | int majorNum = 0; 6 | for(auto num: nums) { 7 | if(count == 0) 8 | majorNum = num; 9 | 10 | if(num == majorNum) { 11 | count++; 12 | } else { 13 | count--; 14 | } 15 | } 16 | 17 | return majorNum; 18 | } 19 | }; -------------------------------------------------------------------------------- /0762-prime-number-of-set-bits-in-binary-representation/0762-prime-number-of-set-bits-in-binary-representation.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int countPrimeSetBits(int left, int right) { 4 | int ans = 0; 5 | set s = {2, 3, 5, 7, 11, 13, 17, 19}; 6 | for (int i = left ; i <= right ; i++){ 7 | int cnt = __builtin_popcount(i); 8 | if (s.find(cnt) != s.end()){ 9 | ans++; 10 | } 11 | } 12 | return ans; 13 | } 14 | }; -------------------------------------------------------------------------------- /1833-maximum-ice-cream-bars/1833-maximum-ice-cream-bars.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int maxIceCream(vector& costs, int coins) { 4 | sort(costs.begin(),costs.end()); 5 | int n=costs.size(); 6 | for (int i = 0; i = costs[i]) 9 | coins -= costs[i];//update the coins value 10 | else 11 | return i;//we can't purchase anymore so will return ans 12 | return n; 13 | } 14 | }; -------------------------------------------------------------------------------- /2145-grid-game/2145-grid-game.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | long long gridGame(vector>& grid) { 4 | long long ans = LONG_LONG_MAX; 5 | long long fir = 0LL, sec = 0LL; 6 | for (auto &cell : grid[0]) { 7 | fir += cell; 8 | } 9 | for (int i = 0; i < grid[0].size(); ++i) { 10 | fir -= grid[0][i]; 11 | ans = min(ans, max(fir, sec)); 12 | sec += grid[1][i]; 13 | } 14 | return ans; 15 | } 16 | }; -------------------------------------------------------------------------------- /2348-number-of-zero-filled-subarrays/2348-number-of-zero-filled-subarrays.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | long long zeroFilledSubarray(vector& nums) { 4 | long long ans = 0; 5 | long long cnt = 0; 6 | for (int i = 0 ; i < nums.size() ; i++) { 7 | if (!nums[i]) { 8 | cnt++; 9 | ans += cnt; 10 | } 11 | else { 12 | cnt = 0; 13 | } 14 | } 15 | return ans; 16 | } 17 | }; -------------------------------------------------------------------------------- /2441-largest-positive-integer-that-exists-with-its-negative/2441-largest-positive-integer-that-exists-with-its-negative.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int findMaxK(vector& nums) { 4 | uint8_t seen[1001]={0}; 5 | int k=-1; 6 | for(int x:nums){ 7 | if (x<0) { 8 | x=-x; 9 | seen[x]|=2; 10 | } 11 | else seen[x]|=1; 12 | if (seen[x]==3 && x>k) k=x; 13 | } 14 | return k; 15 | } 16 | }; -------------------------------------------------------------------------------- /2533-bitwise-xor-of-all-pairings/2533-bitwise-xor-of-all-pairings.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int xorAllNums(vector& nums1, vector& nums2) { 4 | int n = nums1.size(), m = nums2.size(); 5 | int secondXor = 0; 6 | for (auto &x : nums2) { 7 | secondXor ^= x; 8 | } 9 | int ans = 0; 10 | for (auto &x : nums1) { 11 | if (m & 1) ans ^= x; 12 | ans ^= secondXor; 13 | } 14 | return ans; 15 | } 16 | }; -------------------------------------------------------------------------------- /2958-length-of-longest-subarray-with-at-most-k-frequency/2958-length-of-longest-subarray-with-at-most-k-frequency.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int maxSubarrayLength(vector& nums, int k) { 4 | unordered_map freq; 5 | int ans = 0; 6 | for(int i = 0, j = 0; j < nums.size(); ++j){ 7 | freq[nums[j]]++; 8 | while(freq[nums[j]] > k){ 9 | freq[nums[i]]--; i++; 10 | } 11 | ans = max(ans, j - i + 1); 12 | } 13 | return ans; 14 | } 15 | }; -------------------------------------------------------------------------------- /0389-find-the-difference/0389-find-the-difference.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int freq[26]; 4 | char findTheDifference(string s, string t) { 5 | for (auto &c : s) { 6 | ++freq[c - 'a']; 7 | } 8 | for (auto &c : t) { 9 | --freq[c - 'a']; 10 | } 11 | 12 | for (int i = 0 ; i < 26 ; ++i) { 13 | if (freq[i] != 0) { 14 | return i + 'a'; 15 | } 16 | } 17 | return 'a'; 18 | } 19 | }; -------------------------------------------------------------------------------- /0477-total-hamming-distance/0477-total-hamming-distance.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int totalHammingDistance(vector& nums) { 4 | int ans = 0; 5 | int n = nums.size(); 6 | for (int i = 0 ; i < 32 ; i++) { 7 | int cnt = 0; 8 | for (auto &num : nums) { 9 | if (num & (1< q; 3 | public: 4 | RecentCounter() { 5 | } 6 | 7 | int ping(int t) { 8 | q.push(t); 9 | while (!q.empty() && q.front() < t-3000) { 10 | q.pop(); 11 | } 12 | return q.size(); 13 | } 14 | 15 | }; 16 | 17 | /** 18 | * Your RecentCounter object will be instantiated and called as such: 19 | * RecentCounter* obj = new RecentCounter(); 20 | * int param_1 = obj->ping(t); 21 | */ -------------------------------------------------------------------------------- /1323-maximum-69-number/1323-maximum-69-number.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int maximum69Number (int num) { 4 | string n = to_string(num); 5 | string r; 6 | bool is_change = false; 7 | for (auto i : n) { 8 | if (i == '6' && is_change == false) { 9 | r += '9'; 10 | is_change = true; 11 | } 12 | else 13 | r += i; 14 | } 15 | int res = stoi(r); 16 | return res; 17 | } 18 | }; -------------------------------------------------------------------------------- /1404-number-of-steps-to-reduce-a-number-in-binary-representation-to-one/1404-number-of-steps-to-reduce-a-number-in-binary-representation-to-one.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int numSteps(string s) { 4 | int n = s.length(); 5 | int ans = n - 1, carry = 0; 6 | 7 | for (int i = n - 1; i > 0; i--) { 8 | if (s[i] - '0' + carry == 1) { 9 | ans++; 10 | carry = 1; 11 | } 12 | } 13 | 14 | return ans + carry; 15 | } 16 | }; -------------------------------------------------------------------------------- /1657-determine-if-two-strings-are-close/1657-determine-if-two-strings-are-close.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | bool closeStrings(string word1, string word2) { 4 | vectorw1(26,0),w2(26,0),w3(26,0),w4(26,0); 5 | for(char c:word1) 6 | w1[c-'a']++,w3[c-'a'] = 1; 7 | 8 | for(char c:word2) 9 | w2[c-'a']++,w4[c-'a'] = 1; 10 | 11 | sort(begin(w1),end(w1)); 12 | sort(begin(w2),end(w2)); 13 | return w1==w2&&w3==w4; 14 | } 15 | }; -------------------------------------------------------------------------------- /2294-partition-array-such-that-maximum-difference-is-k/2294-partition-array-such-that-maximum-difference-is-k.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int partitionArray(vector& nums, int k) { 4 | sort(nums.begin(), nums.end()); 5 | int mn = nums[0]; 6 | int ans = 1; 7 | for (int i = 1 ; i < nums.size() ; i++){ 8 | if (nums[i] - mn > k){ 9 | mn = nums[i]; 10 | ans++; 11 | } 12 | } 13 | return ans; 14 | } 15 | }; -------------------------------------------------------------------------------- /2749-minimum-operations-to-make-the-integer-zero/2749-minimum-operations-to-make-the-integer-zero.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int makeTheIntegerZero(int num1, int num2) { 4 | if (num1 < num2) 5 | return -1; 6 | for (int k = 0 ; k <= 60 ; ++k) { 7 | long long sum = (long long)num1 - (long long)num2 * k; 8 | if (k <= sum && __builtin_popcountll(sum) <= k) { 9 | return k; 10 | } 11 | } 12 | return -1; 13 | } 14 | }; -------------------------------------------------------------------------------- /2914-minimum-number-of-changes-to-make-binary-string-beautiful/2914-minimum-number-of-changes-to-make-binary-string-beautiful.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int minChanges(string s) { 4 | if (s.size() == 2) { 5 | return s[0] != s[1]; 6 | } 7 | int n = s.size(); 8 | int ans = 0; 9 | for (int i = 0; i < n - 1; i += 2) { 10 | if (s[i] != s[i + 1]) { 11 | ++ans; 12 | } 13 | } 14 | return ans; 15 | } 16 | }; -------------------------------------------------------------------------------- /2971-find-polygon-with-the-largest-perimeter/2971-find-polygon-with-the-largest-perimeter.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | long long largestPerimeter(vector& nums) { 4 | sort(nums.begin(), nums.end()); 5 | long long sum = 0; 6 | for(int i = 0; i < nums.size(); ++i) sum += nums[i]; 7 | for(int i = nums.size()-1; i >= 2; --i){ 8 | sum -= nums[i]; 9 | if(nums[i] < sum) return sum + (long long)nums[i]; 10 | } 11 | return -1; 12 | } 13 | }; -------------------------------------------------------------------------------- /1-two-sum/1-two-sum.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | vector twoSum(vector& nums, int target) { 4 | int n = nums.size(); 5 | unordered_map ma; 6 | 7 | for (int i = 0 ; i < n; i ++){ 8 | if (ma.find(nums[i]) != ma.end()){ 9 | return vector {ma[nums[i]], i}; 10 | } 11 | else { 12 | ma[target - nums[i]] = i; 13 | } 14 | } 15 | return vector {0, 0}; 16 | } 17 | }; -------------------------------------------------------------------------------- /1207-unique-number-of-occurrences/1207-unique-number-of-occurrences.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | bool uniqueOccurrences(vector& arr) { 4 | unordered_map ma; 5 | unordered_set ss; 6 | for (auto &a : arr){ 7 | ma[a]++; 8 | } 9 | for (auto &m : ma){ 10 | if (ss.find(m.second) != ss.end()){ 11 | return false; 12 | } 13 | ss.insert(m.second); 14 | } 15 | return true; 16 | } 17 | }; -------------------------------------------------------------------------------- /1356-sort-integers-by-the-number-of-1-bits/1356-sort-integers-by-the-number-of-1-bits.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | static bool cmp(int a,int b){ 3 | int resulta = __builtin_popcount(a); 4 | int resultb = __builtin_popcount(b); 5 | if(resultb == resulta){ 6 | return a < b; 7 | } 8 | return resultb > resulta; 9 | } 10 | public: 11 | vector sortByBits(vector& arr) { 12 | sort(arr.begin(), arr.end(), cmp); 13 | return arr; 14 | } 15 | }; -------------------------------------------------------------------------------- /1637-widest-vertical-area-between-two-points-containing-no-points/1637-widest-vertical-area-between-two-points-containing-no-points.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int maxWidthOfVerticalArea(vector>& points) { 4 | set s; 5 | int res = 0; 6 | for (auto i : points) { 7 | s.insert(i[0]); 8 | } 9 | for (auto it = next(begin(s)); it != end(s); ++it) { 10 | res = max(res, *it - *prev(it)); 11 | } 12 | return res; 13 | } 14 | }; -------------------------------------------------------------------------------- /1878-check-if-array-is-sorted-and-rotated/1878-check-if-array-is-sorted-and-rotated.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | bool check(vector& nums) { 4 | int n = nums.size(); 5 | if (n <= 1) return true; 6 | int cnt = 0; 7 | for (int i = 1; i < n; ++i) { 8 | if (nums[i] < nums[i - 1]) { 9 | ++cnt; 10 | } 11 | } 12 | if (nums[0] < nums[n - 1]) { 13 | ++cnt; 14 | } 15 | 16 | return cnt <= 1; 17 | } 18 | }; -------------------------------------------------------------------------------- /1927-maximum-ascending-subarray-sum/1927-maximum-ascending-subarray-sum.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int maxAscendingSum(vector& nums) { 4 | int cur = nums[0], ans = -1; 5 | for (int i = 1; i < nums.size(); ++i) { 6 | if (nums[i - 1] < nums[i]) { 7 | cur += nums[i]; 8 | } 9 | else { 10 | ans = max(ans, cur); 11 | cur = nums[i]; 12 | } 13 | } 14 | return max(ans, cur); 15 | } 16 | }; -------------------------------------------------------------------------------- /0003-longest-substring-without-repeating-characters/0003-longest-substring-without-repeating-characters.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int lengthOfLongestSubstring(string s) { 4 | vector dict(256, -1); 5 | int maxLen = 0, start = -1; 6 | for (int i = 0; i != s.length(); i++) { 7 | if (dict[s[i]] > start) 8 | start = dict[s[i]]; 9 | dict[s[i]] = i; 10 | maxLen = max(maxLen, i - start); 11 | } 12 | return maxLen; 13 | } 14 | }; -------------------------------------------------------------------------------- /0078-subsets/0078-subsets.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | vector> subsets(vector& nums) { 4 | vector> ans; 5 | int n = nums.size(); 6 | for (int i = 0 ; i < (1< cur; 8 | for (int j = 0 ; j < n ; j++){ 9 | if ((1< getRow(int rowIndex) { 4 | vector > dp(rowIndex+1); 5 | dp[0].push_back(1); 6 | 7 | for(int i=1; i<=rowIndex; i++){ 8 | dp[i].push_back(1); 9 | for(int j=1; j singleNumber(vector& nums) { 4 | int XOR=accumulate(nums.begin(), nums.end(), 0, bit_xor<>()); 5 | int i=0; 6 | while (((XOR >> i) & 1) == 0) 7 | i++; 8 | int A=0, B=0; 9 | for(int x: nums){ 10 | if (((x >> i) & 1) == 0) 11 | A^=x; 12 | else 13 | B^=x; 14 | } 15 | return {A, B}; 16 | } 17 | }; 18 | -------------------------------------------------------------------------------- /0264-ugly-number-ii/0264-ugly-number-ii.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int nthUglyNumber(int n) { 4 | int dp[n]; 5 | dp[0]=1; 6 | int a=0,b=0,c=0; 7 | for(int i=1;i& nums, int k) { 4 | map sumFreq; 5 | sumFreq[0] = 1; // Empty sub-array 6 | int sum = 0, ans = 0; 7 | for (auto & num : nums) { 8 | sum += num; 9 | if (sumFreq.find(sum - k) != sumFreq.end()) { 10 | ans += sumFreq[sum - k]; 11 | } 12 | sumFreq[sum]++; 13 | } 14 | return ans; 15 | } 16 | }; -------------------------------------------------------------------------------- /2053-kth-distinct-string-in-an-array/2053-kth-distinct-string-in-an-array.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | string kthDistinct(vector& arr, int k) { 4 | unordered_map ma; 5 | for (auto &s : arr){ 6 | ma[s]++; 7 | } 8 | for (auto &s : arr){ 9 | if (ma[s] == 1){ 10 | k--; 11 | if (k == 0){ 12 | return s; 13 | } 14 | } 15 | } 16 | return ""; 17 | } 18 | }; -------------------------------------------------------------------------------- /0287-find-the-duplicate-number/0287-find-the-duplicate-number.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int findDuplicate(vector& nums) { 4 | int fast = nums[0], slow = nums[0]; 5 | while (true){ 6 | fast = nums[nums[fast]]; 7 | slow = nums[slow]; 8 | if (fast == slow) break; 9 | } 10 | slow = nums[0]; 11 | while (fast != slow){ 12 | slow = nums[slow]; 13 | fast = nums[fast]; 14 | } 15 | return fast; 16 | } 17 | }; -------------------------------------------------------------------------------- /0678-valid-parenthesis-string/0678-valid-parenthesis-string.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | bool checkValidString(string s) { 4 | int cmin = 0, cmax = 0; 5 | for (char c : s) { 6 | if (c == '(') 7 | cmax++, cmin++; 8 | if (c == ')') 9 | cmax--, cmin = max(cmin - 1, 0); 10 | if (c == '*') 11 | cmax++, cmin = max(cmin - 1, 0); 12 | if (cmax < 0) return false; 13 | } 14 | return cmin == 0; 15 | } 16 | }; --------------------------------------------------------------------------------