├── 0012-integer-to-roman ├── 0012-integer-to-roman.cpp ├── NOTES.md └── README.md ├── 0036-valid-sudoku ├── 0036-valid-sudoku.cpp ├── NOTES.md └── README.md ├── 0038-count-and-say ├── 0038-count-and-say.cpp ├── NOTES.md └── README.md ├── 0049-group-anagrams ├── 0049-group-anagrams.cpp └── NOTES.md ├── 0076-minimum-window-substring ├── 0076-minimum-window-substring.cpp ├── NOTES.md └── README.md ├── 0079-word-search ├── 0079-word-search.cpp ├── NOTES.md └── README.md ├── 0134-gas-station ├── NOTES.md └── README.md ├── 0151-reverse-words-in-a-string ├── 0151-reverse-words-in-a-string.cpp ├── NOTES.md └── README.md ├── 0219-contains-duplicate-ii ├── 0219-contains-duplicate-ii.cpp ├── NOTES.md └── README.md ├── 0222-count-complete-tree-nodes ├── 0222-count-complete-tree-nodes.cpp └── README.md ├── 0223-rectangle-area ├── 0223-rectangle-area.cpp └── README.md ├── 0224-basic-calculator ├── 0224-basic-calculator.cpp ├── NOTES.md └── README.md ├── 0237-delete-node-in-a-linked-list ├── 0237-delete-node-in-a-linked-list.cpp ├── NOTES.md └── README.md ├── 0263-ugly-number ├── 0263-ugly-number.cpp └── README.md ├── 0273-integer-to-english-words ├── 0273-integer-to-english-words.cpp ├── NOTES.md └── README.md ├── 0279-perfect-squares ├── NOTES.md └── README.md ├── 0295-find-median-from-data-stream ├── 0295-find-median-from-data-stream.cpp └── README.md ├── 0345-reverse-vowels-of-a-string ├── 0345-reverse-vowels-of-a-string.cpp ├── NOTES.md └── README.md ├── 0374-guess-number-higher-or-lower ├── 0374-guess-number-higher-or-lower.cpp └── README.md ├── 0452-minimum-number-of-arrows-to-burst-balloons ├── 0452-minimum-number-of-arrows-to-burst-balloons.cpp ├── NOTES.md └── README.md ├── 0500-keyboard-row ├── 0500-keyboard-row.cpp ├── NOTES.md └── README.md ├── 0523-continuous-subarray-sum ├── 0523-continuous-subarray-sum.cpp ├── NOTES.md └── README.md ├── 0587-erect-the-fence ├── 0587-erect-the-fence.cpp ├── NOTES.md └── README.md ├── 0632-smallest-range-covering-elements-from-k-lists ├── 0632-smallest-range-covering-elements-from-k-lists.cpp ├── NOTES.md └── README.md ├── 0645-set-mismatch ├── 0645-set-mismatch.cpp └── README.md ├── 0692-top-k-frequent-words ├── 0692-top-k-frequent-words.cpp └── README.md ├── 0766-toeplitz-matrix ├── 0766-toeplitz-matrix.cpp ├── NOTES.md └── README.md ├── 0835-image-overlap ├── 0835-image-overlap.cpp ├── NOTES.md └── README.md ├── 0880-decoded-string-at-index ├── 0880-decoded-string-at-index.cpp ├── NOTES.md └── README.md ├── 0901-online-stock-span ├── 0901-online-stock-span.cpp ├── NOTES.md └── README.md ├── 0934-shortest-bridge ├── 0934-shortest-bridge.cpp ├── NOTES.md └── README.md ├── 0945-minimum-increment-to-make-array-unique ├── 0945-minimum-increment-to-make-array-unique.cpp ├── NOTES.md └── README.md ├── 0976-largest-perimeter-triangle ├── 0976-largest-perimeter-triangle.cpp ├── NOTES.md └── README.md ├── 10-regular-expression-matching ├── 10-regular-expression-matching.cpp ├── NOTES.md └── README.md ├── 100-same-tree ├── 100-same-tree.cpp ├── NOTES.md └── README.md ├── 1001-grid-illumination ├── 1001-grid-illumination.cpp ├── NOTES.md └── README.md ├── 1003-check-if-word-is-valid-after-substitutions ├── NOTES.md └── README.md ├── 1008-construct-binary-search-tree-from-preorder-traversal ├── 1008-construct-binary-search-tree-from-preorder-traversal.cpp ├── NOTES.md └── README.md ├── 1009-complement-of-base-10-integer ├── 1009-complement-of-base-10-integer.cpp ├── NOTES.md └── README.md ├── 1012-numbers-with-repeated-digits ├── 1012-numbers-with-repeated-digits.cpp ├── NOTES.md └── README.md ├── 1013-partition-array-into-three-parts-with-equal-sum ├── 1013-partition-array-into-three-parts-with-equal-sum.cpp ├── NOTES.md └── README.md ├── 1017-convert-to-base-2 ├── 1017-convert-to-base-2.cpp ├── NOTES.md └── README.md ├── 1018-binary-prefix-divisible-by-5 ├── 1018-binary-prefix-divisible-by-5.cpp ├── NOTES.md └── README.md ├── 1019-next-greater-node-in-linked-list ├── 1019-next-greater-node-in-linked-list.cpp ├── NOTES.md └── README.md ├── 102-binary-tree-level-order-traversal ├── 102-binary-tree-level-order-traversal.cpp └── NOTES.md ├── 1022-sum-of-root-to-leaf-binary-numbers ├── 1022-sum-of-root-to-leaf-binary-numbers.cpp ├── NOTES.md └── README.md ├── 1023-camelcase-matching ├── 1023-camelcase-matching.cpp ├── NOTES.md └── README.md ├── 1024-video-stitching ├── 1024-video-stitching.cpp └── NOTES.md ├── 1025-divisor-game ├── 1025-divisor-game.cpp ├── NOTES.md └── README.md ├── 1028-recover-a-tree-from-preorder-traversal ├── 1028-recover-a-tree-from-preorder-traversal.cpp ├── NOTES.md └── README.md ├── 103-binary-tree-zigzag-level-order-traversal ├── 103-binary-tree-zigzag-level-order-traversal.cpp ├── NOTES.md └── README.md ├── 1030-matrix-cells-in-distance-order ├── 1030-matrix-cells-in-distance-order.cpp ├── NOTES.md └── README.md ├── 1033-moving-stones-until-consecutive ├── 1033-moving-stones-until-consecutive.cpp ├── NOTES.md └── README.md ├── 1038-binary-search-tree-to-greater-sum-tree ├── 1038-binary-search-tree-to-greater-sum-tree.cpp ├── NOTES.md └── README.md ├── 104-maximum-depth-of-binary-tree ├── 104-maximum-depth-of-binary-tree.cpp ├── NOTES.md └── README.md ├── 1041-robot-bounded-in-circle ├── 1041-robot-bounded-in-circle.cpp ├── NOTES.md └── README.md ├── 1043-partition-array-for-maximum-sum ├── 1043-partition-array-for-maximum-sum.cpp ├── NOTES.md └── README.md ├── 1044-longest-duplicate-substring ├── 1044-longest-duplicate-substring.cpp ├── NOTES.md └── README.md ├── 1046-last-stone-weight ├── 1046-last-stone-weight.cpp ├── NOTES.md └── README.md ├── 1048-longest-string-chain ├── 1048-longest-string-chain.cpp ├── NOTES.md └── README.md ├── 105-construct-binary-tree-from-preorder-and-inorder-traversal ├── 105-construct-binary-tree-from-preorder-and-inorder-traversal.cpp ├── NOTES.md └── README.md ├── 1055-shortest-way-to-form-string ├── 1055-shortest-way-to-form-string.cpp ├── NOTES.md └── README.md ├── 1057-campus-bikes ├── 1057-campus-bikes.cpp ├── NOTES.md └── README.md ├── 1060-missing-element-in-sorted-array ├── 1060-missing-element-in-sorted-array.cpp ├── NOTES.md └── README.md ├── 1062-longest-repeating-substring ├── 1062-longest-repeating-substring.cpp ├── NOTES.md └── README.md ├── 1066-campus-bikes-ii ├── 1066-campus-bikes-ii.cpp ├── NOTES.md └── README.md ├── 1072-flip-columns-for-maximum-number-of-equal-rows ├── 1072-flip-columns-for-maximum-number-of-equal-rows.cpp ├── NOTES.md └── README.md ├── 1074-number-of-submatrices-that-sum-to-target ├── 1074-number-of-submatrices-that-sum-to-target.cpp ├── NOTES.md └── README.md ├── 108-convert-sorted-array-to-binary-search-tree ├── 108-convert-sorted-array-to-binary-search-tree.cpp ├── NOTES.md └── README.md ├── 1087-brace-expansion ├── 1087-brace-expansion.cpp ├── NOTES.md └── README.md ├── 1089-duplicate-zeros ├── 1089-duplicate-zeros.cpp ├── NOTES.md └── README.md ├── 1091-shortest-path-in-binary-matrix ├── 1091-shortest-path-in-binary-matrix.cpp ├── NOTES.md └── README.md ├── 1093-statistics-from-a-large-sample ├── 1093-statistics-from-a-large-sample.cpp ├── NOTES.md └── README.md ├── 1094-car-pooling ├── 1094-car-pooling.cpp ├── NOTES.md └── README.md ├── 1095-find-in-mountain-array ├── 1095-find-in-mountain-array.cpp ├── NOTES.md └── README.md ├── 11-container-with-most-water ├── 11-container-with-most-water.cpp ├── NOTES.md └── README.md ├── 110-balanced-binary-tree ├── 110-balanced-binary-tree.cpp ├── NOTES.md └── README.md ├── 1102-path-with-maximum-minimum-value ├── 1102-path-with-maximum-minimum-value.cpp ├── NOTES.md └── README.md ├── 1105-filling-bookcase-shelves ├── 1105-filling-bookcase-shelves.cpp ├── NOTES.md └── README.md ├── 1109-corporate-flight-bookings ├── 1109-corporate-flight-bookings.cpp ├── NOTES.md └── README.md ├── 111-minimum-depth-of-binary-tree ├── 111-minimum-depth-of-binary-tree.cpp ├── NOTES.md └── README.md ├── 112-path-sum ├── 112-path-sum.cpp ├── NOTES.md └── README.md ├── 1123-lowest-common-ancestor-of-deepest-leaves ├── 1123-lowest-common-ancestor-of-deepest-leaves.cpp ├── NOTES.md └── README.md ├── 1124-longest-well-performing-interval ├── 1124-longest-well-performing-interval.cpp ├── NOTES.md └── README.md ├── 1129-shortest-path-with-alternating-colors ├── 1129-shortest-path-with-alternating-colors.cpp ├── NOTES.md └── README.md ├── 113-path-sum-ii ├── NOTES.md └── README.md ├── 1130-minimum-cost-tree-from-leaf-values ├── 1130-minimum-cost-tree-from-leaf-values.cpp ├── NOTES.md └── README.md ├── 1131-maximum-of-absolute-value-expression ├── 1131-maximum-of-absolute-value-expression.cpp ├── NOTES.md └── README.md ├── 1135-connecting-cities-with-minimum-cost ├── 1135-connecting-cities-with-minimum-cost.cpp ├── NOTES.md └── README.md ├── 114-flatten-binary-tree-to-linked-list ├── NOTES.md └── README.md ├── 1145-binary-tree-coloring-game ├── 1145-binary-tree-coloring-game.cpp ├── NOTES.md └── README.md ├── 1146-snapshot-array ├── 1146-snapshot-array.cpp ├── NOTES.md └── README.md ├── 1148-article-views-i ├── 1148-article-views-i.sql ├── NOTES.md └── README.md ├── 115-distinct-subsequences ├── 115-distinct-subsequences.cpp ├── NOTES.md └── README.md ├── 1151-minimum-swaps-to-group-all-1s-together ├── 1151-minimum-swaps-to-group-all-1s-together.cpp ├── NOTES.md └── README.md ├── 1155-number-of-dice-rolls-with-target-sum ├── 1155-number-of-dice-rolls-with-target-sum.cpp └── NOTES.md ├── 1157-online-majority-element-in-subarray ├── 1157-online-majority-element-in-subarray.cpp ├── NOTES.md └── README.md ├── 1161-maximum-level-sum-of-a-binary-tree ├── 1161-maximum-level-sum-of-a-binary-tree.cpp ├── NOTES.md └── README.md ├── 1163-last-substring-in-lexicographical-order ├── 1163-last-substring-in-lexicographical-order.cpp ├── NOTES.md └── README.md ├── 1166-design-file-system ├── 1166-design-file-system.cpp ├── NOTES.md └── README.md ├── 1168-optimize-water-distribution-in-a-village ├── 1168-optimize-water-distribution-in-a-village.cpp ├── NOTES.md └── README.md ├── 117-populating-next-right-pointers-in-each-node-ii ├── 117-populating-next-right-pointers-in-each-node-ii.cpp ├── NOTES.md └── README.md ├── 1177-can-make-palindrome-from-substring ├── 1177-can-make-palindrome-from-substring.cpp ├── NOTES.md └── README.md ├── 118-pascals-triangle ├── NOTES.md └── README.md ├── 1182-shortest-distance-to-target-color ├── 1182-shortest-distance-to-target-color.cpp ├── NOTES.md └── README.md ├── 1187-make-array-strictly-increasing ├── 1187-make-array-strictly-increasing.cpp ├── NOTES.md └── README.md ├── 1192-critical-connections-in-a-network ├── 1192-critical-connections-in-a-network.cpp ├── NOTES.md └── README.md ├── 1197-minimum-knight-moves ├── 1197-minimum-knight-moves.cpp ├── NOTES.md └── README.md ├── 12-integer-to-roman ├── 12-integer-to-roman.cpp ├── NOTES.md └── README.md ├── 120-triangle ├── NOTES.md └── README.md ├── 1207-unique-number-of-occurrences ├── 1207-unique-number-of-occurrences.cpp ├── NOTES.md └── README.md ├── 1208-get-equal-substrings-within-budget ├── 1208-get-equal-substrings-within-budget.cpp ├── NOTES.md └── README.md ├── 121-best-time-to-buy-and-sell-stock ├── 121-best-time-to-buy-and-sell-stock.cpp ├── NOTES.md └── README.md ├── 1217-minimum-cost-to-move-chips-to-the-same-position ├── 1217-minimum-cost-to-move-chips-to-the-same-position.cpp ├── NOTES.md └── README.md ├── 1218-longest-arithmetic-subsequence-of-given-difference ├── 1218-longest-arithmetic-subsequence-of-given-difference.cpp ├── NOTES.md └── README.md ├── 1219-path-with-maximum-gold ├── 1219-path-with-maximum-gold.cpp ├── NOTES.md └── README.md ├── 122-best-time-to-buy-and-sell-stock-ii ├── 122-best-time-to-buy-and-sell-stock-ii.cpp └── NOTES.md ├── 1220-count-vowels-permutation ├── NOTES.md └── README.md ├── 1229-meeting-scheduler ├── 1229-meeting-scheduler.cpp ├── NOTES.md └── README.md ├── 123-best-time-to-buy-and-sell-stock-iii ├── 123-best-time-to-buy-and-sell-stock-iii.cpp ├── NOTES.md └── README.md ├── 1231-divide-chocolate ├── 1231-divide-chocolate.cpp ├── NOTES.md └── README.md ├── 1233-remove-sub-folders-from-the-filesystem ├── 1233-remove-sub-folders-from-the-filesystem.cpp ├── NOTES.md └── README.md ├── 1235-maximum-profit-in-job-scheduling ├── 1235-maximum-profit-in-job-scheduling.cpp ├── NOTES.md └── README.md ├── 1239-maximum-length-of-a-concatenated-string-with-unique-characters ├── 1239-maximum-length-of-a-concatenated-string-with-unique-characters.cpp ├── NOTES.md └── README.md ├── 124-binary-tree-maximum-path-sum ├── 124-binary-tree-maximum-path-sum.cpp ├── NOTES.md └── README.md ├── 1245-tree-diameter ├── 1245-tree-diameter.cpp ├── NOTES.md └── README.md ├── 1247-minimum-swaps-to-make-strings-equal ├── 1247-minimum-swaps-to-make-strings-equal.cpp ├── NOTES.md └── README.md ├── 1248-count-number-of-nice-subarrays ├── 1248-count-number-of-nice-subarrays.cpp ├── NOTES.md └── README.md ├── 1249-minimum-remove-to-make-valid-parentheses ├── 1249-minimum-remove-to-make-valid-parentheses.cpp ├── NOTES.md └── README.md ├── 125-valid-palindrome ├── 125-valid-palindrome.cpp ├── NOTES.md └── README.md ├── 1250-check-if-it-is-a-good-array ├── 1250-check-if-it-is-a-good-array.cpp ├── NOTES.md └── README.md ├── 1253-reconstruct-a-2-row-binary-matrix ├── 1253-reconstruct-a-2-row-binary-matrix.cpp ├── NOTES.md └── README.md ├── 1255-maximum-score-words-formed-by-letters ├── 1255-maximum-score-words-formed-by-letters.cpp └── NOTES.md ├── 1257-smallest-common-region ├── 1257-smallest-common-region.cpp ├── NOTES.md └── README.md ├── 126-word-ladder-ii ├── 126-word-ladder-ii.cpp ├── NOTES.md └── README.md ├── 1260-shift-2d-grid ├── 1260-shift-2d-grid.cpp ├── NOTES.md └── README.md ├── 1261-find-elements-in-a-contaminated-binary-tree ├── 1261-find-elements-in-a-contaminated-binary-tree.cpp ├── NOTES.md └── README.md ├── 1266-minimum-time-visiting-all-points ├── 1266-minimum-time-visiting-all-points.cpp ├── NOTES.md └── README.md ├── 1267-count-servers-that-communicate ├── 1267-count-servers-that-communicate.cpp ├── NOTES.md └── README.md ├── 1268-search-suggestions-system ├── 1268-search-suggestions-system.cpp ├── NOTES.md └── README.md ├── 127-word-ladder ├── 127-word-ladder.cpp ├── NOTES.md └── README.md ├── 1273-delete-tree-nodes ├── 1273-delete-tree-nodes.cpp └── README.md ├── 1277-count-square-submatrices-with-all-ones ├── 1277-count-square-submatrices-with-all-ones.cpp ├── NOTES.md └── README.md ├── 128-longest-consecutive-sequence ├── 128-longest-consecutive-sequence.cpp ├── NOTES.md └── README.md ├── 1282-group-the-people-given-the-group-size-they-belong-to ├── 1282-group-the-people-given-the-group-size-they-belong-to.cpp ├── NOTES.md └── README.md ├── 1284-minimum-number-of-flips-to-convert-binary-matrix-to-zero-matrix ├── 1284-minimum-number-of-flips-to-convert-binary-matrix-to-zero-matrix.cpp ├── NOTES.md └── README.md ├── 1287-element-appearing-more-than-25-in-sorted-array ├── 1287-element-appearing-more-than-25-in-sorted-array.cpp ├── NOTES.md └── README.md ├── 1288-remove-covered-intervals ├── 1288-remove-covered-intervals.cpp ├── NOTES.md └── README.md ├── 1290-convert-binary-number-in-a-linked-list-to-integer ├── 1290-convert-binary-number-in-a-linked-list-to-integer.cpp ├── NOTES.md └── README.md ├── 1291-sequential-digits ├── 1291-sequential-digits.cpp ├── NOTES.md └── README.md ├── 1293-shortest-path-in-a-grid-with-obstacles-elimination ├── 1293-shortest-path-in-a-grid-with-obstacles-elimination.cpp ├── NOTES.md └── README.md ├── 1296-divide-array-in-sets-of-k-consecutive-numbers ├── 1296-divide-array-in-sets-of-k-consecutive-numbers.cpp ├── NOTES.md └── README.md ├── 1297-maximum-number-of-occurrences-of-a-substring ├── 1297-maximum-number-of-occurrences-of-a-substring.cpp ├── NOTES.md └── README.md ├── 1298-maximum-candies-you-can-get-from-boxes ├── 1298-maximum-candies-you-can-get-from-boxes.cpp ├── NOTES.md └── README.md ├── 13-roman-to-integer ├── NOTES.md └── README.md ├── 1304-find-n-unique-integers-sum-up-to-zero ├── 1304-find-n-unique-integers-sum-up-to-zero.cpp ├── NOTES.md └── README.md ├── 1305-all-elements-in-two-binary-search-trees ├── 1305-all-elements-in-two-binary-search-trees.cpp ├── NOTES.md └── README.md ├── 1306-jump-game-iii ├── 1306-jump-game-iii.cpp ├── NOTES.md └── README.md ├── 131-palindrome-partitioning ├── 131-palindrome-partitioning.cpp ├── NOTES.md └── README.md ├── 1310-xor-queries-of-a-subarray ├── 1310-xor-queries-of-a-subarray.cpp ├── NOTES.md └── README.md ├── 1318-minimum-flips-to-make-a-or-b-equal-to-c ├── 1318-minimum-flips-to-make-a-or-b-equal-to-c.cpp ├── NOTES.md └── README.md ├── 132-palindrome-partitioning-ii ├── 132-palindrome-partitioning-ii.cpp ├── NOTES.md └── README.md ├── 1323-maximum-69-number ├── 1323-maximum-69-number.cpp ├── NOTES.md └── README.md ├── 1325-delete-leaves-with-a-given-value ├── 1325-delete-leaves-with-a-given-value.cpp ├── NOTES.md └── README.md ├── 1326-minimum-number-of-taps-to-open-to-water-a-garden ├── 1326-minimum-number-of-taps-to-open-to-water-a-garden.cpp ├── NOTES.md └── README.md ├── 1328-break-a-palindrome ├── 1328-break-a-palindrome.cpp ├── NOTES.md └── README.md ├── 1329-sort-the-matrix-diagonally ├── 1329-sort-the-matrix-diagonally.cpp ├── NOTES.md └── README.md ├── 133-clone-graph ├── 133-clone-graph.cpp ├── NOTES.md └── README.md ├── 1332-remove-palindromic-subsequences ├── 1332-remove-palindromic-subsequences.cpp ├── NOTES.md └── README.md ├── 1338-reduce-array-size-to-the-half ├── 1338-reduce-array-size-to-the-half.cpp ├── NOTES.md └── README.md ├── 1339-maximum-product-of-splitted-binary-tree ├── 1339-maximum-product-of-splitted-binary-tree.cpp ├── NOTES.md └── README.md ├── 134-gas-station ├── 134-gas-station.cpp ├── NOTES.md └── README.md ├── 1342-number-of-steps-to-reduce-a-number-to-zero ├── 1342-number-of-steps-to-reduce-a-number-to-zero.cpp ├── NOTES.md └── README.md ├── 1345-jump-game-iv ├── 1345-jump-game-iv.cpp ├── NOTES.md └── README.md ├── 135-candy ├── 135-candy.cpp ├── NOTES.md └── README.md ├── 1351-count-negative-numbers-in-a-sorted-matrix ├── 1351-count-negative-numbers-in-a-sorted-matrix.cpp ├── NOTES.md └── README.md ├── 1354-construct-target-array-with-multiple-sums ├── 1354-construct-target-array-with-multiple-sums.cpp ├── NOTES.md └── README.md ├── 1359-count-all-valid-pickup-and-delivery-options ├── 1359-count-all-valid-pickup-and-delivery-options.cpp ├── NOTES.md └── README.md ├── 136-single-number ├── 136-single-number.cpp ├── NOTES.md └── README.md ├── 1361-validate-binary-tree-nodes ├── 1361-validate-binary-tree-nodes.cpp ├── NOTES.md └── README.md ├── 1366-rank-teams-by-votes ├── 1366-rank-teams-by-votes.cpp ├── NOTES.md └── README.md ├── 1367-linked-list-in-binary-tree ├── 1367-linked-list-in-binary-tree.cpp ├── NOTES.md └── README.md ├── 137-single-number-ii ├── 137-single-number-ii.cpp ├── NOTES.md └── README.md ├── 1371-find-the-longest-substring-containing-vowels-in-even-counts ├── 1371-find-the-longest-substring-containing-vowels-in-even-counts.cpp ├── NOTES.md └── README.md ├── 1373-maximum-sum-bst-in-binary-tree ├── 1373-maximum-sum-bst-in-binary-tree.cpp ├── NOTES.md └── README.md ├── 1376-time-needed-to-inform-all-employees ├── 1376-time-needed-to-inform-all-employees.cpp ├── NOTES.md └── README.md ├── 1379-find-a-corresponding-node-of-a-binary-tree-in-a-clone-of-that-tree ├── 1379-find-a-corresponding-node-of-a-binary-tree-in-a-clone-of-that-tree.cpp ├── NOTES.md └── README.md ├── 138-copy-list-with-random-pointer ├── 138-copy-list-with-random-pointer.cpp ├── NOTES.md └── README.md ├── 1380-lucky-numbers-in-a-matrix ├── 1380-lucky-numbers-in-a-matrix.cpp ├── NOTES.md └── README.md ├── 1381-design-a-stack-with-increment-operation ├── 1381-design-a-stack-with-increment-operation.cpp ├── NOTES.md └── README.md ├── 1382-balance-a-binary-search-tree ├── 1382-balance-a-binary-search-tree.cpp ├── NOTES.md └── README.md ├── 1383-maximum-performance-of-a-team ├── 1383-maximum-performance-of-a-team.cpp ├── NOTES.md └── README.md ├── 1385-find-the-distance-value-between-two-arrays ├── 1385-find-the-distance-value-between-two-arrays.cpp ├── NOTES.md └── README.md ├── 1387-sort-integers-by-the-power-value ├── 1387-sort-integers-by-the-power-value.cpp ├── NOTES.md └── README.md ├── 139-word-break └── README.md ├── 1391-check-if-there-is-a-valid-path-in-a-grid ├── 1391-check-if-there-is-a-valid-path-in-a-grid.cpp ├── NOTES.md └── README.md ├── 1392-longest-happy-prefix ├── 1392-longest-happy-prefix.cpp ├── NOTES.md └── README.md ├── 1395-count-number-of-teams ├── 1395-count-number-of-teams.cpp ├── NOTES.md └── README.md ├── 140-word-break-ii ├── NOTES.md └── README.md ├── 1400-construct-k-palindrome-strings ├── 1400-construct-k-palindrome-strings.cpp ├── NOTES.md └── README.md ├── 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 ├── NOTES.md └── README.md ├── 1408-string-matching-in-an-array ├── 1408-string-matching-in-an-array.cpp ├── NOTES.md └── README.md ├── 1409-queries-on-a-permutation-with-key ├── 1409-queries-on-a-permutation-with-key.cpp ├── NOTES.md └── README.md ├── 141-linked-list-cycle ├── 141-linked-list-cycle.cpp ├── NOTES.md └── README.md ├── 1414-find-the-minimum-number-of-fibonacci-numbers-whose-sum-is-k ├── 1414-find-the-minimum-number-of-fibonacci-numbers-whose-sum-is-k.cpp ├── NOTES.md └── README.md ├── 1417-reformat-the-string ├── 1417-reformat-the-string.cpp ├── NOTES.md └── README.md ├── 1419-minimum-number-of-frogs-croaking ├── 1419-minimum-number-of-frogs-croaking.cpp ├── NOTES.md └── README.md ├── 142-linked-list-cycle-ii ├── 142-linked-list-cycle-ii.cpp ├── NOTES.md └── README.md ├── 1423-maximum-points-you-can-obtain-from-cards ├── 1423-maximum-points-you-can-obtain-from-cards.cpp ├── NOTES.md └── README.md ├── 143-reorder-list ├── 143-reorder-list.cpp ├── NOTES.md └── README.md ├── 1433-check-if-a-string-can-break-another-string ├── 1433-check-if-a-string-can-break-another-string.cpp ├── NOTES.md └── README.md ├── 1434-number-of-ways-to-wear-different-hats-to-each-other ├── 1434-number-of-ways-to-wear-different-hats-to-each-other.cpp ├── NOTES.md └── README.md ├── 1438-longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit ├── 1438-longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit.cpp ├── NOTES.md └── README.md ├── 144-binary-tree-preorder-traversal ├── 144-binary-tree-preorder-traversal.cpp ├── NOTES.md └── README.md ├── 1442-count-triplets-that-can-form-two-arrays-of-equal-xor ├── 1442-count-triplets-that-can-form-two-arrays-of-equal-xor.cpp ├── NOTES.md └── README.md ├── 1447-simplified-fractions ├── 1447-simplified-fractions.cpp ├── NOTES.md └── README.md ├── 1448-count-good-nodes-in-binary-tree ├── 1448-count-good-nodes-in-binary-tree.cpp ├── NOTES.md └── README.md ├── 145-binary-tree-postorder-traversal ├── 145-binary-tree-postorder-traversal.cpp ├── NOTES.md └── README.md ├── 1455-check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence ├── 1455-check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence.cpp ├── NOTES.md └── README.md ├── 1456-maximum-number-of-vowels-in-a-substring-of-given-length ├── 1456-maximum-number-of-vowels-in-a-substring-of-given-length.cpp ├── NOTES.md └── README.md ├── 1457-pseudo-palindromic-paths-in-a-binary-tree ├── 1457-pseudo-palindromic-paths-in-a-binary-tree.cpp ├── NOTES.md └── README.md ├── 146-lru-cache ├── 146-lru-cache.cpp ├── NOTES.md └── README.md ├── 1461-check-if-a-string-contains-all-binary-codes-of-size-k ├── 1461-check-if-a-string-contains-all-binary-codes-of-size-k.cpp ├── NOTES.md └── README.md ├── 1462-course-schedule-iv ├── 1462-course-schedule-iv.cpp ├── NOTES.md └── README.md ├── 1463-cherry-pickup-ii ├── 1463-cherry-pickup-ii.cpp ├── NOTES.md └── README.md ├── 1465-maximum-area-of-a-piece-of-cake-after-horizontal-and-vertical-cuts ├── 1465-maximum-area-of-a-piece-of-cake-after-horizontal-and-vertical-cuts.cpp ├── NOTES.md └── README.md ├── 1472-design-browser-history ├── 1472-design-browser-history.cpp ├── NOTES.md └── README.md ├── 1473-paint-house-iii ├── 1473-paint-house-iii.cpp ├── NOTES.md └── README.md ├── 1477-find-two-non-overlapping-sub-arrays-each-with-target-sum ├── 1477-find-two-non-overlapping-sub-arrays-each-with-target-sum.cpp ├── NOTES.md └── README.md ├── 1478-allocate-mailboxes ├── 1478-allocate-mailboxes.cpp ├── NOTES.md └── README.md ├── 148-sort-list ├── 148-sort-list.cpp ├── NOTES.md └── README.md ├── 1480-running-sum-of-1d-array ├── 1480-running-sum-of-1d-array.cpp ├── NOTES.md └── README.md ├── 1481-least-number-of-unique-integers-after-k-removals ├── 1481-least-number-of-unique-integers-after-k-removals.cpp ├── NOTES.md └── README.md ├── 1483-kth-ancestor-of-a-tree-node ├── 1483-kth-ancestor-of-a-tree-node.cpp ├── NOTES.md └── README.md ├── 1484-group-sold-products-by-the-date ├── 1484-group-sold-products-by-the-date.sql ├── NOTES.md └── README.md ├── 1488-avoid-flood-in-the-city ├── 1488-avoid-flood-in-the-city.cpp ├── NOTES.md └── README.md ├── 149-max-points-on-a-line ├── 149-max-points-on-a-line.cpp ├── NOTES.md └── README.md ├── 1490-clone-n-ary-tree ├── 1490-clone-n-ary-tree.cpp ├── NOTES.md └── README.md ├── 1492-the-kth-factor-of-n ├── 1492-the-kth-factor-of-n.cpp ├── NOTES.md └── README.md ├── 1493-longest-subarray-of-1s-after-deleting-one-element └── README.md ├── 1497-check-if-array-pairs-are-divisible-by-k ├── 1497-check-if-array-pairs-are-divisible-by-k.cpp ├── NOTES.md └── README.md ├── 1498-number-of-subsequences-that-satisfy-the-given-sum-condition ├── 1498-number-of-subsequences-that-satisfy-the-given-sum-condition.cpp ├── NOTES.md └── README.md ├── 15-3sum ├── 15-3sum.cpp ├── NOTES.md └── README.md ├── 150-evaluate-reverse-polish-notation ├── 150-evaluate-reverse-polish-notation.cpp ├── NOTES.md └── README.md ├── 1502-can-make-arithmetic-progression-from-sequence ├── 1502-can-make-arithmetic-progression-from-sequence.cpp ├── NOTES.md └── README.md ├── 1507-reformat-date ├── 1507-reformat-date.cpp ├── NOTES.md └── README.md ├── 1509-minimum-difference-between-largest-and-smallest-value-in-three-moves ├── 1509-minimum-difference-between-largest-and-smallest-value-in-three-moves.cpp ├── NOTES.md └── README.md ├── 151-reverse-words-in-a-string ├── 151-reverse-words-in-a-string.cpp ├── NOTES.md └── README.md ├── 1510-stone-game-iv ├── 1510-stone-game-iv.cpp ├── NOTES.md └── README.md ├── 1512-number-of-good-pairs ├── NOTES.md └── README.md ├── 1513-number-of-substrings-with-only-1s ├── 1513-number-of-substrings-with-only-1s.cpp └── README.md ├── 1514-path-with-maximum-probability ├── 1514-path-with-maximum-probability.cpp └── NOTES.md ├── 1523-count-odd-numbers-in-an-interval-range ├── 1523-count-odd-numbers-in-an-interval-range.cpp └── NOTES.md ├── 1525-number-of-good-ways-to-split-a-string ├── 1525-number-of-good-ways-to-split-a-string.cpp ├── NOTES.md └── README.md ├── 1527-patients-with-a-condition ├── 1527-patients-with-a-condition.sql ├── NOTES.md └── README.md ├── 153-find-minimum-in-rotated-sorted-array ├── 153-find-minimum-in-rotated-sorted-array.cpp ├── NOTES.md └── README.md ├── 1539-kth-missing-positive-number ├── 1539-kth-missing-positive-number.cpp ├── NOTES.md └── README.md ├── 1540-can-convert-string-in-k-moves ├── 1540-can-convert-string-in-k-moves.cpp ├── NOTES.md └── README.md ├── 1541-minimum-insertions-to-balance-a-parentheses-string ├── 1541-minimum-insertions-to-balance-a-parentheses-string.cpp ├── NOTES.md └── README.md ├── 1542-find-longest-awesome-substring ├── 1542-find-longest-awesome-substring.cpp └── README.md ├── 1545-find-kth-bit-in-nth-binary-string ├── 1545-find-kth-bit-in-nth-binary-string.cpp ├── NOTES.md └── README.md ├── 1546-maximum-number-of-non-overlapping-subarrays-with-sum-equals-target ├── 1546-maximum-number-of-non-overlapping-subarrays-with-sum-equals-target.cpp ├── NOTES.md └── README.md ├── 1551-minimum-operations-to-make-array-equal ├── 1551-minimum-operations-to-make-array-equal.cpp ├── NOTES.md └── README.md ├── 1554-strings-differ-by-one-character ├── 1554-strings-differ-by-one-character.cpp ├── NOTES.md └── README.md ├── 1559-detect-cycles-in-2d-grid ├── 1559-detect-cycles-in-2d-grid.cpp ├── NOTES.md └── README.md ├── 1561-maximum-number-of-coins-you-can-get ├── 1561-maximum-number-of-coins-you-can-get.cpp ├── NOTES.md └── README.md ├── 1566-detect-pattern-of-length-m-repeated-k-or-more-times ├── 1566-detect-pattern-of-length-m-repeated-k-or-more-times.cpp ├── NOTES.md └── README.md ├── 1568-minimum-number-of-days-to-disconnect-island ├── 1568-minimum-number-of-days-to-disconnect-island.cpp ├── NOTES.md └── README.md ├── 1570-dot-product-of-two-sparse-vectors ├── 1570-dot-product-of-two-sparse-vectors.cpp ├── NOTES.md └── README.md ├── 1572-matrix-diagonal-sum ├── NOTES.md └── README.md ├── 1574-shortest-subarray-to-be-removed-to-make-array-sorted ├── 1574-shortest-subarray-to-be-removed-to-make-array-sorted.cpp ├── NOTES.md └── README.md ├── 1578-minimum-time-to-make-rope-colorful ├── 1578-minimum-time-to-make-rope-colorful.cpp ├── NOTES.md └── README.md ├── 1581-customer-who-visited-but-did-not-make-any-transactions ├── 1581-customer-who-visited-but-did-not-make-any-transactions.sql ├── NOTES.md └── README.md ├── 1582-special-positions-in-a-binary-matrix ├── 1582-special-positions-in-a-binary-matrix.cpp ├── NOTES.md └── README.md ├── 1584-min-cost-to-connect-all-points └── NOTES.md ├── 1588-sum-of-all-odd-length-subarrays ├── 1588-sum-of-all-odd-length-subarrays.cpp ├── NOTES.md └── README.md ├── 1591-strange-printer-ii ├── 1591-strange-printer-ii.cpp ├── NOTES.md └── README.md ├── 16-3sum-closest ├── 16-3sum-closest.cpp ├── NOTES.md └── README.md ├── 160-intersection-of-two-linked-lists ├── 160-intersection-of-two-linked-lists.cpp ├── NOTES.md └── README.md ├── 1603-design-parking-system ├── 1603-design-parking-system.cpp ├── NOTES.md └── README.md ├── 1605-find-valid-matrix-given-row-and-column-sums ├── 1605-find-valid-matrix-given-row-and-column-sums.cpp ├── NOTES.md └── README.md ├── 1610-maximum-number-of-visible-points ├── 1610-maximum-number-of-visible-points.cpp ├── NOTES.md └── README.md ├── 162-find-peak-element ├── NOTES.md └── README.md ├── 1621-number-of-sets-of-k-non-overlapping-line-segments ├── 1621-number-of-sets-of-k-non-overlapping-line-segments.cpp ├── NOTES.md └── README.md ├── 1625-lexicographically-smallest-string-after-applying-operations ├── 1625-lexicographically-smallest-string-after-applying-operations.cpp └── README.md ├── 1626-best-team-with-no-conflicts ├── 1626-best-team-with-no-conflicts.cpp ├── NOTES.md └── README.md ├── 1630-arithmetic-subarrays ├── 1630-arithmetic-subarrays.cpp ├── NOTES.md └── README.md ├── 1631-path-with-minimum-effort ├── 1631-path-with-minimum-effort.cpp ├── NOTES.md └── README.md ├── 1638-count-substrings-that-differ-by-one-character ├── 1638-count-substrings-that-differ-by-one-character.cpp ├── NOTES.md └── README.md ├── 164-maximum-gap ├── 164-maximum-gap.cpp ├── NOTES.md └── README.md ├── 1641-count-sorted-vowel-strings ├── 1641-count-sorted-vowel-strings.cpp ├── NOTES.md └── README.md ├── 1642-furthest-building-you-can-reach ├── 1642-furthest-building-you-can-reach.cpp ├── NOTES.md └── README.md ├── 1644-lowest-common-ancestor-of-a-binary-tree-ii ├── 1644-lowest-common-ancestor-of-a-binary-tree-ii.cpp └── NOTES.md ├── 1646-get-maximum-in-generated-array ├── 1646-get-maximum-in-generated-array.cpp ├── NOTES.md └── README.md ├── 1647-minimum-deletions-to-make-character-frequencies-unique ├── 1647-minimum-deletions-to-make-character-frequencies-unique.cpp ├── NOTES.md └── README.md ├── 1649-create-sorted-array-through-instructions ├── 1649-create-sorted-array-through-instructions.cpp ├── NOTES.md └── README.md ├── 165-compare-version-numbers ├── 165-compare-version-numbers.cpp ├── NOTES.md └── README.md ├── 1650-lowest-common-ancestor-of-a-binary-tree-iii ├── 1650-lowest-common-ancestor-of-a-binary-tree-iii.cpp ├── NOTES.md └── README.md ├── 1654-minimum-jumps-to-reach-home ├── 1654-minimum-jumps-to-reach-home.cpp ├── NOTES.md └── README.md ├── 1658-minimum-operations-to-reduce-x-to-zero ├── 1658-minimum-operations-to-reduce-x-to-zero.cpp ├── NOTES.md └── README.md ├── 166-fraction-to-recurring-decimal ├── 166-fraction-to-recurring-decimal.cpp ├── NOTES.md └── README.md ├── 1662-check-if-two-string-arrays-are-equivalent ├── 1662-check-if-two-string-arrays-are-equivalent.cpp ├── NOTES.md └── README.md ├── 1667-fix-names-in-a-table ├── NOTES.md └── README.md ├── 1668-maximum-repeating-substring ├── 1668-maximum-repeating-substring.cpp ├── NOTES.md └── README.md ├── 1671-minimum-number-of-removals-to-make-mountain-array ├── 1671-minimum-number-of-removals-to-make-mountain-array.cpp ├── NOTES.md └── README.md ├── 1672-richest-customer-wealth ├── 1672-richest-customer-wealth.cpp ├── NOTES.md └── README.md ├── 1673-find-the-most-competitive-subsequence ├── 1673-find-the-most-competitive-subsequence.cpp ├── NOTES.md └── README.md ├── 1675-minimize-deviation-in-array ├── 1675-minimize-deviation-in-array.cpp ├── NOTES.md └── README.md ├── 1676-lowest-common-ancestor-of-a-binary-tree-iv ├── 1676-lowest-common-ancestor-of-a-binary-tree-iv.cpp ├── NOTES.md └── README.md ├── 1678-goal-parser-interpretation ├── 1678-goal-parser-interpretation.cpp ├── NOTES.md └── README.md ├── 1679-max-number-of-k-sum-pairs ├── 1679-max-number-of-k-sum-pairs.cpp ├── NOTES.md └── README.md ├── 1680-concatenation-of-consecutive-binary-numbers ├── 1680-concatenation-of-consecutive-binary-numbers.cpp └── NOTES.md ├── 1689-partitioning-into-minimum-number-of-deci-binary-numbers ├── 1689-partitioning-into-minimum-number-of-deci-binary-numbers.cpp ├── NOTES.md └── README.md ├── 169-majority-element ├── 169-majority-element.cpp ├── NOTES.md └── README.md ├── 1696-jump-game-vi ├── 1696-jump-game-vi.cpp ├── NOTES.md └── README.md ├── 1697-checking-existence-of-edge-length-limited-paths ├── 1697-checking-existence-of-edge-length-limited-paths.cpp └── NOTES.md ├── 1698-number-of-distinct-substrings-in-a-string ├── 1698-number-of-distinct-substrings-in-a-string.cpp ├── NOTES.md └── README.md ├── 1705-maximum-number-of-eaten-apples ├── 1705-maximum-number-of-eaten-apples.cpp └── README.md ├── 1707-maximum-xor-with-an-element-from-array ├── 1707-maximum-xor-with-an-element-from-array.cpp ├── NOTES.md └── README.md ├── 171-excel-sheet-column-number ├── 171-excel-sheet-column-number.cpp ├── NOTES.md └── README.md ├── 1710-maximum-units-on-a-truck ├── 1710-maximum-units-on-a-truck.cpp └── README.md ├── 1711-count-good-meals ├── 1711-count-good-meals.cpp ├── NOTES.md └── README.md ├── 1713-minimum-operations-to-make-a-subsequence ├── 1713-minimum-operations-to-make-a-subsequence.cpp ├── NOTES.md └── README.md ├── 1717-maximum-score-from-removing-substrings ├── 1717-maximum-score-from-removing-substrings.cpp ├── NOTES.md └── README.md ├── 1721-swapping-nodes-in-a-linked-list ├── 1721-swapping-nodes-in-a-linked-list.cpp ├── NOTES.md └── README.md ├── 1726-tuple-with-same-product ├── 1726-tuple-with-same-product.cpp ├── NOTES.md └── README.md ├── 173-binary-search-tree-iterator ├── 173-binary-search-tree-iterator.cpp ├── NOTES.md └── README.md ├── 1732-find-the-highest-altitude ├── NOTES.md └── README.md ├── 1746-maximum-subarray-sum-after-one-operation ├── 1746-maximum-subarray-sum-after-one-operation.cpp ├── NOTES.md └── README.md ├── 175-combine-two-tables ├── 175-combine-two-tables.sql ├── NOTES.md └── README.md ├── 1750-minimum-length-of-string-after-deleting-similar-ends ├── 1750-minimum-length-of-string-after-deleting-similar-ends.cpp ├── NOTES.md └── README.md ├── 1753-maximum-score-from-removing-stones ├── 1753-maximum-score-from-removing-stones.cpp ├── NOTES.md └── README.md ├── 1757-recyclable-and-low-fat-products ├── 1757-recyclable-and-low-fat-products.sql ├── NOTES.md └── README.md ├── 1758-minimum-changes-to-make-alternating-binary-string ├── 1758-minimum-changes-to-make-alternating-binary-string.cpp ├── NOTES.md └── README.md ├── 1759-count-number-of-homogenous-substrings ├── 1759-count-number-of-homogenous-substrings.cpp ├── NOTES.md └── README.md ├── 176-second-highest-salary ├── 176-second-highest-salary.sql ├── NOTES.md └── README.md ├── 1760-minimum-limit-of-balls-in-a-bag ├── 1760-minimum-limit-of-balls-in-a-bag.cpp ├── NOTES.md └── README.md ├── 1762-buildings-with-an-ocean-view ├── 1762-buildings-with-an-ocean-view.cpp ├── NOTES.md └── README.md ├── 1764-form-array-by-concatenating-subarrays-of-another-array ├── 1764-form-array-by-concatenating-subarrays-of-another-array.cpp ├── NOTES.md └── README.md ├── 1765-map-of-highest-peak ├── 1765-map-of-highest-peak.cpp ├── NOTES.md └── README.md ├── 1769-minimum-number-of-operations-to-move-all-balls-to-each-box ├── 1769-minimum-number-of-operations-to-move-all-balls-to-each-box.cpp ├── NOTES.md └── README.md ├── 1774-closest-dessert-cost ├── 1774-closest-dessert-cost.cpp ├── NOTES.md └── README.md ├── 1775-equal-sum-arrays-with-minimum-number-of-operations ├── 1775-equal-sum-arrays-with-minimum-number-of-operations.cpp ├── NOTES.md └── README.md ├── 1776-car-fleet-ii ├── 1776-car-fleet-ii.cpp ├── NOTES.md └── README.md ├── 1780-check-if-number-is-a-sum-of-powers-of-three ├── 1780-check-if-number-is-a-sum-of-powers-of-three.cpp ├── NOTES.md └── README.md ├── 1781-sum-of-beauty-of-all-substrings ├── 1781-sum-of-beauty-of-all-substrings.cpp ├── NOTES.md └── README.md ├── 1788-maximize-the-beauty-of-the-garden ├── 1788-maximize-the-beauty-of-the-garden.cpp ├── NOTES.md └── README.md ├── 179-largest-number ├── 179-largest-number.cpp ├── NOTES.md └── README.md ├── 1791-find-center-of-star-graph ├── 1791-find-center-of-star-graph.cpp ├── NOTES.md └── README.md ├── 1793-maximum-score-of-a-good-subarray ├── 1793-maximum-score-of-a-good-subarray.cpp ├── NOTES.md └── README.md ├── 1795-rearrange-products-table ├── 1795-rearrange-products-table.sql ├── NOTES.md └── README.md ├── 1796-second-largest-digit-in-a-string ├── 1796-second-largest-digit-in-a-string.cpp ├── NOTES.md └── README.md ├── 181-employees-earning-more-than-their-managers ├── 181-employees-earning-more-than-their-managers.sql ├── NOTES.md └── README.md ├── 1817-finding-the-users-active-minutes ├── 1817-finding-the-users-active-minutes.cpp ├── NOTES.md └── README.md ├── 1818-minimum-absolute-sum-difference ├── 1818-minimum-absolute-sum-difference.cpp ├── NOTES.md └── README.md ├── 182-duplicate-emails ├── 182-duplicate-emails.sql ├── NOTES.md └── README.md ├── 1822-sign-of-the-product-of-an-array ├── 1822-sign-of-the-product-of-an-array.cpp ├── NOTES.md └── README.md ├── 1823-find-the-winner-of-the-circular-game ├── 1823-find-the-winner-of-the-circular-game.cpp ├── NOTES.md └── README.md ├── 1824-minimum-sideway-jumps ├── 1824-minimum-sideway-jumps.cpp ├── NOTES.md └── README.md ├── 1827-minimum-operations-to-make-the-array-increasing ├── 1827-minimum-operations-to-make-the-array-increasing.cpp ├── NOTES.md └── README.md ├── 183-customers-who-never-order ├── 183-customers-who-never-order.sql ├── NOTES.md └── README.md ├── 1833-maximum-ice-cream-bars ├── 1833-maximum-ice-cream-bars.cpp ├── NOTES.md └── README.md ├── 1834-single-threaded-cpu ├── 1834-single-threaded-cpu.cpp ├── NOTES.md └── README.md ├── 1837-sum-of-digits-in-base-k ├── 1837-sum-of-digits-in-base-k.cpp ├── NOTES.md └── README.md ├── 1845-seat-reservation-manager ├── 1845-seat-reservation-manager.cpp ├── NOTES.md └── README.md ├── 1850-minimum-adjacent-swaps-to-reach-the-kth-smallest-number ├── 1850-minimum-adjacent-swaps-to-reach-the-kth-smallest-number.cpp ├── NOTES.md └── README.md ├── 1851-minimum-interval-to-include-each-query ├── 1851-minimum-interval-to-include-each-query.cpp ├── NOTES.md └── README.md ├── 1854-maximum-population-year ├── 1854-maximum-population-year.cpp ├── NOTES.md └── README.md ├── 1855-maximum-distance-between-a-pair-of-values ├── 1855-maximum-distance-between-a-pair-of-values.cpp ├── NOTES.md └── README.md ├── 1856-maximum-subarray-min-product ├── 1856-maximum-subarray-min-product.cpp └── NOTES.md ├── 1857-largest-color-value-in-a-directed-graph └── README.md ├── 1861-rotating-the-box ├── 1861-rotating-the-box.cpp ├── NOTES.md └── README.md ├── 187-repeated-dna-sequences ├── 187-repeated-dna-sequences.cpp ├── NOTES.md └── README.md ├── 1873-calculate-special-bonus ├── 1873-calculate-special-bonus.sql ├── NOTES.md └── README.md ├── 1877-minimize-maximum-pair-sum-in-array ├── 1877-minimize-maximum-pair-sum-in-array.cpp ├── NOTES.md └── README.md ├── 188-best-time-to-buy-and-sell-stock-iv ├── 188-best-time-to-buy-and-sell-stock-iv.cpp ├── NOTES.md └── README.md ├── 1882-process-tasks-using-servers ├── 1882-process-tasks-using-servers.cpp ├── NOTES.md └── README.md ├── 1884-egg-drop-with-2-eggs-and-n-floors ├── 1884-egg-drop-with-2-eggs-and-n-floors.cpp ├── NOTES.md └── README.md ├── 1885-count-pairs-in-two-arrays ├── 1885-count-pairs-in-two-arrays.cpp ├── NOTES.md └── README.md ├── 1888-minimum-number-of-flips-to-make-the-binary-string-alternating ├── 1888-minimum-number-of-flips-to-make-the-binary-string-alternating.cpp ├── NOTES.md └── README.md ├── 189-rotate-array ├── 189-rotate-array.cpp ├── NOTES.md └── README.md ├── 1893-check-if-all-the-integers-in-a-range-are-covered ├── 1893-check-if-all-the-integers-in-a-range-are-covered.cpp ├── NOTES.md └── README.md ├── 1894-find-the-student-that-will-replace-the-chalk ├── 1894-find-the-student-that-will-replace-the-chalk.cpp ├── NOTES.md └── README.md ├── 1899-merge-triplets-to-form-target-triplet ├── 1899-merge-triplets-to-form-target-triplet.cpp ├── NOTES.md └── README.md ├── 19-remove-nth-node-from-end-of-list ├── 19-remove-nth-node-from-end-of-list.cpp ├── NOTES.md └── README.md ├── 1903-largest-odd-number-in-string ├── 1903-largest-odd-number-in-string.cpp ├── NOTES.md └── README.md ├── 1905-count-sub-islands ├── 1905-count-sub-islands.cpp └── README.md ├── 1909-remove-one-element-to-make-the-array-strictly-increasing ├── 1909-remove-one-element-to-make-the-array-strictly-increasing.cpp ├── NOTES.md └── README.md ├── 191-number-of-1-bits ├── 191-number-of-1-bits.cpp ├── NOTES.md └── README.md ├── 1911-maximum-alternating-subsequence-sum ├── 1911-maximum-alternating-subsequence-sum.cpp ├── NOTES.md └── README.md ├── 1922-count-good-numbers ├── 1922-count-good-numbers.cpp ├── NOTES.md └── README.md ├── 1926-nearest-exit-from-entrance-in-maze ├── 1926-nearest-exit-from-entrance-in-maze.cpp ├── NOTES.md └── README.md ├── 1928-minimum-cost-to-reach-destination-in-time ├── 1928-minimum-cost-to-reach-destination-in-time.cpp ├── NOTES.md └── README.md ├── 1937-maximum-number-of-points-with-cost ├── 1937-maximum-number-of-points-with-cost.cpp ├── NOTES.md └── README.md ├── 1943-describe-the-painting ├── 1943-describe-the-painting.cpp ├── NOTES.md └── README.md ├── 1944-number-of-visible-people-in-a-queue ├── 1944-number-of-visible-people-in-a-queue.cpp ├── NOTES.md └── README.md ├── 1947-maximum-compatibility-score-sum ├── 1947-maximum-compatibility-score-sum.cpp ├── NOTES.md └── README.md ├── 1950-maximum-of-minimum-values-in-all-subarrays ├── 1950-maximum-of-minimum-values-in-all-subarrays.cpp ├── NOTES.md └── README.md ├── 1952-three-divisors ├── 1952-three-divisors.cpp ├── NOTES.md └── README.md ├── 1953-maximum-number-of-weeks-for-which-you-can-work ├── 1953-maximum-number-of-weeks-for-which-you-can-work.cpp ├── NOTES.md └── README.md ├── 1957-delete-characters-to-make-fancy-string ├── 1957-delete-characters-to-make-fancy-string.cpp └── README.md ├── 1959-minimum-total-space-wasted-with-k-resizing-operations ├── 1959-minimum-total-space-wasted-with-k-resizing-operations.cpp ├── NOTES.md └── README.md ├── 196-delete-duplicate-emails ├── 196-delete-duplicate-emails.sql └── NOTES.md ├── 1963-minimum-number-of-swaps-to-make-the-string-balanced ├── 1963-minimum-number-of-swaps-to-make-the-string-balanced.cpp ├── NOTES.md └── README.md ├── 1964-find-the-longest-valid-obstacle-course-at-each-position ├── 1964-find-the-longest-valid-obstacle-course-at-each-position.cpp ├── NOTES.md └── README.md ├── 1965-employees-with-missing-information ├── 1965-employees-with-missing-information.sql └── NOTES.md ├── 1968-array-with-elements-not-equal-to-average-of-neighbors └── README.md ├── 197-rising-temperature ├── 197-rising-temperature.sql ├── NOTES.md └── README.md ├── 1970-last-day-where-you-can-still-cross ├── 1970-last-day-where-you-can-still-cross.cpp └── README.md ├── 1971-find-if-path-exists-in-graph ├── 1971-find-if-path-exists-in-graph.cpp ├── NOTES.md └── README.md ├── 1975-maximum-matrix-sum ├── 1975-maximum-matrix-sum.cpp ├── NOTES.md └── README.md ├── 1979-find-greatest-common-divisor-of-array ├── 1979-find-greatest-common-divisor-of-array.cpp ├── NOTES.md └── README.md ├── 198-house-robber ├── 198-house-robber.cpp ├── NOTES.md └── README.md ├── 1981-minimize-the-difference-between-target-and-chosen-elements ├── 1981-minimize-the-difference-between-target-and-chosen-elements.cpp ├── NOTES.md └── README.md ├── 1985-find-the-kth-largest-integer-in-the-array ├── 1985-find-the-kth-largest-integer-in-the-array.cpp ├── NOTES.md └── README.md ├── 1986-minimum-number-of-work-sessions-to-finish-the-tasks ├── 1986-minimum-number-of-work-sessions-to-finish-the-tasks.cpp ├── NOTES.md └── README.md ├── 1989-maximum-number-of-people-that-can-be-caught-in-tag ├── 1989-maximum-number-of-people-that-can-be-caught-in-tag.cpp ├── NOTES.md └── README.md ├── 199-binary-tree-right-side-view ├── 199-binary-tree-right-side-view.cpp ├── NOTES.md └── README.md ├── 1991-find-the-middle-index-in-array ├── 1991-find-the-middle-index-in-array.cpp ├── NOTES.md └── README.md ├── 1993-operations-on-tree ├── NOTES.md └── README.md ├── 1996-the-number-of-weak-characters-in-the-game ├── NOTES.md └── README.md ├── 20-valid-parentheses ├── 20-valid-parentheses.cpp ├── NOTES.md └── README.md ├── 200-number-of-islands ├── 200-number-of-islands.cpp ├── NOTES.md └── README.md ├── 2000-reverse-prefix-of-word ├── 2000-reverse-prefix-of-word.cpp ├── NOTES.md └── README.md ├── 2001-number-of-pairs-of-interchangeable-rectangles ├── 2001-number-of-pairs-of-interchangeable-rectangles.cpp ├── NOTES.md └── README.md ├── 2002-maximum-product-of-the-length-of-two-palindromic-subsequences ├── 2002-maximum-product-of-the-length-of-two-palindromic-subsequences.cpp ├── NOTES.md └── README.md ├── 2007-find-original-array-from-doubled-array ├── 2007-find-original-array-from-doubled-array.cpp ├── NOTES.md └── README.md ├── 2009-minimum-number-of-operations-to-make-array-continuous ├── 2009-minimum-number-of-operations-to-make-array-continuous.cpp ├── NOTES.md └── README.md ├── 2012-sum-of-beauty-in-the-array ├── 2012-sum-of-beauty-in-the-array.cpp ├── NOTES.md └── README.md ├── 2021-brightest-position-on-street ├── 2021-brightest-position-on-street.cpp └── README.md ├── 2024-maximize-the-confusion-of-an-exam ├── 2024-maximize-the-confusion-of-an-exam.cpp ├── NOTES.md └── README.md ├── 2033-minimum-operations-to-make-a-uni-value-grid ├── 2033-minimum-operations-to-make-a-uni-value-grid.cpp └── README.md ├── 2035-partition-array-into-two-arrays-to-minimize-sum-difference ├── 2035-partition-array-into-two-arrays-to-minimize-sum-difference.cpp ├── NOTES.md └── README.md ├── 2044-count-number-of-maximum-bitwise-or-subsets ├── 2044-count-number-of-maximum-bitwise-or-subsets.cpp ├── NOTES.md └── README.md ├── 2050-parallel-courses-iii ├── 2050-parallel-courses-iii.cpp ├── NOTES.md └── README.md ├── 206-reverse-linked-list ├── 206-reverse-linked-list.cpp ├── NOTES.md └── README.md ├── 2061-number-of-spaces-cleaning-robot-cleaned ├── 2061-number-of-spaces-cleaning-robot-cleaned.cpp └── NOTES.md ├── 2064-minimized-maximum-of-products-distributed-to-any-store ├── 2064-minimized-maximum-of-products-distributed-to-any-store.cpp ├── NOTES.md └── README.md ├── 2070-most-beautiful-item-for-each-query ├── 2070-most-beautiful-item-for-each-query.cpp ├── NOTES.md └── README.md ├── 208-implement-trie-prefix-tree ├── 208-implement-trie-prefix-tree.cpp ├── NOTES.md └── README.md ├── 2083-substrings-that-begin-and-end-with-the-same-letter ├── 2083-substrings-that-begin-and-end-with-the-same-letter.cpp ├── NOTES.md └── README.md ├── 2086-minimum-number-of-buckets-required-to-collect-rainwater-from-houses ├── 2086-minimum-number-of-buckets-required-to-collect-rainwater-from-houses.cpp ├── NOTES.md └── README.md ├── 2087-minimum-cost-homecoming-of-a-robot-in-a-grid ├── 2087-minimum-cost-homecoming-of-a-robot-in-a-grid.cpp ├── NOTES.md └── README.md ├── 21-merge-two-sorted-lists ├── 21-merge-two-sorted-lists.cpp ├── NOTES.md └── README.md ├── 2100-find-good-days-to-rob-the-bank ├── 2100-find-good-days-to-rob-the-bank.cpp ├── NOTES.md └── README.md ├── 2104-sum-of-subarray-ranges ├── 2104-sum-of-subarray-ranges.cpp └── README.md ├── 211-design-add-and-search-words-data-structure ├── 211-design-add-and-search-words-data-structure.cpp ├── NOTES.md └── README.md ├── 2116-check-if-a-parentheses-string-can-be-valid ├── 2116-check-if-a-parentheses-string-can-be-valid.cpp ├── NOTES.md └── README.md ├── 212-word-search-ii ├── 212-word-search-ii.cpp ├── NOTES.md └── README.md ├── 2128-remove-all-ones-with-row-and-column-flips ├── 2128-remove-all-ones-with-row-and-column-flips.cpp ├── NOTES.md └── README.md ├── 2131-longest-palindrome-by-concatenating-two-letter-words ├── 2131-longest-palindrome-by-concatenating-two-letter-words.cpp ├── NOTES.md └── README.md ├── 2134-minimum-swaps-to-group-all-1s-together-ii ├── 2134-minimum-swaps-to-group-all-1s-together-ii.cpp ├── NOTES.md └── README.md ├── 2135-count-words-obtained-after-adding-a-letter ├── 2135-count-words-obtained-after-adding-a-letter.cpp ├── NOTES.md └── README.md ├── 2136-earliest-possible-day-of-full-bloom ├── 2136-earliest-possible-day-of-full-bloom.cpp ├── NOTES.md └── README.md ├── 214-shortest-palindrome ├── 214-shortest-palindrome.cpp ├── NOTES.md └── README.md ├── 2146-k-highest-ranked-items-within-a-price-range ├── 2146-k-highest-ranked-items-within-a-price-range.cpp ├── NOTES.md └── README.md ├── 2147-number-of-ways-to-divide-a-long-corridor ├── 2147-number-of-ways-to-divide-a-long-corridor.cpp ├── NOTES.md └── README.md ├── 215-kth-largest-element-in-an-array ├── 215-kth-largest-element-in-an-array.cpp ├── NOTES.md └── README.md ├── 2152-minimum-number-of-lines-to-cover-points ├── 2152-minimum-number-of-lines-to-cover-points.cpp ├── NOTES.md └── README.md ├── 2156-find-substring-with-given-hash-value ├── 2156-find-substring-with-given-hash-value.cpp ├── NOTES.md └── README.md ├── 2158-amount-of-new-area-painted-each-day ├── 2158-amount-of-new-area-painted-each-day.cpp ├── NOTES.md └── README.md ├── 216-combination-sum-iii ├── 216-combination-sum-iii.cpp ├── NOTES.md └── README.md ├── 2161-partition-array-according-to-given-pivot ├── 2161-partition-array-according-to-given-pivot.cpp ├── NOTES.md └── README.md ├── 2163-minimum-difference-in-sums-after-removal-of-elements ├── 2163-minimum-difference-in-sums-after-removal-of-elements.cpp └── README.md ├── 2166-design-bitset ├── 2166-design-bitset.cpp ├── NOTES.md └── README.md ├── 2167-minimum-time-to-remove-all-cars-containing-illegal-goods ├── 2167-minimum-time-to-remove-all-cars-containing-illegal-goods.cpp ├── NOTES.md └── README.md ├── 2168-unique-substrings-with-equal-digit-frequency ├── 2168-unique-substrings-with-equal-digit-frequency.cpp ├── NOTES.md └── README.md ├── 2170-minimum-operations-to-make-the-array-alternating ├── 2170-minimum-operations-to-make-the-array-alternating.cpp ├── NOTES.md └── README.md ├── 2171-removing-minimum-number-of-magic-beans ├── 2171-removing-minimum-number-of-magic-beans.cpp ├── NOTES.md └── README.md ├── 2174-remove-all-ones-with-row-and-column-flips-ii ├── 2174-remove-all-ones-with-row-and-column-flips-ii.cpp ├── NOTES.md └── README.md ├── 218-the-skyline-problem ├── NOTES.md └── README.md ├── 2182-construct-string-with-repeat-limit ├── 2182-construct-string-with-repeat-limit.cpp ├── NOTES.md └── README.md ├── 2183-count-array-pairs-divisible-by-k ├── 2183-count-array-pairs-divisible-by-k.cpp ├── NOTES.md └── README.md ├── 2188-minimum-time-to-finish-the-race ├── 2188-minimum-time-to-finish-the-race.cpp ├── NOTES.md └── README.md ├── 2197-replace-non-coprime-numbers-in-array ├── 2197-replace-non-coprime-numbers-in-array.cpp ├── NOTES.md └── README.md ├── 2200-find-all-k-distant-indices-in-an-array ├── 2200-find-all-k-distant-indices-in-an-array.cpp └── README.md ├── 2216-minimum-deletions-to-make-array-beautiful ├── 2216-minimum-deletions-to-make-array-beautiful.cpp ├── NOTES.md └── README.md ├── 2218-maximum-value-of-k-coins-from-piles ├── 2218-maximum-value-of-k-coins-from-piles.cpp ├── NOTES.md └── README.md ├── 222-count-complete-tree-nodes ├── 222-count-complete-tree-nodes.cpp ├── NOTES.md └── README.md ├── 2223-sum-of-scores-of-built-strings ├── NOTES.md └── README.md ├── 2224-minimum-number-of-operations-to-convert-time ├── NOTES.md └── README.md ├── 2226-maximum-candies-allocated-to-k-children ├── 2226-maximum-candies-allocated-to-k-children.cpp ├── NOTES.md └── README.md ├── 2227-encrypt-and-decrypt-strings ├── 2227-encrypt-and-decrypt-strings.cpp ├── NOTES.md └── README.md ├── 223-rectangle-area ├── 223-rectangle-area.cpp ├── NOTES.md └── README.md ├── 2232-minimize-result-by-adding-parentheses-to-expression ├── 2232-minimize-result-by-adding-parentheses-to-expression.cpp └── README.md ├── 2237-count-positions-on-street-with-required-brightness ├── 2237-count-positions-on-street-with-required-brightness.cpp └── README.md ├── 224-basic-calculator ├── 224-basic-calculator.cpp └── NOTES.md ├── 2241-design-an-atm-machine ├── 2241-design-an-atm-machine.cpp ├── NOTES.md └── README.md ├── 2244-minimum-rounds-to-complete-all-tasks ├── 2244-minimum-rounds-to-complete-all-tasks.cpp ├── NOTES.md └── README.md ├── 225-implement-stack-using-queues ├── 225-implement-stack-using-queues.cpp ├── NOTES.md └── README.md ├── 2250-count-number-of-rectangles-containing-each-point ├── 2250-count-number-of-rectangles-containing-each-point.cpp ├── NOTES.md └── README.md ├── 2251-number-of-flowers-in-full-bloom ├── 2251-number-of-flowers-in-full-bloom.cpp └── NOTES.md ├── 2258-escape-the-spreading-fire ├── 2258-escape-the-spreading-fire.cpp ├── NOTES.md └── README.md ├── 2259-remove-digit-from-number-to-maximize-result ├── 2259-remove-digit-from-number-to-maximize-result.cpp ├── NOTES.md └── README.md ├── 2260-minimum-consecutive-cards-to-pick-up ├── 2260-minimum-consecutive-cards-to-pick-up.cpp ├── NOTES.md └── README.md ├── 2262-total-appeal-of-a-string ├── 2262-total-appeal-of-a-string.cpp ├── NOTES.md └── README.md ├── 2265-count-nodes-equal-to-average-of-subtree ├── 2265-count-nodes-equal-to-average-of-subtree.cpp ├── NOTES.md └── README.md ├── 2268-minimum-number-of-keypresses ├── 2268-minimum-number-of-keypresses.cpp ├── NOTES.md └── README.md ├── 227-basic-calculator-ii ├── 227-basic-calculator-ii.cpp ├── NOTES.md └── README.md ├── 2270-number-of-ways-to-split-array ├── 2270-number-of-ways-to-split-array.cpp ├── NOTES.md └── README.md ├── 2271-maximum-white-tiles-covered-by-a-carpet ├── 2271-maximum-white-tiles-covered-by-a-carpet.cpp ├── NOTES.md └── README.md ├── 2276-count-integers-in-intervals ├── 2276-count-integers-in-intervals.cpp ├── NOTES.md └── README.md ├── 228-summary-ranges ├── 228-summary-ranges.cpp ├── NOTES.md └── README.md ├── 2280-minimum-lines-to-represent-a-line-chart ├── 2280-minimum-lines-to-represent-a-line-chart.cpp ├── NOTES.md └── README.md ├── 2281-sum-of-total-strength-of-wizards ├── 2281-sum-of-total-strength-of-wizards.cpp ├── NOTES.md └── README.md ├── 2282-number-of-people-that-can-be-seen-in-a-grid ├── 2282-number-of-people-that-can-be-seen-in-a-grid.cpp ├── NOTES.md └── README.md ├── 2289-steps-to-make-array-non-decreasing ├── 2289-steps-to-make-array-non-decreasing.cpp ├── NOTES.md └── README.md ├── 229-majority-element-ii ├── 229-majority-element-ii.cpp ├── NOTES.md └── README.md ├── 2290-minimum-obstacle-removal-to-reach-corner ├── 2290-minimum-obstacle-removal-to-reach-corner.cpp ├── NOTES.md └── README.md ├── 2296-design-a-text-editor ├── 2296-design-a-text-editor.cpp ├── NOTES.md └── README.md ├── 2299-strong-password-checker-ii ├── 2299-strong-password-checker-ii.cpp ├── NOTES.md └── README.md ├── 23-merge-k-sorted-lists ├── 23-merge-k-sorted-lists.cpp ├── NOTES.md └── README.md ├── 230-kth-smallest-element-in-a-bst ├── 230-kth-smallest-element-in-a-bst.cpp └── NOTES.md ├── 2300-successful-pairs-of-spells-and-potions ├── 2300-successful-pairs-of-spells-and-potions.cpp ├── NOTES.md └── README.md ├── 2302-count-subarrays-with-score-less-than-k ├── 2302-count-subarrays-with-score-less-than-k.cpp ├── NOTES.md └── README.md ├── 2304-minimum-path-cost-in-a-grid ├── 2304-minimum-path-cost-in-a-grid.cpp ├── NOTES.md └── README.md ├── 2305-fair-distribution-of-cookies ├── 2305-fair-distribution-of-cookies.cpp ├── NOTES.md └── README.md ├── 231-power-of-two ├── 231-power-of-two.cpp ├── NOTES.md └── README.md ├── 2310-sum-of-numbers-with-units-digit-k ├── 2310-sum-of-numbers-with-units-digit-k.cpp ├── NOTES.md └── README.md ├── 2320-count-number-of-ways-to-place-houses ├── 2320-count-number-of-ways-to-place-houses.cpp ├── NOTES.md └── README.md ├── 2321-maximum-score-of-spliced-array ├── 2321-maximum-score-of-spliced-array.cpp ├── NOTES.md └── README.md ├── 2322-minimum-score-after-removals-on-a-tree ├── 2322-minimum-score-after-removals-on-a-tree.cpp ├── NOTES.md └── README.md ├── 2328-number-of-increasing-paths-in-a-grid ├── 2328-number-of-increasing-paths-in-a-grid.cpp ├── NOTES.md └── README.md ├── 2333-minimum-sum-of-squared-difference ├── 2333-minimum-sum-of-squared-difference.cpp ├── NOTES.md └── README.md ├── 2335-minimum-amount-of-time-to-fill-cups ├── 2335-minimum-amount-of-time-to-fill-cups.cpp ├── NOTES.md └── README.md ├── 2336-smallest-number-in-infinite-set ├── 2336-smallest-number-in-infinite-set.cpp ├── NOTES.md └── README.md ├── 2337-move-pieces-to-obtain-a-string ├── 2337-move-pieces-to-obtain-a-string.cpp ├── NOTES.md └── README.md ├── 234-palindrome-linked-list ├── 234-palindrome-linked-list.cpp ├── NOTES.md └── README.md ├── 235-lowest-common-ancestor-of-a-binary-search-tree ├── 235-lowest-common-ancestor-of-a-binary-search-tree.cpp ├── NOTES.md └── README.md ├── 2350-shortest-impossible-sequence-of-rolls ├── NOTES.md └── README.md ├── 2359-find-closest-node-to-given-two-nodes ├── 2359-find-closest-node-to-given-two-nodes.cpp ├── NOTES.md └── README.md ├── 236-lowest-common-ancestor-of-a-binary-tree ├── 236-lowest-common-ancestor-of-a-binary-tree.cpp ├── NOTES.md └── README.md ├── 2376-count-special-integers ├── 2376-count-special-integers.cpp ├── NOTES.md └── README.md ├── 239-sliding-window-maximum ├── 239-sliding-window-maximum.cpp ├── NOTES.md └── README.md ├── 24-swap-nodes-in-pairs ├── 24-swap-nodes-in-pairs.cpp ├── NOTES.md └── README.md ├── 240-search-a-2d-matrix-ii ├── NOTES.md └── README.md ├── 241-different-ways-to-add-parentheses ├── 241-different-ways-to-add-parentheses.cpp ├── NOTES.md └── README.md ├── 242-valid-anagram ├── 242-valid-anagram.cpp ├── NOTES.md └── README.md ├── 244-shortest-word-distance-ii ├── 244-shortest-word-distance-ii.cpp ├── NOTES.md └── README.md ├── 245-shortest-word-distance-iii ├── 245-shortest-word-distance-iii.cpp ├── NOTES.md └── README.md ├── 2454-next-greater-element-iv ├── 2454-next-greater-element-iv.cpp ├── NOTES.md └── README.md ├── 249-group-shifted-strings ├── 249-group-shifted-strings.cpp ├── NOTES.md └── README.md ├── 2491-divide-players-into-teams-of-equal-skill ├── 2491-divide-players-into-teams-of-equal-skill.cpp ├── NOTES.md └── README.md ├── 251-flatten-2d-vector ├── 251-flatten-2d-vector.cpp ├── NOTES.md └── README.md ├── 252-meeting-rooms ├── 252-meeting-rooms.cpp ├── NOTES.md └── README.md ├── 2556-disconnect-path-in-a-binary-matrix-by-at-most-one-flip ├── 2556-disconnect-path-in-a-binary-matrix-by-at-most-one-flip.cpp ├── NOTES.md └── README.md ├── 256-paint-house ├── 256-paint-house.cpp ├── NOTES.md └── README.md ├── 2564-substring-xor-queries ├── 2564-substring-xor-queries.cpp └── README.md ├── 258-add-digits ├── 258-add-digits.cpp ├── NOTES.md └── README.md ├── 26-remove-duplicates-from-sorted-array ├── NOTES.md └── README.md ├── 268-missing-number ├── 268-missing-number.cpp ├── NOTES.md └── README.md ├── 27-remove-element ├── 27-remove-element.cpp ├── NOTES.md └── README.md ├── 28-implement-strstr ├── 28-implement-strstr.cpp ├── NOTES.md └── README.md ├── 280-wiggle-sort └── README.md ├── 281-zigzag-iterator ├── 281-zigzag-iterator.cpp ├── NOTES.md └── README.md ├── 282-expression-add-operators ├── 282-expression-add-operators.cpp ├── NOTES.md └── README.md ├── 284-peeking-iterator ├── 284-peeking-iterator.cpp ├── NOTES.md └── README.md ├── 285-inorder-successor-in-bst ├── 285-inorder-successor-in-bst.cpp ├── NOTES.md └── README.md ├── 287-find-the-duplicate-number ├── 287-find-the-duplicate-number.cpp ├── NOTES.md └── README.md ├── 29-divide-two-integers ├── 29-divide-two-integers.cpp ├── NOTES.md └── README.md ├── 290-word-pattern ├── 290-word-pattern.cpp ├── NOTES.md └── README.md ├── 292-nim-game ├── 292-nim-game.cpp ├── NOTES.md └── README.md ├── 296-best-meeting-point ├── 296-best-meeting-point.cpp ├── NOTES.md └── README.md ├── 297-serialize-and-deserialize-binary-tree ├── 297-serialize-and-deserialize-binary-tree.cpp ├── NOTES.md └── README.md ├── 298-binary-tree-longest-consecutive-sequence ├── 298-binary-tree-longest-consecutive-sequence.cpp └── NOTES.md ├── 299-bulls-and-cows ├── 299-bulls-and-cows.cpp ├── NOTES.md └── README.md ├── 3-longest-substring-without-repeating-characters ├── 3-longest-substring-without-repeating-characters.cpp ├── NOTES.md └── README.md ├── 30-substring-with-concatenation-of-all-words ├── 30-substring-with-concatenation-of-all-words.cpp ├── NOTES.md └── README.md ├── 300-longest-increasing-subsequence ├── 300-longest-increasing-subsequence.cpp ├── NOTES.md └── README.md ├── 304-range-sum-query-2d-immutable ├── 304-range-sum-query-2d-immutable.cpp ├── NOTES.md └── README.md ├── 307-range-sum-query-mutable ├── 307-range-sum-query-mutable.cpp ├── NOTES.md └── README.md ├── 308-range-sum-query-2d-mutable ├── 308-range-sum-query-2d-mutable.cpp ├── NOTES.md └── README.md ├── 309-best-time-to-buy-and-sell-stock-with-cooldown ├── 309-best-time-to-buy-and-sell-stock-with-cooldown.cpp ├── NOTES.md └── README.md ├── 31-next-permutation ├── 31-next-permutation.cpp ├── NOTES.md └── README.md ├── 311-sparse-matrix-multiplication ├── 311-sparse-matrix-multiplication.cpp ├── NOTES.md └── README.md ├── 314-binary-tree-vertical-order-traversal ├── 314-binary-tree-vertical-order-traversal.cpp ├── NOTES.md └── README.md ├── 315-count-of-smaller-numbers-after-self ├── 315-count-of-smaller-numbers-after-self.cpp ├── NOTES.md └── README.md ├── 316-remove-duplicate-letters ├── 316-remove-duplicate-letters.cpp ├── NOTES.md └── README.md ├── 317-shortest-distance-from-all-buildings ├── 317-shortest-distance-from-all-buildings.cpp ├── NOTES.md └── README.md ├── 318-maximum-product-of-word-lengths ├── 318-maximum-product-of-word-lengths.cpp ├── NOTES.md └── README.md ├── 32-longest-valid-parentheses ├── 32-longest-valid-parentheses.cpp ├── NOTES.md └── README.md ├── 322-coin-change ├── 322-coin-change.cpp ├── NOTES.md └── README.md ├── 324-wiggle-sort-ii ├── 324-wiggle-sort-ii.cpp ├── NOTES.md └── README.md ├── 326-power-of-three ├── 326-power-of-three.cpp ├── NOTES.md └── README.md ├── 327-count-of-range-sum ├── 327-count-of-range-sum.cpp ├── NOTES.md └── README.md ├── 329-longest-increasing-path-in-a-matrix ├── 329-longest-increasing-path-in-a-matrix.cpp ├── NOTES.md └── README.md ├── 33-search-in-rotated-sorted-array ├── NOTES.md └── README.md ├── 331-verify-preorder-serialization-of-a-binary-tree ├── 331-verify-preorder-serialization-of-a-binary-tree.cpp ├── NOTES.md └── README.md ├── 333-largest-bst-subtree ├── 333-largest-bst-subtree.cpp ├── NOTES.md └── README.md ├── 334-increasing-triplet-subsequence ├── NOTES.md └── README.md ├── 336-palindrome-pairs ├── 336-palindrome-pairs.cpp └── README.md ├── 338-counting-bits ├── 338-counting-bits.cpp ├── NOTES.md └── README.md ├── 339-nested-list-weight-sum ├── 339-nested-list-weight-sum.cpp ├── NOTES.md └── README.md ├── 34-find-first-and-last-position-of-element-in-sorted-array ├── 34-find-first-and-last-position-of-element-in-sorted-array.cpp ├── NOTES.md └── README.md ├── 341-flatten-nested-list-iterator ├── 341-flatten-nested-list-iterator.cpp ├── NOTES.md └── README.md ├── 342-power-of-four ├── 342-power-of-four.cpp ├── NOTES.md └── README.md ├── 343-integer-break ├── 343-integer-break.cpp ├── NOTES.md └── README.md ├── 345-reverse-vowels-of-a-string ├── 345-reverse-vowels-of-a-string.cpp ├── NOTES.md └── README.md ├── 347-top-k-frequent-elements ├── 347-top-k-frequent-elements.cpp └── NOTES.md ├── 348-design-tic-tac-toe ├── 348-design-tic-tac-toe.cpp ├── NOTES.md └── README.md ├── 352-data-stream-as-disjoint-intervals ├── 352-data-stream-as-disjoint-intervals.cpp ├── NOTES.md └── README.md ├── 354-russian-doll-envelopes ├── 354-russian-doll-envelopes.cpp ├── NOTES.md └── README.md ├── 355-design-twitter ├── 355-design-twitter.cpp ├── NOTES.md └── README.md ├── 357-count-numbers-with-unique-digits ├── 357-count-numbers-with-unique-digits.cpp └── README.md ├── 361-bomb-enemy ├── 361-bomb-enemy.cpp ├── NOTES.md └── README.md ├── 362-design-hit-counter ├── 362-design-hit-counter.cpp ├── NOTES.md └── README.md ├── 363-max-sum-of-rectangle-no-larger-than-k ├── 363-max-sum-of-rectangle-no-larger-than-k.cpp └── README.md ├── 364-nested-list-weight-sum-ii ├── 364-nested-list-weight-sum-ii.cpp ├── NOTES.md └── README.md ├── 365-water-and-jug-problem ├── 365-water-and-jug-problem.cpp ├── NOTES.md └── README.md ├── 366-find-leaves-of-binary-tree ├── 366-find-leaves-of-binary-tree.cpp └── NOTES.md ├── 367-valid-perfect-square ├── 367-valid-perfect-square.cpp ├── NOTES.md └── README.md ├── 370-range-addition └── README.md ├── 371-sum-of-two-integers ├── 371-sum-of-two-integers.cpp ├── NOTES.md └── README.md ├── 376-wiggle-subsequence ├── 376-wiggle-subsequence.cpp ├── NOTES.md └── README.md ├── 377-combination-sum-iv ├── 377-combination-sum-iv.cpp └── README.md ├── 378-kth-smallest-element-in-a-sorted-matrix ├── 378-kth-smallest-element-in-a-sorted-matrix.cpp ├── NOTES.md └── README.md ├── 380-insert-delete-getrandom-o1 ├── 380-insert-delete-getrandom-o1.cpp ├── NOTES.md └── README.md ├── 381-insert-delete-getrandom-o1-duplicates-allowed ├── 381-insert-delete-getrandom-o1-duplicates-allowed.cpp ├── NOTES.md └── README.md ├── 382-linked-list-random-node ├── 382-linked-list-random-node.cpp ├── NOTES.md └── README.md ├── 383-ransom-note ├── 383-ransom-note.cpp ├── NOTES.md └── README.md ├── 386-lexicographical-numbers ├── 386-lexicographical-numbers.cpp ├── NOTES.md └── README.md ├── 387-first-unique-character-in-a-string └── README.md ├── 389-find-the-difference ├── 389-find-the-difference.cpp ├── NOTES.md └── README.md ├── 39-combination-sum ├── 39-combination-sum.cpp ├── NOTES.md └── README.md ├── 392-is-subsequence ├── 392-is-subsequence.cpp ├── NOTES.md └── README.md ├── 393-utf-8-validation ├── NOTES.md └── README.md ├── 394-decode-string ├── 394-decode-string.cpp ├── NOTES.md └── README.md ├── 395-longest-substring-with-at-least-k-repeating-characters ├── 395-longest-substring-with-at-least-k-repeating-characters.cpp ├── NOTES.md └── README.md ├── 397-integer-replacement ├── 397-integer-replacement.cpp ├── NOTES.md └── README.md ├── 398-random-pick-index ├── 398-random-pick-index.cpp ├── NOTES.md └── README.md ├── 399-evaluate-division ├── 399-evaluate-division.cpp ├── NOTES.md └── README.md ├── 3sum ├── 3sum.cpp └── README.md ├── 40-combination-sum-ii ├── 40-combination-sum-ii.cpp ├── NOTES.md └── README.md ├── 400-nth-digit ├── 400-nth-digit.cpp ├── NOTES.md └── README.md ├── 402-remove-k-digits ├── 402-remove-k-digits.cpp ├── NOTES.md └── README.md ├── 403-frog-jump ├── 403-frog-jump.cpp ├── NOTES.md └── README.md ├── 405-convert-a-number-to-hexadecimal ├── 405-convert-a-number-to-hexadecimal.cpp ├── NOTES.md └── README.md ├── 406-queue-reconstruction-by-height ├── 406-queue-reconstruction-by-height.cpp └── NOTES.md ├── 408-valid-word-abbreviation ├── 408-valid-word-abbreviation.cpp └── README.md ├── 409-longest-palindrome ├── 409-longest-palindrome.cpp ├── NOTES.md └── README.md ├── 41-first-missing-positive ├── 41-first-missing-positive.cpp ├── NOTES.md └── README.md ├── 410-split-array-largest-sum ├── 410-split-array-largest-sum.cpp ├── NOTES.md └── README.md ├── 413-arithmetic-slices ├── 413-arithmetic-slices.cpp ├── NOTES.md └── README.md ├── 414-third-maximum-number ├── 414-third-maximum-number.cpp └── NOTES.md ├── 415-add-strings ├── 415-add-strings.cpp ├── NOTES.md └── README.md ├── 416-partition-equal-subset-sum ├── 416-partition-equal-subset-sum.cpp ├── NOTES.md └── README.md ├── 417-pacific-atlantic-water-flow ├── 417-pacific-atlantic-water-flow.cpp ├── NOTES.md └── README.md ├── 419-battleships-in-a-board ├── 419-battleships-in-a-board.cpp ├── NOTES.md └── README.md ├── 42-trapping-rain-water ├── 42-trapping-rain-water.cpp ├── NOTES.md └── README.md ├── 421-maximum-xor-of-two-numbers-in-an-array ├── 421-maximum-xor-of-two-numbers-in-an-array.cpp ├── NOTES.md └── README.md ├── 423-reconstruct-original-digits-from-english ├── 423-reconstruct-original-digits-from-english.cpp ├── NOTES.md └── README.md ├── 424-longest-repeating-character-replacement ├── 424-longest-repeating-character-replacement.cpp ├── NOTES.md └── README.md ├── 426-convert-binary-search-tree-to-sorted-doubly-linked-list ├── 426-convert-binary-search-tree-to-sorted-doubly-linked-list.cpp ├── NOTES.md └── README.md ├── 428-serialize-and-deserialize-n-ary-tree ├── 428-serialize-and-deserialize-n-ary-tree.cpp ├── NOTES.md └── README.md ├── 429-n-ary-tree-level-order-traversal ├── NOTES.md └── README.md ├── 43-multiply-strings ├── 43-multiply-strings.cpp ├── NOTES.md └── README.md ├── 430-flatten-a-multilevel-doubly-linked-list ├── 430-flatten-a-multilevel-doubly-linked-list.cpp ├── NOTES.md └── README.md ├── 433-minimum-genetic-mutation ├── 433-minimum-genetic-mutation.cpp ├── NOTES.md └── README.md ├── 437-path-sum-iii ├── 437-path-sum-iii.cpp ├── NOTES.md └── README.md ├── 438-find-all-anagrams-in-a-string ├── 438-find-all-anagrams-in-a-string.cpp ├── NOTES.md └── README.md ├── 44-wildcard-matching ├── 44-wildcard-matching.cpp ├── NOTES.md └── README.md ├── 443-string-compression ├── 443-string-compression.cpp ├── NOTES.md └── README.md ├── 447-number-of-boomerangs ├── 447-number-of-boomerangs.cpp ├── NOTES.md └── README.md ├── 449-serialize-and-deserialize-bst ├── 449-serialize-and-deserialize-bst.cpp ├── NOTES.md └── README.md ├── 45-jump-game-ii ├── 45-jump-game-ii.cpp ├── NOTES.md └── README.md ├── 450-delete-node-in-a-bst ├── 450-delete-node-in-a-bst.cpp ├── NOTES.md └── README.md ├── 452-minimum-number-of-arrows-to-burst-balloons ├── 452-minimum-number-of-arrows-to-burst-balloons.cpp ├── NOTES.md └── README.md ├── 453-minimum-moves-to-equal-array-elements ├── 453-minimum-moves-to-equal-array-elements.cpp ├── NOTES.md └── README.md ├── 454-4sum-ii ├── 454-4sum-ii.cpp ├── NOTES.md └── README.md ├── 457-circular-array-loop ├── 457-circular-array-loop.cpp ├── NOTES.md └── README.md ├── 458-poor-pigs ├── 458-poor-pigs.cpp ├── NOTES.md └── README.md ├── 459-repeated-substring-pattern ├── 459-repeated-substring-pattern.cpp ├── NOTES.md └── README.md ├── 46-permutations ├── 46-permutations.cpp ├── NOTES.md └── README.md ├── 462-minimum-moves-to-equal-array-elements-ii ├── 462-minimum-moves-to-equal-array-elements-ii.cpp ├── NOTES.md └── README.md ├── 464-can-i-win ├── 464-can-i-win.cpp ├── NOTES.md └── README.md ├── 465-optimal-account-balancing ├── 465-optimal-account-balancing.cpp ├── NOTES.md └── README.md ├── 467-unique-substrings-in-wraparound-string ├── 467-unique-substrings-in-wraparound-string.cpp ├── NOTES.md └── README.md ├── 47-permutations-ii ├── 47-permutations-ii.cpp ├── NOTES.md └── README.md ├── 472-concatenated-words └── README.md ├── 473-matchsticks-to-square ├── 473-matchsticks-to-square.cpp ├── NOTES.md └── README.md ├── 474-ones-and-zeroes ├── 474-ones-and-zeroes.cpp ├── NOTES.md └── README.md ├── 475-heaters ├── 475-heaters.cpp ├── NOTES.md └── README.md ├── 477-total-hamming-distance ├── 477-total-hamming-distance.cpp ├── NOTES.md └── README.md ├── 48-rotate-image ├── 48-rotate-image.cpp └── README.md ├── 486-predict-the-winner ├── 486-predict-the-winner.cpp ├── NOTES.md └── README.md ├── 489-robot-room-cleaner ├── 489-robot-room-cleaner.cpp ├── NOTES.md └── README.md ├── 49-group-anagrams ├── NOTES.md └── README.md ├── 490-the-maze ├── 490-the-maze.cpp ├── NOTES.md └── README.md ├── 491-increasing-subsequences ├── 491-increasing-subsequences.cpp ├── NOTES.md └── README.md ├── 493-reverse-pairs ├── 493-reverse-pairs.cpp ├── NOTES.md └── README.md ├── 494-target-sum ├── 494-target-sum.cpp ├── NOTES.md └── README.md ├── 495-teemo-attacking ├── 495-teemo-attacking.cpp ├── NOTES.md └── README.md ├── 496-next-greater-element-i ├── 496-next-greater-element-i.cpp ├── NOTES.md └── README.md ├── 4sum-ii └── README.md ├── 4sum ├── 4sum.cpp └── README.md ├── 503-next-greater-element-ii ├── 503-next-greater-element-ii.cpp ├── NOTES.md └── README.md ├── 504-base-7 ├── 504-base-7.cpp ├── NOTES.md └── README.md ├── 505-the-maze-ii ├── 505-the-maze-ii.cpp ├── NOTES.md └── README.md ├── 509-fibonacci-number ├── 509-fibonacci-number.cpp └── NOTES.md ├── 51-n-queens ├── 51-n-queens.cpp ├── NOTES.md └── README.md ├── 510-inorder-successor-in-bst-ii ├── 510-inorder-successor-in-bst-ii.cpp ├── NOTES.md └── README.md ├── 513-find-bottom-left-tree-value ├── 513-find-bottom-left-tree-value.cpp ├── NOTES.md └── README.md ├── 515-find-largest-value-in-each-tree-row ├── 515-find-largest-value-in-each-tree-row.cpp └── NOTES.md ├── 518-coin-change-2 ├── 518-coin-change-2.cpp ├── NOTES.md └── README.md ├── 52-n-queens-ii ├── 52-n-queens-ii.cpp ├── NOTES.md └── README.md ├── 520-detect-capital ├── 520-detect-capital.cpp ├── NOTES.md └── README.md ├── 521-longest-uncommon-subsequence-i ├── 521-longest-uncommon-subsequence-i.cpp ├── NOTES.md └── README.md ├── 522-longest-uncommon-subsequence-ii ├── 522-longest-uncommon-subsequence-ii.cpp ├── NOTES.md └── README.md ├── 523-continuous-subarray-sum ├── 523-continuous-subarray-sum.cpp ├── NOTES.md └── README.md ├── 524-longest-word-in-dictionary-through-deleting ├── 524-longest-word-in-dictionary-through-deleting.cpp ├── NOTES.md └── README.md ├── 525-contiguous-array ├── 525-contiguous-array.cpp ├── NOTES.md └── README.md ├── 526-beautiful-arrangement ├── 526-beautiful-arrangement.cpp ├── NOTES.md └── README.md ├── 528-random-pick-with-weight ├── 528-random-pick-with-weight.cpp ├── NOTES.md └── README.md ├── 53-maximum-subarray ├── 53-maximum-subarray.cpp ├── NOTES.md └── README.md ├── 530-minimum-absolute-difference-in-bst ├── 530-minimum-absolute-difference-in-bst.cpp ├── NOTES.md └── README.md ├── 532-k-diff-pairs-in-an-array ├── 532-k-diff-pairs-in-an-array.cpp ├── NOTES.md └── README.md ├── 537-complex-number-multiplication ├── 537-complex-number-multiplication.cpp ├── NOTES.md └── README.md ├── 538-convert-bst-to-greater-tree ├── 538-convert-bst-to-greater-tree.cpp ├── NOTES.md └── README.md ├── 539-minimum-time-difference ├── 539-minimum-time-difference.cpp ├── NOTES.md └── README.md ├── 54-spiral-matrix ├── 54-spiral-matrix.cpp ├── NOTES.md └── README.md ├── 541-reverse-string-ii ├── 541-reverse-string-ii.cpp ├── NOTES.md └── README.md ├── 543-diameter-of-binary-tree ├── 543-diameter-of-binary-tree.cpp ├── NOTES.md └── README.md ├── 545-boundary-of-binary-tree ├── 545-boundary-of-binary-tree.cpp ├── NOTES.md └── README.md ├── 546-remove-boxes ├── 546-remove-boxes.cpp ├── NOTES.md └── README.md ├── 549-binary-tree-longest-consecutive-sequence-ii ├── 549-binary-tree-longest-consecutive-sequence-ii.cpp ├── NOTES.md └── README.md ├── 55-jump-game ├── 55-jump-game.cpp ├── NOTES.md └── README.md ├── 552-student-attendance-record-ii ├── 552-student-attendance-record-ii.cpp ├── NOTES.md └── README.md ├── 556-next-greater-element-iii ├── 556-next-greater-element-iii.cpp ├── NOTES.md └── README.md ├── 557-reverse-words-in-a-string-iii ├── 557-reverse-words-in-a-string-iii.cpp ├── NOTES.md └── README.md ├── 559-maximum-depth-of-n-ary-tree ├── 559-maximum-depth-of-n-ary-tree.cpp ├── NOTES.md └── README.md ├── 56-merge-intervals ├── 56-merge-intervals.cpp ├── NOTES.md └── README.md ├── 560-subarray-sum-equals-k ├── 560-subarray-sum-equals-k.cpp ├── NOTES.md └── README.md ├── 561-array-partition-i ├── 561-array-partition-i.cpp ├── NOTES.md └── README.md ├── 565-array-nesting ├── 565-array-nesting.cpp ├── NOTES.md └── README.md ├── 567-permutation-in-string ├── 567-permutation-in-string.cpp ├── NOTES.md └── README.md ├── 57-insert-interval ├── 57-insert-interval.cpp ├── NOTES.md └── README.md ├── 576-out-of-boundary-paths ├── 576-out-of-boundary-paths.cpp ├── NOTES.md └── README.md ├── 581-shortest-unsorted-continuous-subarray ├── 581-shortest-unsorted-continuous-subarray.cpp ├── NOTES.md └── README.md ├── 583-delete-operation-for-two-strings ├── 583-delete-operation-for-two-strings.cpp ├── NOTES.md └── README.md ├── 584-find-customer-referee ├── 584-find-customer-referee.sql ├── NOTES.md └── README.md ├── 589-n-ary-tree-preorder-traversal ├── 589-n-ary-tree-preorder-traversal.cpp ├── NOTES.md └── README.md ├── 59-spiral-matrix-ii ├── 59-spiral-matrix-ii.cpp ├── NOTES.md └── README.md ├── 592-fraction-addition-and-subtraction ├── 592-fraction-addition-and-subtraction.cpp ├── NOTES.md └── README.md ├── 595-big-countries ├── 595-big-countries.sql ├── NOTES.md └── README.md ├── 599-minimum-index-sum-of-two-lists ├── 599-minimum-index-sum-of-two-lists.cpp ├── NOTES.md └── README.md ├── 6-zigzag-conversion ├── 6-zigzag-conversion.cpp ├── NOTES.md └── README.md ├── 600-non-negative-integers-without-consecutive-ones ├── 600-non-negative-integers-without-consecutive-ones.cpp ├── NOTES.md └── README.md ├── 605-can-place-flowers ├── 605-can-place-flowers.cpp ├── NOTES.md └── README.md ├── 606-construct-string-from-binary-tree ├── 606-construct-string-from-binary-tree.cpp ├── NOTES.md └── README.md ├── 607-sales-person ├── 607-sales-person.sql ├── NOTES.md └── README.md ├── 608-tree-node ├── 608-tree-node.sql ├── NOTES.md └── README.md ├── 609-find-duplicate-file-in-system ├── 609-find-duplicate-file-in-system.cpp ├── NOTES.md └── README.md ├── 61-rotate-list ├── 61-rotate-list.cpp ├── NOTES.md └── README.md ├── 611-valid-triangle-number ├── 611-valid-triangle-number.cpp ├── NOTES.md └── README.md ├── 616-add-bold-tag-in-string ├── 616-add-bold-tag-in-string.cpp ├── NOTES.md └── README.md ├── 62-unique-paths ├── 62-unique-paths.cpp ├── NOTES.md └── README.md ├── 622-design-circular-queue ├── 622-design-circular-queue.cpp ├── NOTES.md └── README.md ├── 623-add-one-row-to-tree ├── 623-add-one-row-to-tree.cpp ├── NOTES.md └── README.md ├── 627-swap-salary ├── 627-swap-salary.sql ├── NOTES.md └── README.md ├── 63-unique-paths-ii ├── 63-unique-paths-ii.cpp ├── NOTES.md └── README.md ├── 630-course-schedule-iii ├── 630-course-schedule-iii.cpp └── README.md ├── 633-sum-of-square-numbers ├── 633-sum-of-square-numbers.cpp ├── NOTES.md └── README.md ├── 637-average-of-levels-in-binary-tree ├── NOTES.md └── README.md ├── 638-shopping-offers ├── 638-shopping-offers.cpp ├── NOTES.md └── README.md ├── 640-solve-the-equation ├── 640-solve-the-equation.cpp ├── NOTES.md └── README.md ├── 641-design-circular-deque ├── 641-design-circular-deque.cpp ├── NOTES.md └── README.md ├── 642-design-search-autocomplete-system ├── 642-design-search-autocomplete-system.cpp ├── NOTES.md └── README.md ├── 643-maximum-average-subarray-i ├── 643-maximum-average-subarray-i.cpp ├── NOTES.md └── README.md ├── 644-maximum-average-subarray-ii ├── 644-maximum-average-subarray-ii.cpp └── README.md ├── 646-maximum-length-of-pair-chain ├── 646-maximum-length-of-pair-chain.cpp ├── NOTES.md └── README.md ├── 647-palindromic-substrings ├── 647-palindromic-substrings.cpp ├── NOTES.md └── README.md ├── 648-replace-words ├── 648-replace-words.cpp ├── NOTES.md └── README.md ├── 649-dota2-senate ├── 649-dota2-senate.cpp ├── NOTES.md └── README.md ├── 653-two-sum-iv-input-is-a-bst ├── 653-two-sum-iv-input-is-a-bst.cpp ├── NOTES.md └── README.md ├── 654-maximum-binary-tree ├── 654-maximum-binary-tree.cpp ├── NOTES.md └── README.md ├── 658-find-k-closest-elements ├── 658-find-k-closest-elements.cpp ├── NOTES.md └── README.md ├── 659-split-array-into-consecutive-subsequences ├── 659-split-array-into-consecutive-subsequences.cpp ├── NOTES.md └── README.md ├── 662-maximum-width-of-binary-tree ├── 662-maximum-width-of-binary-tree.cpp ├── NOTES.md └── README.md ├── 665-non-decreasing-array ├── 665-non-decreasing-array.cpp ├── NOTES.md └── README.md ├── 669-trim-a-binary-search-tree ├── 669-trim-a-binary-search-tree.cpp ├── NOTES.md └── README.md ├── 67-add-binary ├── 67-add-binary.cpp ├── NOTES.md └── README.md ├── 677-map-sum-pairs ├── 677-map-sum-pairs.cpp ├── NOTES.md └── README.md ├── 678-valid-parenthesis-string ├── 678-valid-parenthesis-string.cpp ├── NOTES.md └── README.md ├── 68-text-justification ├── 68-text-justification.cpp ├── NOTES.md └── README.md ├── 680-valid-palindrome-ii ├── 680-valid-palindrome-ii.cpp ├── NOTES.md └── README.md ├── 682-baseball-game ├── 682-baseball-game.cpp ├── NOTES.md └── README.md ├── 686-repeated-string-match ├── 686-repeated-string-match.cpp ├── NOTES.md └── README.md ├── 687-longest-univalue-path ├── 687-longest-univalue-path.cpp ├── NOTES.md └── README.md ├── 692-top-k-frequent-words ├── 692-top-k-frequent-words.cpp ├── NOTES.md └── README.md ├── 697-degree-of-an-array ├── 697-degree-of-an-array.cpp ├── NOTES.md └── README.md ├── 698-partition-to-k-equal-sum-subsets ├── 698-partition-to-k-equal-sum-subsets.cpp ├── NOTES.md └── README.md ├── 7-reverse-integer ├── 7-reverse-integer.cpp ├── NOTES.md └── README.md ├── 70-climbing-stairs ├── 70-climbing-stairs.cpp ├── NOTES.md └── README.md ├── 700-search-in-a-binary-search-tree ├── 700-search-in-a-binary-search-tree.cpp ├── NOTES.md └── README.md ├── 701-insert-into-a-binary-search-tree ├── 701-insert-into-a-binary-search-tree.cpp ├── NOTES.md └── README.md ├── 705-design-hashset ├── 705-design-hashset.cpp ├── NOTES.md └── README.md ├── 707-design-linked-list ├── 707-design-linked-list.cpp ├── NOTES.md └── README.md ├── 71-simplify-path ├── 71-simplify-path.cpp └── README.md ├── 715-range-module ├── 715-range-module.cpp ├── NOTES.md └── README.md ├── 718-maximum-length-of-repeated-subarray ├── 718-maximum-length-of-repeated-subarray.cpp └── README.md ├── 720-longest-word-in-dictionary ├── 720-longest-word-in-dictionary.cpp ├── NOTES.md └── README.md ├── 724-find-pivot-index ├── 724-find-pivot-index.cpp ├── NOTES.md └── README.md ├── 729-my-calendar-i ├── 729-my-calendar-i.cpp ├── NOTES.md └── README.md ├── 731-my-calendar-ii ├── 731-my-calendar-ii.cpp ├── NOTES.md └── README.md ├── 732-my-calendar-iii ├── 732-my-calendar-iii.cpp ├── NOTES.md └── README.md ├── 735-asteroid-collision ├── 735-asteroid-collision.cpp ├── NOTES.md └── README.md ├── 738-monotone-increasing-digits ├── 738-monotone-increasing-digits.cpp ├── NOTES.md └── README.md ├── 739-daily-temperatures ├── 739-daily-temperatures.cpp ├── NOTES.md └── README.md ├── 74-search-a-2d-matrix ├── 74-search-a-2d-matrix.cpp ├── NOTES.md └── README.md ├── 740-delete-and-earn ├── 740-delete-and-earn.cpp ├── NOTES.md └── README.md ├── 741-cherry-pickup ├── 741-cherry-pickup.cpp ├── NOTES.md └── README.md ├── 743-network-delay-time ├── 743-network-delay-time.cpp ├── NOTES.md └── README.md ├── 745-prefix-and-suffix-search ├── 745-prefix-and-suffix-search.cpp ├── NOTES.md └── README.md ├── 746-min-cost-climbing-stairs ├── 746-min-cost-climbing-stairs.cpp └── NOTES.md ├── 754-reach-a-number ├── 754-reach-a-number.cpp ├── NOTES.md └── README.md ├── 758-bold-words-in-string ├── 758-bold-words-in-string.cpp ├── NOTES.md └── README.md ├── 759-employee-free-time ├── 759-employee-free-time.cpp ├── NOTES.md └── README.md ├── 76-minimum-window-substring ├── 76-minimum-window-substring.cpp ├── NOTES.md └── README.md ├── 763-partition-labels ├── 763-partition-labels.cpp ├── NOTES.md └── README.md ├── 765-couples-holding-hands ├── 765-couples-holding-hands.cpp ├── NOTES.md └── README.md ├── 766-toeplitz-matrix ├── 766-toeplitz-matrix.cpp ├── NOTES.md └── README.md ├── 768-max-chunks-to-make-sorted-ii ├── 768-max-chunks-to-make-sorted-ii.cpp ├── NOTES.md └── README.md ├── 769-max-chunks-to-make-sorted ├── 769-max-chunks-to-make-sorted.cpp ├── NOTES.md └── README.md ├── 775-global-and-local-inversions ├── 775-global-and-local-inversions.cpp ├── NOTES.md └── README.md ├── 777-swap-adjacent-in-lr-string ├── 777-swap-adjacent-in-lr-string.cpp ├── NOTES.md └── README.md ├── 778-swim-in-rising-water ├── 778-swim-in-rising-water.cpp ├── NOTES.md └── README.md ├── 78-subsets ├── 78-subsets.cpp ├── NOTES.md └── README.md ├── 781-rabbits-in-forest ├── 781-rabbits-in-forest.cpp ├── NOTES.md └── README.md ├── 783-minimum-distance-between-bst-nodes ├── 783-minimum-distance-between-bst-nodes.cpp ├── NOTES.md └── README.md ├── 785-is-graph-bipartite ├── 785-is-graph-bipartite.cpp ├── NOTES.md └── README.md ├── 787-cheapest-flights-within-k-stops ├── 787-cheapest-flights-within-k-stops.cpp ├── NOTES.md └── README.md ├── 788-rotated-digits ├── 788-rotated-digits.cpp ├── NOTES.md └── README.md ├── 791-custom-sort-string ├── 791-custom-sort-string.cpp ├── NOTES.md └── README.md ├── 792-number-of-matching-subsequences ├── 792-number-of-matching-subsequences.cpp ├── NOTES.md └── README.md ├── 794-valid-tic-tac-toe-state ├── NOTES.md └── README.md ├── 795-number-of-subarrays-with-bounded-maximum ├── 795-number-of-subarrays-with-bounded-maximum.cpp ├── NOTES.md └── README.md ├── 796-rotate-string ├── 796-rotate-string.cpp ├── NOTES.md └── README.md ├── 799-champagne-tower ├── 799-champagne-tower.cpp ├── NOTES.md └── README.md ├── 8-string-to-integer-atoi ├── 8-string-to-integer-atoi.cpp ├── NOTES.md └── README.md ├── 80-remove-duplicates-from-sorted-array-ii ├── 80-remove-duplicates-from-sorted-array-ii.cpp ├── NOTES.md └── README.md ├── 801-minimum-swaps-to-make-sequences-increasing ├── 801-minimum-swaps-to-make-sequences-increasing.cpp ├── NOTES.md └── README.md ├── 804-unique-morse-code-words ├── 804-unique-morse-code-words.cpp ├── NOTES.md └── README.md ├── 807-max-increase-to-keep-city-skyline ├── 807-max-increase-to-keep-city-skyline.cpp ├── NOTES.md └── README.md ├── 811-subdomain-visit-count ├── 811-subdomain-visit-count.cpp ├── NOTES.md └── README.md ├── 813-largest-sum-of-averages ├── 813-largest-sum-of-averages.cpp ├── NOTES.md └── README.md ├── 814-binary-tree-pruning ├── 814-binary-tree-pruning.cpp ├── NOTES.md └── README.md ├── 818-race-car ├── 818-race-car.cpp ├── NOTES.md └── README.md ├── 82-remove-duplicates-from-sorted-list-ii ├── 82-remove-duplicates-from-sorted-list-ii.cpp ├── NOTES.md └── README.md ├── 820-short-encoding-of-words ├── 820-short-encoding-of-words.cpp ├── NOTES.md └── README.md ├── 821-shortest-distance-to-a-character ├── 821-shortest-distance-to-a-character.cpp ├── NOTES.md └── README.md ├── 823-binary-trees-with-factors ├── 823-binary-trees-with-factors.cpp ├── NOTES.md └── README.md ├── 825-friends-of-appropriate-ages ├── 825-friends-of-appropriate-ages.cpp ├── NOTES.md └── README.md ├── 826-most-profit-assigning-work ├── 826-most-profit-assigning-work.cpp ├── NOTES.md └── README.md ├── 828-count-unique-characters-of-all-substrings-of-a-given-string ├── 828-count-unique-characters-of-all-substrings-of-a-given-string.cpp ├── NOTES.md └── README.md ├── 832-flipping-an-image ├── 832-flipping-an-image.cpp ├── NOTES.md └── README.md ├── 833-find-and-replace-in-string ├── 833-find-and-replace-in-string.cpp └── NOTES.md ├── 834-sum-of-distances-in-tree ├── 834-sum-of-distances-in-tree.cpp ├── NOTES.md └── README.md ├── 836-rectangle-overlap ├── 836-rectangle-overlap.cpp ├── NOTES.md └── README.md ├── 838-push-dominoes ├── 838-push-dominoes.cpp └── README.md ├── 84-largest-rectangle-in-histogram ├── 84-largest-rectangle-in-histogram.cpp ├── NOTES.md └── README.md ├── 842-split-array-into-fibonacci-sequence ├── 842-split-array-into-fibonacci-sequence.cpp ├── NOTES.md └── README.md ├── 843-guess-the-word ├── 843-guess-the-word.cpp ├── NOTES.md └── README.md ├── 845-longest-mountain-in-array ├── 845-longest-mountain-in-array.cpp ├── NOTES.md └── README.md ├── 846-hand-of-straights ├── 846-hand-of-straights.cpp ├── NOTES.md └── README.md ├── 847-shortest-path-visiting-all-nodes ├── 847-shortest-path-visiting-all-nodes.cpp ├── NOTES.md └── README.md ├── 849-maximize-distance-to-closest-person ├── 849-maximize-distance-to-closest-person.cpp ├── NOTES.md └── README.md ├── 85-maximal-rectangle ├── 85-maximal-rectangle.cpp ├── NOTES.md └── README.md ├── 851-loud-and-rich ├── 851-loud-and-rich.cpp ├── NOTES.md └── README.md ├── 852-peak-index-in-a-mountain-array ├── 852-peak-index-in-a-mountain-array.cpp ├── NOTES.md └── README.md ├── 853-car-fleet ├── 853-car-fleet.cpp ├── NOTES.md └── README.md ├── 856-score-of-parentheses ├── 856-score-of-parentheses.cpp ├── NOTES.md └── README.md ├── 858-mirror-reflection ├── 858-mirror-reflection.cpp ├── NOTES.md └── README.md ├── 86-partition-list ├── 86-partition-list.cpp ├── NOTES.md └── README.md ├── 862-shortest-subarray-with-sum-at-least-k ├── 862-shortest-subarray-with-sum-at-least-k.cpp ├── NOTES.md └── README.md ├── 863-all-nodes-distance-k-in-binary-tree ├── 863-all-nodes-distance-k-in-binary-tree.cpp ├── NOTES.md └── README.md ├── 865-smallest-subtree-with-all-the-deepest-nodes ├── 865-smallest-subtree-with-all-the-deepest-nodes.cpp ├── NOTES.md └── README.md ├── 867-transpose-matrix ├── 867-transpose-matrix.cpp ├── NOTES.md └── README.md ├── 87-scramble-string ├── 87-scramble-string.cpp ├── NOTES.md └── README.md ├── 871-minimum-number-of-refueling-stops ├── NOTES.md └── README.md ├── 873-length-of-longest-fibonacci-subsequence ├── 873-length-of-longest-fibonacci-subsequence.cpp ├── NOTES.md └── README.md ├── 875-koko-eating-bananas ├── 875-koko-eating-bananas.cpp ├── NOTES.md └── README.md ├── 877-stone-game ├── 877-stone-game.cpp ├── NOTES.md └── README.md ├── 878-nth-magical-number ├── 878-nth-magical-number.cpp ├── NOTES.md └── README.md ├── 88-merge-sorted-array ├── 88-merge-sorted-array.cpp ├── NOTES.md └── README.md ├── 881-boats-to-save-people ├── 881-boats-to-save-people.cpp ├── NOTES.md └── README.md ├── 883-projection-area-of-3d-shapes ├── 883-projection-area-of-3d-shapes.cpp ├── NOTES.md └── README.md ├── 886-possible-bipartition ├── 886-possible-bipartition.cpp ├── NOTES.md └── README.md ├── 887-super-egg-drop ├── 887-super-egg-drop.cpp ├── NOTES.md └── README.md ├── 89-gray-code ├── 89-gray-code.cpp ├── NOTES.md └── README.md ├── 890-find-and-replace-pattern ├── 890-find-and-replace-pattern.cpp ├── NOTES.md └── README.md ├── 894-all-possible-full-binary-trees ├── 894-all-possible-full-binary-trees.cpp ├── NOTES.md └── README.md ├── 897-increasing-order-search-tree ├── 897-increasing-order-search-tree.cpp ├── NOTES.md └── README.md ├── 90-subsets-ii ├── 90-subsets-ii.cpp ├── NOTES.md └── README.md ├── 904-fruit-into-baskets ├── 904-fruit-into-baskets.cpp ├── NOTES.md └── README.md ├── 905-sort-array-by-parity ├── NOTES.md └── README.md ├── 907-sum-of-subarray-minimums ├── 907-sum-of-subarray-minimums.cpp ├── NOTES.md └── README.md ├── 909-snakes-and-ladders ├── 909-snakes-and-ladders.cpp ├── NOTES.md └── README.md ├── 91-decode-ways ├── 91-decode-ways.cpp ├── NOTES.md └── README.md ├── 912-sort-an-array ├── 912-sort-an-array.cpp ├── NOTES.md └── README.md ├── 915-partition-array-into-disjoint-intervals ├── 915-partition-array-into-disjoint-intervals.cpp ├── NOTES.md └── README.md ├── 916-word-subsets ├── 916-word-subsets.cpp ├── NOTES.md └── README.md ├── 917-reverse-only-letters ├── NOTES.md └── README.md ├── 918-maximum-sum-circular-subarray ├── 918-maximum-sum-circular-subarray.cpp ├── NOTES.md └── README.md ├── 919-complete-binary-tree-inserter ├── 919-complete-binary-tree-inserter.cpp ├── NOTES.md └── README.md ├── 92-reverse-linked-list-ii ├── 92-reverse-linked-list-ii.cpp ├── NOTES.md └── README.md ├── 921-minimum-add-to-make-parentheses-valid ├── 921-minimum-add-to-make-parentheses-valid.cpp ├── NOTES.md └── README.md ├── 922-sort-array-by-parity-ii ├── 922-sort-array-by-parity-ii.cpp ├── NOTES.md └── README.md ├── 923-3sum-with-multiplicity ├── 923-3sum-with-multiplicity.cpp ├── NOTES.md └── README.md ├── 925-long-pressed-name ├── 925-long-pressed-name.cpp ├── NOTES.md └── README.md ├── 926-flip-string-to-monotone-increasing ├── 926-flip-string-to-monotone-increasing.cpp ├── NOTES.md └── README.md ├── 929-unique-email-addresses ├── 929-unique-email-addresses.cpp └── NOTES.md ├── 93-restore-ip-addresses ├── 93-restore-ip-addresses.cpp ├── NOTES.md └── README.md ├── 930-binary-subarrays-with-sum ├── 930-binary-subarrays-with-sum.cpp ├── NOTES.md └── README.md ├── 936-stamping-the-sequence ├── NOTES.md └── README.md ├── 937-reorder-data-in-log-files ├── 937-reorder-data-in-log-files.cpp ├── NOTES.md └── README.md ├── 938-range-sum-of-bst ├── 938-range-sum-of-bst.cpp ├── NOTES.md └── README.md ├── 939-minimum-area-rectangle ├── 939-minimum-area-rectangle.cpp ├── NOTES.md └── README.md ├── 94-binary-tree-inorder-traversal ├── 94-binary-tree-inorder-traversal.cpp ├── NOTES.md └── README.md ├── 941-valid-mountain-array ├── 941-valid-mountain-array.cpp ├── NOTES.md └── README.md ├── 942-di-string-match ├── 942-di-string-match.cpp ├── NOTES.md └── README.md ├── 944-delete-columns-to-make-sorted ├── 944-delete-columns-to-make-sorted.cpp ├── NOTES.md └── README.md ├── 945-minimum-increment-to-make-array-unique ├── 945-minimum-increment-to-make-array-unique.cpp ├── NOTES.md └── README.md ├── 946-validate-stack-sequences ├── 946-validate-stack-sequences.cpp ├── NOTES.md └── README.md ├── 948-bag-of-tokens ├── 948-bag-of-tokens.cpp ├── NOTES.md └── README.md ├── 949-largest-time-for-given-digits ├── 949-largest-time-for-given-digits.cpp ├── NOTES.md └── README.md ├── 95-unique-binary-search-trees-ii ├── 95-unique-binary-search-trees-ii.cpp ├── NOTES.md └── README.md ├── 950-reveal-cards-in-increasing-order ├── 950-reveal-cards-in-increasing-order.cpp ├── NOTES.md └── README.md ├── 953-verifying-an-alien-dictionary ├── 953-verifying-an-alien-dictionary.cpp └── NOTES.md ├── 954-array-of-doubled-pairs ├── 954-array-of-doubled-pairs.cpp ├── NOTES.md └── README.md ├── 955-delete-columns-to-make-sorted-ii ├── 955-delete-columns-to-make-sorted-ii.cpp └── NOTES.md ├── 959-regions-cut-by-slashes ├── 959-regions-cut-by-slashes.cpp ├── NOTES.md └── README.md ├── 96-unique-binary-search-trees ├── 96-unique-binary-search-trees.cpp ├── NOTES.md └── README.md ├── 962-maximum-width-ramp ├── 962-maximum-width-ramp.cpp ├── NOTES.md └── README.md ├── 967-numbers-with-same-consecutive-differences ├── NOTES.md └── README.md ├── 968-binary-tree-cameras ├── 968-binary-tree-cameras.cpp ├── NOTES.md └── README.md ├── 969-pancake-sorting ├── 969-pancake-sorting.cpp ├── NOTES.md └── README.md ├── 97-interleaving-string ├── 97-interleaving-string.cpp ├── NOTES.md └── README.md ├── 974-subarray-sums-divisible-by-k ├── 974-subarray-sums-divisible-by-k.cpp ├── NOTES.md └── README.md ├── 975-odd-even-jump ├── 975-odd-even-jump.cpp ├── NOTES.md └── README.md ├── 978-longest-turbulent-subarray ├── 978-longest-turbulent-subarray.cpp ├── NOTES.md └── README.md ├── 979-distribute-coins-in-binary-tree ├── 979-distribute-coins-in-binary-tree.cpp ├── NOTES.md └── README.md ├── 98-validate-binary-search-tree ├── 98-validate-binary-search-tree.cpp ├── NOTES.md └── README.md ├── 981-time-based-key-value-store ├── 981-time-based-key-value-store.cpp ├── NOTES.md └── README.md ├── 983-minimum-cost-for-tickets ├── 983-minimum-cost-for-tickets.cpp ├── NOTES.md └── README.md ├── 985-sum-of-even-numbers-after-queries ├── 985-sum-of-even-numbers-after-queries.cpp └── README.md ├── 986-interval-list-intersections ├── NOTES.md └── README.md ├── 987-vertical-order-traversal-of-a-binary-tree ├── 987-vertical-order-traversal-of-a-binary-tree.cpp ├── NOTES.md └── README.md ├── 992-subarrays-with-k-different-integers ├── 992-subarrays-with-k-different-integers.cpp └── NOTES.md ├── 993-cousins-in-binary-tree ├── 993-cousins-in-binary-tree.cpp ├── NOTES.md └── README.md ├── 997-find-the-town-judge ├── 997-find-the-town-judge.cpp ├── NOTES.md └── README.md ├── 998-maximum-binary-tree-ii ├── 998-maximum-binary-tree-ii.cpp ├── NOTES.md └── README.md ├── 999-available-captures-for-rook ├── 999-available-captures-for-rook.cpp ├── NOTES.md └── README.md ├── Minimum Swaps to Sort - GFG ├── README.md └── minimum-swaps-to-sort.cpp ├── README.md ├── burst-balloons ├── README.md └── burst-balloons.cpp ├── container-with-most-water └── README.md ├── course-schedule-ii ├── README.md └── course-schedule-ii.cpp ├── course-schedule ├── README.md └── course-schedule.cpp ├── design-hashmap ├── README.md └── design-hashmap.cpp ├── excel-sheet-column-number ├── README.md └── excel-sheet-column-number.cpp ├── factorial-trailing-zeroes ├── README.md └── factorial-trailing-zeroes.cpp ├── find-median-from-data-stream ├── README.md └── find-median-from-data-stream.cpp ├── find-minimum-in-rotated-sorted-array-ii ├── README.md └── find-minimum-in-rotated-sorted-array-ii.cpp ├── find-minimum-in-rotated-sorted-array ├── README.md └── find-minimum-in-rotated-sorted-array.cpp ├── find-peak-element ├── README.md └── find-peak-element.cpp ├── find-smallest-letter-greater-than-target ├── README.md └── find-smallest-letter-greater-than-target.cpp ├── find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance ├── README.md └── find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance.cpp ├── find-the-town-judge ├── README.md └── find-the-town-judge.cpp ├── furthest-building-you-can-reach ├── README.md └── furthest-building-you-can-reach.cpp ├── guess-number-higher-or-lower ├── README.md └── guess-number-higher-or-lower.cpp ├── happy-number ├── README.md └── happy-number.cpp ├── increasing-triplet-subsequence ├── README.md └── increasing-triplet-subsequence.cpp ├── intersection-of-two-arrays ├── README.md └── intersection-of-two-arrays.cpp ├── jump-game ├── README.md └── jump-game.cpp ├── k-closest-points-to-origin └── README.md ├── kth-smallest-element-in-a-sorted-matrix ├── README.md └── kth-smallest-element-in-a-sorted-matrix.cpp ├── length-of-last-word ├── README.md └── length-of-last-word.cpp ├── longest-increasing-subsequence ├── README.md └── longest-increasing-subsequence.cpp ├── majority-element ├── README.md └── majority-element.cpp ├── maximum-depth-of-n-ary-tree ├── README.md └── maximum-depth-of-n-ary-tree.cpp ├── maximum-difference-between-node-and-ancestor ├── README.md └── maximum-difference-between-node-and-ancestor.cpp ├── meeting-rooms-ii ├── README.md └── meeting-rooms-ii.cpp ├── meeting-rooms ├── README.md └── meeting-rooms.cpp ├── merge-intervals ├── README.md └── merge-intervals.cpp ├── minimum-cost-to-connect-sticks ├── README.md └── minimum-cost-to-connect-sticks.cpp ├── minimum-number-of-days-to-make-m-bouquets ├── README.md └── minimum-number-of-days-to-make-m-bouquets.cpp ├── n-ary-tree-postorder-traversal ├── README.md └── n-ary-tree-postorder-traversal.cpp ├── n-ary-tree-preorder-traversal ├── README.md └── n-ary-tree-preorder-traversal.cpp ├── network-delay-time └── README.md ├── number-of-segments-in-a-string ├── README.md └── number-of-segments-in-a-string.cpp ├── online-election ├── README.md └── online-election.cpp ├── pairs-of-songs-with-total-durations-divisible-by-60 ├── README.md └── pairs-of-songs-with-total-durations-divisible-by-60.cpp ├── palindrome-number ├── README.md └── palindrome-number.cpp ├── product-of-array-except-self ├── README.md └── product-of-array-except-self.cpp ├── search-in-rotated-sorted-array-ii ├── README.md └── search-in-rotated-sorted-array-ii.cpp ├── search-in-rotated-sorted-array ├── README.md └── search-in-rotated-sorted-array.cpp ├── single-number └── README.md ├── smallest-integer-divisible-by-k ├── README.md └── smallest-integer-divisible-by-k.cpp ├── sort-colors ├── README.md └── sort-colors.cpp ├── spiral-matrix ├── README.md └── spiral-matrix.cpp ├── sqrtx ├── README.md └── sqrtx.cpp ├── subarray-sum-equals-k ├── README.md └── subarray-sum-equals-k.cpp ├── the-k-weakest-rows-in-a-matrix ├── README.md └── the-k-weakest-rows-in-a-matrix.cpp ├── top-k-frequent-elements ├── README.md └── top-k-frequent-elements.cpp ├── two-sum ├── README.md └── two-sum.cpp ├── unique-binary-search-trees-ii ├── README.md └── unique-binary-search-trees-ii.cpp └── validate-ip-address ├── README.md └── validate-ip-address.cpp /0012-integer-to-roman/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0036-valid-sudoku/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0038-count-and-say/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0049-group-anagrams/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0076-minimum-window-substring/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0079-word-search/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0134-gas-station/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0151-reverse-words-in-a-string/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0219-contains-duplicate-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0224-basic-calculator/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0237-delete-node-in-a-linked-list/0237-delete-node-in-a-linked-list.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | void deleteNode(ListNode* node) { 4 | if(node == NULL) return; 5 | ListNode *tmp = node->next; 6 | node->val = tmp->val; 7 | node->next = tmp->next; 8 | delete tmp; 9 | } 10 | }; -------------------------------------------------------------------------------- /0237-delete-node-in-a-linked-list/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0273-integer-to-english-words/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0279-perfect-squares/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0345-reverse-vowels-of-a-string/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0452-minimum-number-of-arrows-to-burst-balloons/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0500-keyboard-row/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0523-continuous-subarray-sum/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0587-erect-the-fence/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0632-smallest-range-covering-elements-from-k-lists/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0766-toeplitz-matrix/0766-toeplitz-matrix.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | bool isToeplitzMatrix(vector>& matrix) { 4 | for (int i = 0; i < matrix.size() - 1; i++) { 5 | for (int j = 0; j < matrix[0].size() - 1; j++) { 6 | if (matrix[i][j] != matrix[i + 1][j + 1]) 7 | return false; 8 | } 9 | } 10 | return true; 11 | } 12 | }; -------------------------------------------------------------------------------- /0766-toeplitz-matrix/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0835-image-overlap/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0880-decoded-string-at-index/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0901-online-stock-span/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0934-shortest-bridge/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0945-minimum-increment-to-make-array-unique/0945-minimum-increment-to-make-array-unique.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int minIncrementForUnique(vector& nums) { 4 | sort(begin(nums),end(nums)); 5 | int ans = 0; 6 | int req = 0; 7 | for(auto it:nums){ 8 | ans += max(req - it,0); 9 | req = max(req,it)+1; 10 | } 11 | return ans; 12 | } 13 | }; -------------------------------------------------------------------------------- /0945-minimum-increment-to-make-array-unique/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /0976-largest-perimeter-triangle/0976-largest-perimeter-triangle.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int largestPerimeter(vector& A) { 4 | sort(begin(A), end(A)); 5 | for (auto i = A.size() - 1; i >= 2; --i) 6 | if (A[i] < A[i - 1] + A[i - 2]) 7 | return A[i] + A[i - 1] + A[i - 2]; 8 | return 0; 9 | } 10 | }; -------------------------------------------------------------------------------- /0976-largest-perimeter-triangle/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /10-regular-expression-matching/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /100-same-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1001-grid-illumination/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1003-check-if-word-is-valid-after-substitutions/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1008-construct-binary-search-tree-from-preorder-traversal/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1009-complement-of-base-10-integer/1009-complement-of-base-10-integer.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | 4 | int bitwiseComplement(int N) { 5 | int comp = 1; 6 | while (comp < N) 7 | comp = (comp << 1) | 1; 8 | return N ^ comp; 9 | } 10 | }; -------------------------------------------------------------------------------- /1009-complement-of-base-10-integer/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1012-numbers-with-repeated-digits/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1013-partition-array-into-three-parts-with-equal-sum/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1017-convert-to-base-2/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1018-binary-prefix-divisible-by-5/1018-binary-prefix-divisible-by-5.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | vector prefixesDivBy5(vector& nums) { 4 | long long x = 0; 5 | vector ans; 6 | for(int i=0; i& height) { 4 | int i=0,j=height.size()-1; 5 | int ans = 0; 6 | while(iheight[j]?j--:i++; 11 | } 12 | return ans; 13 | } 14 | }; -------------------------------------------------------------------------------- /11-container-with-most-water/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /110-balanced-binary-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1102-path-with-maximum-minimum-value/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1105-filling-bookcase-shelves/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1109-corporate-flight-bookings/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /111-minimum-depth-of-binary-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /112-path-sum/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1123-lowest-common-ancestor-of-deepest-leaves/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1124-longest-well-performing-interval/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1129-shortest-path-with-alternating-colors/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /113-path-sum-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1130-minimum-cost-tree-from-leaf-values/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1131-maximum-of-absolute-value-expression/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1135-connecting-cities-with-minimum-cost/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /114-flatten-binary-tree-to-linked-list/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1145-binary-tree-coloring-game/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1146-snapshot-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1148-article-views-i/1148-article-views-i.sql: -------------------------------------------------------------------------------- 1 | SELECT DISTINCT author_id AS id FROM Views 2 | where author_id = viewer_id 3 | ORDER BY id -------------------------------------------------------------------------------- /1148-article-views-i/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /115-distinct-subsequences/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1151-minimum-swaps-to-group-all-1s-together/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1155-number-of-dice-rolls-with-target-sum/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1157-online-majority-element-in-subarray/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1161-maximum-level-sum-of-a-binary-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1163-last-substring-in-lexicographical-order/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1166-design-file-system/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1168-optimize-water-distribution-in-a-village/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /117-populating-next-right-pointers-in-each-node-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1177-can-make-palindrome-from-substring/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /118-pascals-triangle/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1182-shortest-distance-to-target-color/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1187-make-array-strictly-increasing/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1192-critical-connections-in-a-network/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1197-minimum-knight-moves/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /12-integer-to-roman/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /120-triangle/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1207-unique-number-of-occurrences/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1208-get-equal-substrings-within-budget/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /121-best-time-to-buy-and-sell-stock/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1217-minimum-cost-to-move-chips-to-the-same-position/1217-minimum-cost-to-move-chips-to-the-same-position.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int minCostToMoveChips(vector& position) { 4 | int odds = 0, evens = 0; 5 | for(auto it:position) 6 | { 7 | it%2==0?evens++:odds++; 8 | } 9 | return min(evens,odds); 10 | } 11 | }; -------------------------------------------------------------------------------- /1217-minimum-cost-to-move-chips-to-the-same-position/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1218-longest-arithmetic-subsequence-of-given-difference/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1219-path-with-maximum-gold/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /122-best-time-to-buy-and-sell-stock-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1220-count-vowels-permutation/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1229-meeting-scheduler/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /123-best-time-to-buy-and-sell-stock-iii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1231-divide-chocolate/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1233-remove-sub-folders-from-the-filesystem/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1235-maximum-profit-in-job-scheduling/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1239-maximum-length-of-a-concatenated-string-with-unique-characters/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /124-binary-tree-maximum-path-sum/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1245-tree-diameter/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1247-minimum-swaps-to-make-strings-equal/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1248-count-number-of-nice-subarrays/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1249-minimum-remove-to-make-valid-parentheses/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /125-valid-palindrome/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1250-check-if-it-is-a-good-array/1250-check-if-it-is-a-good-array.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | bool isGoodArray(vector& nums) { 4 | int n = nums.size(); 5 | int ans = nums[0]; 6 | for(int i=1; i sumZero(int n) { 4 | vector A(n); 5 | for (int i = 0; i < n; ++i) 6 | A[i] = i * 2 - n + 1; 7 | return A; 8 | } 9 | }; -------------------------------------------------------------------------------- /1304-find-n-unique-integers-sum-up-to-zero/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1305-all-elements-in-two-binary-search-trees/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1306-jump-game-iii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /131-palindrome-partitioning/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1310-xor-queries-of-a-subarray/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1318-minimum-flips-to-make-a-or-b-equal-to-c/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /132-palindrome-partitioning-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1323-maximum-69-number/1323-maximum-69-number.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int maximum69Number (int num) { 4 | string s = to_string(num); 5 | for(int i=0; i& nums) { 4 | int ans = 0; 5 | for(auto it:nums) 6 | ans^=it; 7 | return ans; 8 | } 9 | }; -------------------------------------------------------------------------------- /136-single-number/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1361-validate-binary-tree-nodes/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1366-rank-teams-by-votes/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1367-linked-list-in-binary-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /137-single-number-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1371-find-the-longest-substring-containing-vowels-in-even-counts/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1373-maximum-sum-bst-in-binary-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1376-time-needed-to-inform-all-employees/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1379-find-a-corresponding-node-of-a-binary-tree-in-a-clone-of-that-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /138-copy-list-with-random-pointer/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1380-lucky-numbers-in-a-matrix/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1381-design-a-stack-with-increment-operation/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1382-balance-a-binary-search-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1383-maximum-performance-of-a-team/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1385-find-the-distance-value-between-two-arrays/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1387-sort-integers-by-the-power-value/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1391-check-if-there-is-a-valid-path-in-a-grid/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1392-longest-happy-prefix/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1395-count-number-of-teams/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /140-word-break-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1400-construct-k-palindrome-strings/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1404-number-of-steps-to-reduce-a-number-in-binary-representation-to-one/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1408-string-matching-in-an-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1409-queries-on-a-permutation-with-key/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /141-linked-list-cycle/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1414-find-the-minimum-number-of-fibonacci-numbers-whose-sum-is-k/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1417-reformat-the-string/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1419-minimum-number-of-frogs-croaking/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /142-linked-list-cycle-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1423-maximum-points-you-can-obtain-from-cards/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /143-reorder-list/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1433-check-if-a-string-can-break-another-string/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1434-number-of-ways-to-wear-different-hats-to-each-other/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1438-longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /144-binary-tree-preorder-traversal/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1442-count-triplets-that-can-form-two-arrays-of-equal-xor/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1447-simplified-fractions/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1448-count-good-nodes-in-binary-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /145-binary-tree-postorder-traversal/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1455-check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1456-maximum-number-of-vowels-in-a-substring-of-given-length/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1457-pseudo-palindromic-paths-in-a-binary-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /146-lru-cache/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1461-check-if-a-string-contains-all-binary-codes-of-size-k/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1462-course-schedule-iv/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1463-cherry-pickup-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1465-maximum-area-of-a-piece-of-cake-after-horizontal-and-vertical-cuts/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1472-design-browser-history/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1473-paint-house-iii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1477-find-two-non-overlapping-sub-arrays-each-with-target-sum/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1478-allocate-mailboxes/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /148-sort-list/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1480-running-sum-of-1d-array/1480-running-sum-of-1d-array.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | vector runningSum(vector& nums) { 4 | for(int i=1;i& A) { 4 | int res = 0, n = A.size(); 5 | for (int i = 0; i < n; ++i) { 6 | res += ((i + 1) * (n - i) + 1) / 2 * A[i]; 7 | } 8 | return res; 9 | } 10 | 11 | }; -------------------------------------------------------------------------------- /1588-sum-of-all-odd-length-subarrays/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1591-strange-printer-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /16-3sum-closest/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /160-intersection-of-two-linked-lists/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1603-design-parking-system/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1605-find-valid-matrix-given-row-and-column-sums/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1610-maximum-number-of-visible-points/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /162-find-peak-element/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1621-number-of-sets-of-k-non-overlapping-line-segments/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1626-best-team-with-no-conflicts/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1630-arithmetic-subarrays/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1631-path-with-minimum-effort/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1638-count-substrings-that-differ-by-one-character/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /164-maximum-gap/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1641-count-sorted-vowel-strings/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1642-furthest-building-you-can-reach/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1644-lowest-common-ancestor-of-a-binary-tree-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1646-get-maximum-in-generated-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1647-minimum-deletions-to-make-character-frequencies-unique/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1649-create-sorted-array-through-instructions/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /165-compare-version-numbers/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1650-lowest-common-ancestor-of-a-binary-tree-iii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1654-minimum-jumps-to-reach-home/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1658-minimum-operations-to-reduce-x-to-zero/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /166-fraction-to-recurring-decimal/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /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 | string s,t; 5 | for(auto i:word1) 6 | s += i; 7 | for(auto i:word2) 8 | t += i; 9 | return s == t; 10 | } 11 | }; -------------------------------------------------------------------------------- /1662-check-if-two-string-arrays-are-equivalent/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1667-fix-names-in-a-table/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1668-maximum-repeating-substring/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1671-minimum-number-of-removals-to-make-mountain-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1672-richest-customer-wealth/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1673-find-the-most-competitive-subsequence/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1675-minimize-deviation-in-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1676-lowest-common-ancestor-of-a-binary-tree-iv/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1678-goal-parser-interpretation/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1679-max-number-of-k-sum-pairs/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1680-concatenation-of-consecutive-binary-numbers/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /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 n) { 4 | auto ch = *max_element(begin(n),end(n)); 5 | return ch-'0'; 6 | } 7 | }; -------------------------------------------------------------------------------- /1689-partitioning-into-minimum-number-of-deci-binary-numbers/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /169-majority-element/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1696-jump-game-vi/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1697-checking-existence-of-edge-length-limited-paths/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1698-number-of-distinct-substrings-in-a-string/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1707-maximum-xor-with-an-element-from-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /171-excel-sheet-column-number/171-excel-sheet-column-number.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int titleToNumber(string s) { 4 | int res = 0; 5 | for (auto &c:s) res = res * 26 + (c - 'A' + 1); 6 | return res; 7 | } 8 | }; -------------------------------------------------------------------------------- /171-excel-sheet-column-number/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1711-count-good-meals/1711-count-good-meals.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int countPairs(vector& a) { 4 | unordered_map lks; 5 | long long ans=0; 6 | for(int x : a){ 7 | for(int i=1;i<=(1<<22);i*=2){ 8 | if(lks.count(i-x)) ans+=lks[i-x]; 9 | } 10 | lks[x]+=1; 11 | } 12 | return ans % (int)(1e9 + 7); 13 | } 14 | }; -------------------------------------------------------------------------------- /1711-count-good-meals/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1713-minimum-operations-to-make-a-subsequence/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1717-maximum-score-from-removing-substrings/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1721-swapping-nodes-in-a-linked-list/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1726-tuple-with-same-product/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /173-binary-search-tree-iterator/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1732-find-the-highest-altitude/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1746-maximum-subarray-sum-after-one-operation/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /175-combine-two-tables/175-combine-two-tables.sql: -------------------------------------------------------------------------------- 1 | SELECT Person.FirstName, Person.LastName, Address.City, Address.State FROM Person NATURAL LEFT JOIN Address; -------------------------------------------------------------------------------- /175-combine-two-tables/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1750-minimum-length-of-string-after-deleting-similar-ends/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1753-maximum-score-from-removing-stones/1753-maximum-score-from-removing-stones.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int maximumScore(int a, int b, int c) { 4 | if(a>b) 5 | return maximumScore(b,a,c); 6 | else if(b>c) 7 | return maximumScore(a,c,b); 8 | else if(a+b<=c) 9 | return a+b; 10 | else 11 | return (a+b-c)/2+c; 12 | } 13 | }; -------------------------------------------------------------------------------- /1753-maximum-score-from-removing-stones/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /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 where low_fats = 'Y' and recyclable = 'Y'; -------------------------------------------------------------------------------- /1757-recyclable-and-low-fat-products/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1758-minimum-changes-to-make-alternating-binary-string/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1759-count-number-of-homogenous-substrings/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /176-second-highest-salary/176-second-highest-salary.sql: -------------------------------------------------------------------------------- 1 | SELECT 2 | IFNULL( 3 | (SELECT DISTINCT Salary 4 | FROM Employee 5 | ORDER BY Salary DESC 6 | LIMIT 1 OFFSET 1), 7 | NULL) AS SecondHighestSalary; -------------------------------------------------------------------------------- /176-second-highest-salary/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1760-minimum-limit-of-balls-in-a-bag/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1762-buildings-with-an-ocean-view/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1764-form-array-by-concatenating-subarrays-of-another-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1765-map-of-highest-peak/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1769-minimum-number-of-operations-to-move-all-balls-to-each-box/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1774-closest-dessert-cost/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1775-equal-sum-arrays-with-minimum-number-of-operations/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1776-car-fleet-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1780-check-if-number-is-a-sum-of-powers-of-three/1780-check-if-number-is-a-sum-of-powers-of-three.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | bool checkPowersOfThree(int n) { 4 | while(n){ 5 | if(n%3 == 2) 6 | return false; 7 | else n /= 3; 8 | } 9 | return true; 10 | } 11 | }; -------------------------------------------------------------------------------- /1780-check-if-number-is-a-sum-of-powers-of-three/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1781-sum-of-beauty-of-all-substrings/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1788-maximize-the-beauty-of-the-garden/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /179-largest-number/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1791-find-center-of-star-graph/1791-find-center-of-star-graph.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int findCenter(vector>& edges) { 4 | if(edges[0][0]==edges[1][0] or edges[0][0]==edges[1][1]) 5 | return edges[0][0]; 6 | else return edges[0][1]; 7 | } 8 | }; -------------------------------------------------------------------------------- /1791-find-center-of-star-graph/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1793-maximum-score-of-a-good-subarray/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1795-rearrange-products-table/1795-rearrange-products-table.sql: -------------------------------------------------------------------------------- 1 | SELECT product_id, 'store1' AS store, store1 AS price FROM Products WHERE store1 IS NOT NULL 2 | UNION 3 | SELECT product_id, 'store2' AS store, store2 AS price FROM Products WHERE store2 IS NOT NULL 4 | UNION 5 | SELECT product_id, 'store3' AS store, store3 AS price FROM Products WHERE store3 IS NOT NULL 6 | -------------------------------------------------------------------------------- /1795-rearrange-products-table/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1796-second-largest-digit-in-a-string/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /181-employees-earning-more-than-their-managers/181-employees-earning-more-than-their-managers.sql: -------------------------------------------------------------------------------- 1 | select E.name as Employee from Employee E 2 | join Employee as M 3 | on E.ManagerId = M.Id 4 | where E.Salary > M.Salary; -------------------------------------------------------------------------------- /181-employees-earning-more-than-their-managers/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1817-finding-the-users-active-minutes/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1818-minimum-absolute-sum-difference/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /182-duplicate-emails/182-duplicate-emails.sql: -------------------------------------------------------------------------------- 1 | select email from Person 2 | group by email 3 | having count(email)>1; -------------------------------------------------------------------------------- /182-duplicate-emails/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1822-sign-of-the-product-of-an-array/1822-sign-of-the-product-of-an-array.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int arraySign(vector& nums) { 4 | int neg = 0; 5 | for(auto& it:nums){ 6 | if(it==0) return 0; 7 | else if(it < 0) 8 | neg = !neg; 9 | } 10 | return neg ? -1 : 1; 11 | } 12 | }; -------------------------------------------------------------------------------- /1822-sign-of-the-product-of-an-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1823-find-the-winner-of-the-circular-game/1823-find-the-winner-of-the-circular-game.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | 4 | int recur(int n, int k) 5 | { 6 | if(n==1) return 0; 7 | return (k+recur(n-1,k))%n; 8 | } 9 | 10 | int findTheWinner(int n, int k) { 11 | return recur(n,k)+1; 12 | } 13 | }; -------------------------------------------------------------------------------- /1823-find-the-winner-of-the-circular-game/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1824-minimum-sideway-jumps/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1827-minimum-operations-to-make-the-array-increasing/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /183-customers-who-never-order/183-customers-who-never-order.sql: -------------------------------------------------------------------------------- 1 | # Write your MySQL query statement below 2 | select name as Customers from Customers as c 3 | LEFT JOIN Orders as o 4 | on o.customerId = c.id 5 | where o.customerId is NULL; 6 | -------------------------------------------------------------------------------- /183-customers-who-never-order/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /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 | for (int i = 0; i < costs.size(); ++i) 6 | if (coins >= costs[i]) 7 | coins -= costs[i]; 8 | else 9 | return i; 10 | return costs.size(); 11 | } 12 | }; -------------------------------------------------------------------------------- /1833-maximum-ice-cream-bars/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1834-single-threaded-cpu/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1837-sum-of-digits-in-base-k/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1845-seat-reservation-manager/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1850-minimum-adjacent-swaps-to-reach-the-kth-smallest-number/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1851-minimum-interval-to-include-each-query/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1854-maximum-population-year/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1855-maximum-distance-between-a-pair-of-values/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1856-maximum-subarray-min-product/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1861-rotating-the-box/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /187-repeated-dna-sequences/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1873-calculate-special-bonus/1873-calculate-special-bonus.sql: -------------------------------------------------------------------------------- 1 | # Write your MySQL query statement below 2 | SELECT employee_id,salary*(employee_id%2)*(name not like 'M%') as bonus 3 | from employees 4 | ORDER BY employee_id; -------------------------------------------------------------------------------- /1873-calculate-special-bonus/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1877-minimize-maximum-pair-sum-in-array/1877-minimize-maximum-pair-sum-in-array.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int minPairSum(vector& nums) { 4 | sort(nums.begin(),nums.end()); 5 | int i=0,j=nums.size()-1; 6 | int ans = INT_MIN; 7 | while(i<=j) 8 | { 9 | ans = max(ans,nums[i++]+nums[j--]); 10 | } 11 | return ans; 12 | } 13 | }; -------------------------------------------------------------------------------- /1877-minimize-maximum-pair-sum-in-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /188-best-time-to-buy-and-sell-stock-iv/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1882-process-tasks-using-servers/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1884-egg-drop-with-2-eggs-and-n-floors/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1885-count-pairs-in-two-arrays/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1888-minimum-number-of-flips-to-make-the-binary-string-alternating/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /189-rotate-array/189-rotate-array.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | void rotate(vector& nums, int k) { 4 | int n = nums.size(); 5 | k = k % nums.size(); 6 | reverse(nums.begin(),nums.begin()+n-k); 7 | reverse(nums.begin()+n-k, nums.end()); 8 | reverse(nums.begin(),nums.end()); 9 | } 10 | }; -------------------------------------------------------------------------------- /189-rotate-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1893-check-if-all-the-integers-in-a-range-are-covered/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1894-find-the-student-that-will-replace-the-chalk/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1899-merge-triplets-to-form-target-triplet/1899-merge-triplets-to-form-target-triplet.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | bool mergeTriplets(vector>& triplets, vector& t) { 4 | vector res(3); 5 | for (auto &s : triplets) 6 | if (s[0] <= t[0] && s[1] <= t[1] && s[2] <= t[2]) 7 | res = { max(res[0], s[0]), max(res[1], s[1]), max(res[2], s[2]) }; 8 | return res == t; 9 | } 10 | }; -------------------------------------------------------------------------------- /1899-merge-triplets-to-form-target-triplet/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /19-remove-nth-node-from-end-of-list/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1903-largest-odd-number-in-string/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1909-remove-one-element-to-make-the-array-strictly-increasing/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /191-number-of-1-bits/191-number-of-1-bits.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int hammingWeight(uint32_t n) { 4 | int count = 0; 5 | while(n>0) 6 | { 7 | if(n&1 !=0 ) 8 | count++; 9 | n = n>> 1; 10 | } 11 | return count; 12 | } 13 | }; -------------------------------------------------------------------------------- /191-number-of-1-bits/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1911-maximum-alternating-subsequence-sum/1911-maximum-alternating-subsequence-sum.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | long long maxAlternatingSum(vector& nums) { 4 | long long even = 0, odd = 0; 5 | for(auto it:nums) 6 | { 7 | long long o = odd; 8 | odd = max(odd,even-it); 9 | even = max(even,o+it); 10 | } 11 | return max(even,odd); 12 | } 13 | }; -------------------------------------------------------------------------------- /1911-maximum-alternating-subsequence-sum/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1922-count-good-numbers/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1926-nearest-exit-from-entrance-in-maze/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1928-minimum-cost-to-reach-destination-in-time/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1937-maximum-number-of-points-with-cost/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1943-describe-the-painting/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1944-number-of-visible-people-in-a-queue/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1947-maximum-compatibility-score-sum/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1950-maximum-of-minimum-values-in-all-subarrays/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1952-three-divisors/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1953-maximum-number-of-weeks-for-which-you-can-work/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1959-minimum-total-space-wasted-with-k-resizing-operations/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /196-delete-duplicate-emails/196-delete-duplicate-emails.sql: -------------------------------------------------------------------------------- 1 | DELETE p1 from Person p1,Person p2 2 | where p1.email = p2.email and p1.Id > p2.Id; -------------------------------------------------------------------------------- /196-delete-duplicate-emails/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1963-minimum-number-of-swaps-to-make-the-string-balanced/1963-minimum-number-of-swaps-to-make-the-string-balanced.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int minSwaps(string s) { 4 | int sz = 0; 5 | for(int i=0; i0) sz--; 10 | } 11 | return (sz+1)/2; 12 | } 13 | }; -------------------------------------------------------------------------------- /1963-minimum-number-of-swaps-to-make-the-string-balanced/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1964-find-the-longest-valid-obstacle-course-at-each-position/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1965-employees-with-missing-information/1965-employees-with-missing-information.sql: -------------------------------------------------------------------------------- 1 | # Write your MySQL query statement below 2 | SELECT employee_id from Employees 3 | where employee_id not in (Select employee_id from Salaries) 4 | UNION 5 | SELECT employee_id from Salaries 6 | where employee_id not in (Select employee_id from Employees) 7 | ORDER BY employee_id; -------------------------------------------------------------------------------- /1965-employees-with-missing-information/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /197-rising-temperature/197-rising-temperature.sql: -------------------------------------------------------------------------------- 1 | # Write your MySQL query statement below 2 | select weather.id from weather 3 | join weather as w on w.recordDate = SUBDATE(weather.recordDate,1) 4 | where weather.temperature > w.temperature; -------------------------------------------------------------------------------- /197-rising-temperature/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1971-find-if-path-exists-in-graph/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1975-maximum-matrix-sum/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /1979-find-greatest-common-divisor-of-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /198-house-robber/198-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 prev = 0; 7 | int curr = nums[0]; 8 | for(int i=1; i digit) 6 | return n.substr(0, i) + n.substr(i + 1); 7 | int last_d = n.rfind(digit); 8 | return n.substr(0, last_d) + n.substr(last_d + 1); 9 | } 10 | }; -------------------------------------------------------------------------------- /2259-remove-digit-from-number-to-maximize-result/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2260-minimum-consecutive-cards-to-pick-up/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2262-total-appeal-of-a-string/2262-total-appeal-of-a-string.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | long long appealSum(string s) { 4 | long long ans = 0; 5 | int n = s.size(); 6 | vector last(26,0); 7 | for(int i=0; i& n) { 4 | long long right = accumulate(begin(n), end(n), 0LL), left = 0, res = 0; 5 | for (int i = 0; i < n.size() - 1; ++i) { 6 | left += n[i]; 7 | right -= n[i]; 8 | res += left >= right; 9 | } 10 | return res; 11 | } 12 | }; -------------------------------------------------------------------------------- /2270-number-of-ways-to-split-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2271-maximum-white-tiles-covered-by-a-carpet/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2276-count-integers-in-intervals/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /228-summary-ranges/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2280-minimum-lines-to-represent-a-line-chart/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2281-sum-of-total-strength-of-wizards/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2282-number-of-people-that-can-be-seen-in-a-grid/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2289-steps-to-make-array-non-decreasing/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /229-majority-element-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2290-minimum-obstacle-removal-to-reach-corner/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2296-design-a-text-editor/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2299-strong-password-checker-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /23-merge-k-sorted-lists/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /230-kth-smallest-element-in-a-bst/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2300-successful-pairs-of-spells-and-potions/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2302-count-subarrays-with-score-less-than-k/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2304-minimum-path-cost-in-a-grid/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2305-fair-distribution-of-cookies/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /231-power-of-two/231-power-of-two.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | bool isPowerOfTwo(int n) { 4 | return n>0 && (n&(n-1))==0; 5 | } 6 | }; -------------------------------------------------------------------------------- /231-power-of-two/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2310-sum-of-numbers-with-units-digit-k/2310-sum-of-numbers-with-units-digit-k.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int minimumNumbers(int num, int k) { 4 | if(num==0) return 0; 5 | for(int i=1; i<=10; i++){ 6 | if(i*k<=num && (num-i*k)%10==0) 7 | return i; 8 | } 9 | return -1; 10 | } 11 | }; -------------------------------------------------------------------------------- /2310-sum-of-numbers-with-units-digit-k/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2320-count-number-of-ways-to-place-houses/2320-count-number-of-ways-to-place-houses.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int countHousePlacements(int n) { 4 | int a = 1, b = 1, c = 2, mod = 1e9 + 7; 5 | for (int i = 0; i < n; ++i) { 6 | c = (a + b) % mod; 7 | a = b; 8 | b = c; 9 | } 10 | return 1L * b * b % mod; 11 | } 12 | 13 | }; -------------------------------------------------------------------------------- /2320-count-number-of-ways-to-place-houses/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2321-maximum-score-of-spliced-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2322-minimum-score-after-removals-on-a-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2328-number-of-increasing-paths-in-a-grid/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2333-minimum-sum-of-squared-difference/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2335-minimum-amount-of-time-to-fill-cups/2335-minimum-amount-of-time-to-fill-cups.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int fillCups(vector& amount) { 4 | sort(amount.begin(),amount.end()); 5 | int x=amount[0]; 6 | int y=amount[1]; 7 | int z=amount[2]; 8 | int sum=x+y+z; 9 | if(x+y>z) return (sum+1)/2; 10 | else return z; 11 | } 12 | }; -------------------------------------------------------------------------------- /2335-minimum-amount-of-time-to-fill-cups/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2336-smallest-number-in-infinite-set/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2337-move-pieces-to-obtain-a-string/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /234-palindrome-linked-list/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /235-lowest-common-ancestor-of-a-binary-search-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2350-shortest-impossible-sequence-of-rolls/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2359-find-closest-node-to-given-two-nodes/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /236-lowest-common-ancestor-of-a-binary-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2376-count-special-integers/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /239-sliding-window-maximum/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /24-swap-nodes-in-pairs/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /240-search-a-2d-matrix-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /241-different-ways-to-add-parentheses/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /242-valid-anagram/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /244-shortest-word-distance-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /245-shortest-word-distance-iii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2454-next-greater-element-iv/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /249-group-shifted-strings/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2491-divide-players-into-teams-of-equal-skill/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /251-flatten-2d-vector/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /252-meeting-rooms/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /2556-disconnect-path-in-a-binary-matrix-by-at-most-one-flip/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /256-paint-house/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /258-add-digits/258-add-digits.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int addDigits(int num) { 4 | if(num!=0 && num%9==0) return 9; 5 | return num%9; 6 | } 7 | }; -------------------------------------------------------------------------------- /258-add-digits/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /26-remove-duplicates-from-sorted-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /268-missing-number/268-missing-number.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int missingNumber(vector& nums) { 4 | int total=0,sum=0; 5 | for(int i=0; i& nums, int val) { 4 | int idx=0; 5 | for(int i=0; i& nums) { 4 | int n = nums.size(); 5 | for(int i=0; i countBits(int n) { 4 | vector ans; 5 | ans.push_back(0); 6 | for(int i=1; i<=n; i++) 7 | { 8 | ans.push_back(ans[i&(i-1)]+1); 9 | } 10 | return ans; 11 | } 12 | }; -------------------------------------------------------------------------------- /338-counting-bits/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /339-nested-list-weight-sum/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /34-find-first-and-last-position-of-element-in-sorted-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /341-flatten-nested-list-iterator/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /342-power-of-four/342-power-of-four.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | bool isPowerOfFour(int n) { 4 | return n>0 && (n%3==1) && (n&(n-1))==0; 5 | } 6 | }; -------------------------------------------------------------------------------- /342-power-of-four/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /343-integer-break/343-integer-break.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int integerBreak(int n) { 4 | vector dp(n+1,0); 5 | dp[1] = 1; 6 | dp[2] = 1; 7 | for(int i=3; i<=n; i++) 8 | { 9 | for(int j=1; j0); 12 | return string(s.rbegin(),s.rend()); 13 | } 14 | }; -------------------------------------------------------------------------------- /405-convert-a-number-to-hexadecimal/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /406-queue-reconstruction-by-height/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /409-longest-palindrome/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /41-first-missing-positive/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /410-split-array-largest-sum/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /413-arithmetic-slices/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /414-third-maximum-number/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /415-add-strings/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /416-partition-equal-subset-sum/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /417-pacific-atlantic-water-flow/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /419-battleships-in-a-board/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /42-trapping-rain-water/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /421-maximum-xor-of-two-numbers-in-an-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /423-reconstruct-original-digits-from-english/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /424-longest-repeating-character-replacement/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /426-convert-binary-search-tree-to-sorted-doubly-linked-list/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /428-serialize-and-deserialize-n-ary-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /429-n-ary-tree-level-order-traversal/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /43-multiply-strings/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /430-flatten-a-multilevel-doubly-linked-list/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /433-minimum-genetic-mutation/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /437-path-sum-iii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /438-find-all-anagrams-in-a-string/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /44-wildcard-matching/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /443-string-compression/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /447-number-of-boomerangs/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /449-serialize-and-deserialize-bst/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /45-jump-game-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /450-delete-node-in-a-bst/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /452-minimum-number-of-arrows-to-burst-balloons/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /453-minimum-moves-to-equal-array-elements/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /454-4sum-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /457-circular-array-loop/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /458-poor-pigs/458-poor-pigs.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | 4 | int poorPigs(int buckets, int poisonTime, int totalTime) { 5 | return ceil(log(buckets) / log(totalTime / poisonTime + 1)); 6 | } 7 | }; -------------------------------------------------------------------------------- /458-poor-pigs/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /459-repeated-substring-pattern/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /46-permutations/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /462-minimum-moves-to-equal-array-elements-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /464-can-i-win/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /465-optimal-account-balancing/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /467-unique-substrings-in-wraparound-string/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /47-permutations-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /473-matchsticks-to-square/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /474-ones-and-zeroes/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /475-heaters/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /477-total-hamming-distance/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /486-predict-the-winner/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /489-robot-room-cleaner/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /49-group-anagrams/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /490-the-maze/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /491-increasing-subsequences/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /493-reverse-pairs/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /494-target-sum/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /495-teemo-attacking/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /496-next-greater-element-i/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /503-next-greater-element-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /504-base-7/504-base-7.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | string convertToBase7(int num) { 4 | bool neg = false; 5 | if(num<0) neg = true; 6 | num = abs(num); 7 | string s = ""; 8 | do 9 | { 10 | s += to_string(num%7); 11 | num /= 7; 12 | }while(num); 13 | reverse(s.begin(),s.end()); 14 | return neg==true?"-"+s:s; 15 | } 16 | }; -------------------------------------------------------------------------------- /504-base-7/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /505-the-maze-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /509-fibonacci-number/509-fibonacci-number.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int fib(int n) { 4 | if(n<=1) return n; 5 | int secondprev = 0; 6 | int firstprev = 1; 7 | for(int i=2;i<=n; i++) 8 | { 9 | int curr = secondprev+firstprev; 10 | secondprev = firstprev; 11 | firstprev = curr; 12 | } 13 | return firstprev; 14 | } 15 | }; -------------------------------------------------------------------------------- /509-fibonacci-number/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /51-n-queens/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /510-inorder-successor-in-bst-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /513-find-bottom-left-tree-value/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /515-find-largest-value-in-each-tree-row/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /518-coin-change-2/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /52-n-queens-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /520-detect-capital/520-detect-capital.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | bool detectCapitalUse(string word) { 4 | for(int i=1; i& nums) { 4 | int maxsum = INT_MIN; 5 | int currsum = 0; 6 | for(auto n:nums) 7 | { 8 | currsum += n; 9 | maxsum = max(maxsum,currsum); 10 | currsum = max(currsum,0); 11 | } 12 | return maxsum; 13 | } 14 | }; -------------------------------------------------------------------------------- /53-maximum-subarray/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /530-minimum-absolute-difference-in-bst/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /532-k-diff-pairs-in-an-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /537-complex-number-multiplication/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /538-convert-bst-to-greater-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /539-minimum-time-difference/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /541-reverse-string-ii/541-reverse-string-ii.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | string reverseStr(string s, int k) { 4 | int i=0; 5 | int n = s.size(); 6 | while(in?s.end():s.begin()+i+k); 9 | i += 2*k; 10 | } 11 | return s; 12 | } 13 | }; -------------------------------------------------------------------------------- /541-reverse-string-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /543-diameter-of-binary-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /545-boundary-of-binary-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /546-remove-boxes/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /549-binary-tree-longest-consecutive-sequence-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /55-jump-game/55-jump-game.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | bool canJump(vector& nums) { 4 | int n = nums.size(); 5 | int maxreach = 0; 6 | int i = 0; 7 | while(i < n){ 8 | if(i > maxreach) return false; 9 | maxreach = max(maxreach,i+nums[i]); 10 | i++; 11 | } 12 | return true; 13 | } 14 | }; -------------------------------------------------------------------------------- /55-jump-game/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /552-student-attendance-record-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /556-next-greater-element-iii/556-next-greater-element-iii.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int nextGreaterElement(int n) { 4 | string s = to_string(n); 5 | int sz = s.size(); 6 | bool f = next_permutation(s.begin(),s.end()); 7 | if(f==false) return -1; 8 | long long x = stoll(s); 9 | if(x>INT_MAX) 10 | return -1; 11 | return (int)x; 12 | } 13 | }; -------------------------------------------------------------------------------- /556-next-greater-element-iii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /557-reverse-words-in-a-string-iii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /559-maximum-depth-of-n-ary-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /56-merge-intervals/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /560-subarray-sum-equals-k/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /561-array-partition-i/561-array-partition-i.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int arrayPairSum(vector& nums) { 4 | sort(nums.begin(),nums.end()); 5 | int s = 0; 6 | for(int i=0; i= 3000000 or population >= 25000000; 4 | -------------------------------------------------------------------------------- /595-big-countries/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /599-minimum-index-sum-of-two-lists/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /6-zigzag-conversion/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /600-non-negative-integers-without-consecutive-ones/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /605-can-place-flowers/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /606-construct-string-from-binary-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /607-sales-person/607-sales-person.sql: -------------------------------------------------------------------------------- 1 | SELECT 2 | s.name 3 | FROM 4 | salesperson s 5 | WHERE 6 | s.sales_id NOT IN (SELECT 7 | o.sales_id 8 | FROM 9 | orders o 10 | Natural JOIN 11 | company c 12 | WHERE 13 | c.name = 'RED') -------------------------------------------------------------------------------- /607-sales-person/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /608-tree-node/608-tree-node.sql: -------------------------------------------------------------------------------- 1 | select id, 2 | case when p_id is null then 'Root' 3 | when id in (select p_id from tree) then 'Inner' 4 | else 'Leaf' 5 | end as Type 6 | from tree 7 | order by id 8 | -------------------------------------------------------------------------------- /608-tree-node/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /609-find-duplicate-file-in-system/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /61-rotate-list/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /611-valid-triangle-number/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /616-add-bold-tag-in-string/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /62-unique-paths/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /622-design-circular-queue/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /623-add-one-row-to-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /627-swap-salary/627-swap-salary.sql: -------------------------------------------------------------------------------- 1 | update salary set sex = CHAR(ASCII('f') ^ ASCII('m') ^ ASCII(sex)); -------------------------------------------------------------------------------- /627-swap-salary/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /63-unique-paths-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /633-sum-of-square-numbers/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /637-average-of-levels-in-binary-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /638-shopping-offers/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /640-solve-the-equation/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /641-design-circular-deque/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /642-design-search-autocomplete-system/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /643-maximum-average-subarray-i/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /646-maximum-length-of-pair-chain/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /647-palindromic-substrings/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /648-replace-words/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /649-dota2-senate/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /653-two-sum-iv-input-is-a-bst/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /654-maximum-binary-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /658-find-k-closest-elements/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /659-split-array-into-consecutive-subsequences/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /662-maximum-width-of-binary-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /665-non-decreasing-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /669-trim-a-binary-search-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /67-add-binary/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /677-map-sum-pairs/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /678-valid-parenthesis-string/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /68-text-justification/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /680-valid-palindrome-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /682-baseball-game/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /686-repeated-string-match/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /687-longest-univalue-path/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /692-top-k-frequent-words/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /697-degree-of-an-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /698-partition-to-k-equal-sum-subsets/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /7-reverse-integer/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /70-climbing-stairs/70-climbing-stairs.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int climbStairs(int n) { 4 | if(n==1) return 1; 5 | vector dp(n+1,0); 6 | dp[0] = 1; 7 | dp[1] = 1; 8 | for(int i=2; i<=n; ++i) 9 | dp[i] = dp[i-1]+dp[i-2]; 10 | return dp[n]; 11 | } 12 | }; -------------------------------------------------------------------------------- /70-climbing-stairs/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /700-search-in-a-binary-search-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /701-insert-into-a-binary-search-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /705-design-hashset/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /707-design-linked-list/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /715-range-module/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /720-longest-word-in-dictionary/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /724-find-pivot-index/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /729-my-calendar-i/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /731-my-calendar-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /732-my-calendar-iii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /735-asteroid-collision/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /738-monotone-increasing-digits/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /739-daily-temperatures/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /74-search-a-2d-matrix/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /740-delete-and-earn/740-delete-and-earn.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int deleteAndEarn(vector& nums) { 4 | vector hm(10001,0); 5 | for(auto it:nums) hm[it]++; 6 | vector dp(10001,0); 7 | dp[1] = hm[1]; 8 | for(int i=2; i<10001; i++) 9 | { 10 | dp[i] = max(dp[i-2]+hm[i]*i,dp[i-1]); 11 | } 12 | return dp.back(); 13 | } 14 | }; -------------------------------------------------------------------------------- /740-delete-and-earn/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /741-cherry-pickup/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /743-network-delay-time/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /745-prefix-and-suffix-search/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /746-min-cost-climbing-stairs/746-min-cost-climbing-stairs.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int minCostClimbingStairs(vector& cost) { 4 | int n = cost.size(); 5 | vector dp(n+1,0); 6 | for(int i=2; i<=n; ++i){ 7 | dp[i] = min(dp[i-1]+cost[i-1],dp[i-2]+cost[i-2]); 8 | } 9 | return dp[n]; 10 | } 11 | }; -------------------------------------------------------------------------------- /746-min-cost-climbing-stairs/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /754-reach-a-number/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /758-bold-words-in-string/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /759-employee-free-time/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /76-minimum-window-substring/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /763-partition-labels/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /765-couples-holding-hands/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /766-toeplitz-matrix/766-toeplitz-matrix.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | bool isToeplitzMatrix(vector>& matrix) { 4 | for (int i = 0; i < matrix.size() - 1; i++) { 5 | for (int j = 0; j < matrix[0].size() - 1; j++) { 6 | if (matrix[i][j] != matrix[i + 1][j + 1]) 7 | return false; 8 | } 9 | } 10 | return true; 11 | } 12 | }; -------------------------------------------------------------------------------- /766-toeplitz-matrix/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /768-max-chunks-to-make-sorted-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /769-max-chunks-to-make-sorted/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /775-global-and-local-inversions/775-global-and-local-inversions.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | bool isIdealPermutation(vector& A) { 4 | for (int i = 0; i < A.size(); ++i) { 5 | if (abs(A[i] - i) > 1) return false; 6 | } 7 | return true; 8 | } 9 | }; -------------------------------------------------------------------------------- /775-global-and-local-inversions/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /777-swap-adjacent-in-lr-string/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /778-swim-in-rising-water/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /78-subsets/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /781-rabbits-in-forest/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /783-minimum-distance-between-bst-nodes/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /785-is-graph-bipartite/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /787-cheapest-flights-within-k-stops/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /788-rotated-digits/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /791-custom-sort-string/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /792-number-of-matching-subsequences/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /794-valid-tic-tac-toe-state/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /795-number-of-subarrays-with-bounded-maximum/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /796-rotate-string/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /799-champagne-tower/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /8-string-to-integer-atoi/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /80-remove-duplicates-from-sorted-array-ii/80-remove-duplicates-from-sorted-array-ii.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int removeDuplicates(vector& nums) { 4 | int i = 0; 5 | for (int n : nums) 6 | if (i < 2 || n > nums[i-2]) 7 | nums[i++] = n; 8 | return i; 9 | } 10 | }; -------------------------------------------------------------------------------- /80-remove-duplicates-from-sorted-array-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /801-minimum-swaps-to-make-sequences-increasing/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /804-unique-morse-code-words/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /807-max-increase-to-keep-city-skyline/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /811-subdomain-visit-count/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /813-largest-sum-of-averages/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /814-binary-tree-pruning/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /818-race-car/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /82-remove-duplicates-from-sorted-list-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /820-short-encoding-of-words/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /821-shortest-distance-to-a-character/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /823-binary-trees-with-factors/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /825-friends-of-appropriate-ages/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /826-most-profit-assigning-work/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /828-count-unique-characters-of-all-substrings-of-a-given-string/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /832-flipping-an-image/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /833-find-and-replace-in-string/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /834-sum-of-distances-in-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /836-rectangle-overlap/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /84-largest-rectangle-in-histogram/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /842-split-array-into-fibonacci-sequence/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /843-guess-the-word/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /845-longest-mountain-in-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /846-hand-of-straights/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /847-shortest-path-visiting-all-nodes/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /849-maximize-distance-to-closest-person/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /85-maximal-rectangle/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /851-loud-and-rich/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /852-peak-index-in-a-mountain-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /853-car-fleet/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /856-score-of-parentheses/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /858-mirror-reflection/858-mirror-reflection.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int mirrorReflection(int p, int q) { 4 | while (p % 2 == 0 && q % 2 == 0){ 5 | p/=2; 6 | q/=2; 7 | } 8 | return 1 - p % 2 + q % 2; 9 | } 10 | }; -------------------------------------------------------------------------------- /858-mirror-reflection/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /86-partition-list/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /862-shortest-subarray-with-sum-at-least-k/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /863-all-nodes-distance-k-in-binary-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /865-smallest-subtree-with-all-the-deepest-nodes/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /867-transpose-matrix/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /87-scramble-string/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /871-minimum-number-of-refueling-stops/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /873-length-of-longest-fibonacci-subsequence/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /875-koko-eating-bananas/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /877-stone-game/877-stone-game.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | bool stoneGame(vector& piles) { 4 | return true; 5 | } 6 | }; -------------------------------------------------------------------------------- /877-stone-game/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /878-nth-magical-number/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /88-merge-sorted-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /881-boats-to-save-people/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /883-projection-area-of-3d-shapes/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /886-possible-bipartition/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /887-super-egg-drop/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /89-gray-code/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /890-find-and-replace-pattern/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /894-all-possible-full-binary-trees/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /897-increasing-order-search-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /90-subsets-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /904-fruit-into-baskets/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /905-sort-array-by-parity/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /907-sum-of-subarray-minimums/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /909-snakes-and-ladders/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /91-decode-ways/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /912-sort-an-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /915-partition-array-into-disjoint-intervals/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /916-word-subsets/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /917-reverse-only-letters/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /918-maximum-sum-circular-subarray/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /919-complete-binary-tree-inserter/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /92-reverse-linked-list-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /921-minimum-add-to-make-parentheses-valid/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /922-sort-array-by-parity-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /923-3sum-with-multiplicity/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /925-long-pressed-name/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /926-flip-string-to-monotone-increasing/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /929-unique-email-addresses/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /93-restore-ip-addresses/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /930-binary-subarrays-with-sum/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /936-stamping-the-sequence/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /937-reorder-data-in-log-files/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /938-range-sum-of-bst/938-range-sum-of-bst.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int rangeSumBST(TreeNode* root, int L, int H) { 4 | if(!root) return 0; 5 | int ans = root -> val >= L && root -> val <= H ? root -> val : 0; 6 | if(root -> val > L) ans += rangeSumBST(root -> left, L, H); 7 | if(root -> val < H) ans += rangeSumBST(root -> right, L, H); 8 | return ans; 9 | } 10 | }; -------------------------------------------------------------------------------- /938-range-sum-of-bst/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /939-minimum-area-rectangle/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /94-binary-tree-inorder-traversal/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /941-valid-mountain-array/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /942-di-string-match/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /944-delete-columns-to-make-sorted/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /945-minimum-increment-to-make-array-unique/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /946-validate-stack-sequences/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /948-bag-of-tokens/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /949-largest-time-for-given-digits/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /95-unique-binary-search-trees-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /950-reveal-cards-in-increasing-order/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /953-verifying-an-alien-dictionary/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /954-array-of-doubled-pairs/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /955-delete-columns-to-make-sorted-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /959-regions-cut-by-slashes/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /96-unique-binary-search-trees/96-unique-binary-search-trees.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | unordered_map map; 4 | int numTrees(int n) { 5 | if(n<=1) return 1; 6 | if(map.find(n)!=map.end()) return map[n]; 7 | int ans = 0; 8 | for(int i=1; i<=n; i++) 9 | { 10 | ans += numTrees(i-1)*numTrees(n-i); 11 | } 12 | return map[n] = ans; 13 | } 14 | }; -------------------------------------------------------------------------------- /96-unique-binary-search-trees/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /962-maximum-width-ramp/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /967-numbers-with-same-consecutive-differences/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /968-binary-tree-cameras/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /969-pancake-sorting/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /97-interleaving-string/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /974-subarray-sums-divisible-by-k/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /975-odd-even-jump/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /978-longest-turbulent-subarray/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /979-distribute-coins-in-binary-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /98-validate-binary-search-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /981-time-based-key-value-store/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /983-minimum-cost-for-tickets/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /986-interval-list-intersections/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /987-vertical-order-traversal-of-a-binary-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /992-subarrays-with-k-different-integers/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /993-cousins-in-binary-tree/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /997-find-the-town-judge/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /998-maximum-binary-tree-ii/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /999-available-captures-for-rook/NOTES.md: -------------------------------------------------------------------------------- 1 | ​ -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # leetcode 2 | Collection of my LeetCode solutions in C++. 3 | -------------------------------------------------------------------------------- /excel-sheet-column-number/excel-sheet-column-number.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int titleToNumber(string s) { 4 | int res = 0; 5 | for (auto &c:s) res = res * 26 + (c - 'A' + 1); 6 | return res; 7 | } 8 | }; -------------------------------------------------------------------------------- /factorial-trailing-zeroes/factorial-trailing-zeroes.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int trailingZeroes(int n) { 4 | int count = 0; 5 | for(int i=5; i<=n; i*=5) 6 | count += n/i; 7 | return count; 8 | } 9 | }; -------------------------------------------------------------------------------- /find-minimum-in-rotated-sorted-array/find-minimum-in-rotated-sorted-array.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int findMin(vector &num) { 4 | int lo =0, hi = num.size()-1; 5 | while(lonum[hi]) lo=mid+1; 8 | else hi=mid; 9 | } 10 | return num[lo]; 11 | } 12 | }; -------------------------------------------------------------------------------- /intersection-of-two-arrays/intersection-of-two-arrays.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | vector intersection(vector& nums1, vector& nums2) { 4 | unordered_set set1(nums1.begin(),nums1.end()),set2; 5 | for(auto it:nums2) 6 | { 7 | if(set1.count(it)>0) 8 | set2.insert(it); 9 | } 10 | return vector(set2.begin(),set2.end()); 11 | } 12 | }; -------------------------------------------------------------------------------- /jump-game/jump-game.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | bool canJump(vector& nums) { 4 | int n = nums.size(); 5 | int maxidx = 0; 6 | for(int i=0; i=n-1; 12 | } 13 | }; -------------------------------------------------------------------------------- /length-of-last-word/length-of-last-word.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int lengthOfLastWord(string s) { 4 | stringstream ss(s); 5 | string word; 6 | int ans = 0; 7 | while(getline(ss,word,' ')) 8 | { 9 | if(word.size()!=0) 10 | { 11 | ans = word.size(); 12 | } 13 | } 14 | return ans; 15 | } 16 | }; -------------------------------------------------------------------------------- /longest-increasing-subsequence/longest-increasing-subsequence.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | 4 | int lengthOfLIS(vector& nums) { 5 | vector res; 6 | for(int i=0; ix) 11 | return i; 12 | } 13 | return x; 14 | } 15 | }; --------------------------------------------------------------------------------