algorithms

Algorithm implementations
git clone git://git.laack.co/algorithms.git
Log | Files | Refs | README

ModeNameSize
-rw-r--r--.gitignore2L
-rw-r--r--README3L
-rw-r--r--aoc/aoc_2025_1/aoc_2025_1.py50L
-rwxr-xr-xcomp/run.sh13L
-rw-r--r--comp/shortest-path-of-the-king/problem.txt46L
-rw-r--r--comp/shortest-path-of-the-king/solution.cpp59L
-rw-r--r--comp/shortest-path-of-the-king/tests/0.in2L
-rw-r--r--comp/shortest-path-of-the-king/tests/1.in2L
-rw-r--r--comp/shortest-path-of-the-king/tests/2.in2L
-rw-r--r--comp/shortest-path-of-the-king/tests/3.in2L
-rw-r--r--comp/sum/solution.cpp8L
-rw-r--r--comp/sum/tests/0.in1L
-rw-r--r--comp/sum/tests/1.in1L
-rw-r--r--comp/watermelon/problem.txt27L
-rw-r--r--comp/watermelon/solution.cpp24L
-rw-r--r--comp/watermelon/tests/1.in1L
-rw-r--r--comp/watermelon/tests/10.in1L
-rw-r--r--comp/watermelon/tests/100.in1L
-rw-r--r--comp/watermelon/tests/11.in1L
-rw-r--r--comp/watermelon/tests/12.in1L
-rw-r--r--comp/watermelon/tests/13.in1L
-rw-r--r--comp/watermelon/tests/14.in1L
-rw-r--r--comp/watermelon/tests/15.in1L
-rw-r--r--comp/watermelon/tests/16.in1L
-rw-r--r--comp/watermelon/tests/17.in1L
-rw-r--r--comp/watermelon/tests/18.in1L
-rw-r--r--comp/watermelon/tests/19.in1L
-rw-r--r--comp/watermelon/tests/2.in1L
-rw-r--r--comp/watermelon/tests/20.in1L
-rw-r--r--comp/watermelon/tests/21.in1L
-rw-r--r--comp/watermelon/tests/22.in1L
-rw-r--r--comp/watermelon/tests/23.in1L
-rw-r--r--comp/watermelon/tests/24.in1L
-rw-r--r--comp/watermelon/tests/25.in1L
-rw-r--r--comp/watermelon/tests/26.in1L
-rw-r--r--comp/watermelon/tests/27.in1L
-rw-r--r--comp/watermelon/tests/28.in1L
-rw-r--r--comp/watermelon/tests/29.in1L
-rw-r--r--comp/watermelon/tests/3.in1L
-rw-r--r--comp/watermelon/tests/30.in1L
-rw-r--r--comp/watermelon/tests/31.in1L
-rw-r--r--comp/watermelon/tests/32.in1L
-rw-r--r--comp/watermelon/tests/33.in1L
-rw-r--r--comp/watermelon/tests/34.in1L
-rw-r--r--comp/watermelon/tests/35.in1L
-rw-r--r--comp/watermelon/tests/36.in1L
-rw-r--r--comp/watermelon/tests/37.in1L
-rw-r--r--comp/watermelon/tests/38.in1L
-rw-r--r--comp/watermelon/tests/39.in1L
-rw-r--r--comp/watermelon/tests/4.in1L
-rw-r--r--comp/watermelon/tests/40.in1L
-rw-r--r--comp/watermelon/tests/41.in1L
-rw-r--r--comp/watermelon/tests/42.in1L
-rw-r--r--comp/watermelon/tests/43.in1L
-rw-r--r--comp/watermelon/tests/44.in1L
-rw-r--r--comp/watermelon/tests/45.in1L
-rw-r--r--comp/watermelon/tests/46.in1L
-rw-r--r--comp/watermelon/tests/47.in1L
-rw-r--r--comp/watermelon/tests/48.in1L
-rw-r--r--comp/watermelon/tests/49.in1L
-rw-r--r--comp/watermelon/tests/5.in1L
-rw-r--r--comp/watermelon/tests/50.in1L
-rw-r--r--comp/watermelon/tests/51.in1L
-rw-r--r--comp/watermelon/tests/52.in1L
-rw-r--r--comp/watermelon/tests/53.in1L
-rw-r--r--comp/watermelon/tests/54.in1L
-rw-r--r--comp/watermelon/tests/55.in1L
-rw-r--r--comp/watermelon/tests/56.in1L
-rw-r--r--comp/watermelon/tests/57.in1L
-rw-r--r--comp/watermelon/tests/58.in1L
-rw-r--r--comp/watermelon/tests/59.in1L
-rw-r--r--comp/watermelon/tests/6.in1L
-rw-r--r--comp/watermelon/tests/60.in1L
-rw-r--r--comp/watermelon/tests/61.in1L
-rw-r--r--comp/watermelon/tests/62.in1L
-rw-r--r--comp/watermelon/tests/63.in1L
-rw-r--r--comp/watermelon/tests/64.in1L
-rw-r--r--comp/watermelon/tests/65.in1L
-rw-r--r--comp/watermelon/tests/66.in1L
-rw-r--r--comp/watermelon/tests/67.in1L
-rw-r--r--comp/watermelon/tests/68.in1L
-rw-r--r--comp/watermelon/tests/69.in1L
-rw-r--r--comp/watermelon/tests/7.in1L
-rw-r--r--comp/watermelon/tests/70.in1L
-rw-r--r--comp/watermelon/tests/71.in1L
-rw-r--r--comp/watermelon/tests/72.in1L
-rw-r--r--comp/watermelon/tests/73.in1L
-rw-r--r--comp/watermelon/tests/74.in1L
-rw-r--r--comp/watermelon/tests/75.in1L
-rw-r--r--comp/watermelon/tests/76.in1L
-rw-r--r--comp/watermelon/tests/77.in1L
-rw-r--r--comp/watermelon/tests/78.in1L
-rw-r--r--comp/watermelon/tests/79.in1L
-rw-r--r--comp/watermelon/tests/8.in1L
-rw-r--r--comp/watermelon/tests/80.in1L
-rw-r--r--comp/watermelon/tests/81.in1L
-rw-r--r--comp/watermelon/tests/82.in1L
-rw-r--r--comp/watermelon/tests/83.in1L
-rw-r--r--comp/watermelon/tests/84.in1L
-rw-r--r--comp/watermelon/tests/85.in1L
-rw-r--r--comp/watermelon/tests/86.in1L
-rw-r--r--comp/watermelon/tests/87.in1L
-rw-r--r--comp/watermelon/tests/88.in1L
-rw-r--r--comp/watermelon/tests/89.in1L
-rw-r--r--comp/watermelon/tests/9.in1L
-rw-r--r--comp/watermelon/tests/90.in1L
-rw-r--r--comp/watermelon/tests/91.in1L
-rw-r--r--comp/watermelon/tests/92.in1L
-rw-r--r--comp/watermelon/tests/93.in1L
-rw-r--r--comp/watermelon/tests/94.in1L
-rw-r--r--comp/watermelon/tests/95.in1L
-rw-r--r--comp/watermelon/tests/96.in1L
-rw-r--r--comp/watermelon/tests/97.in1L
-rw-r--r--comp/watermelon/tests/98.in1L
-rw-r--r--comp/watermelon/tests/99.in1L
-rw-r--r--comp/watermelon/tests/gen_tests.py24L
-rw-r--r--leetcode/01-matrix/01-matrix.dart73L
-rw-r--r--leetcode/01-matrix/01-matrixV1.dart77L
-rw-r--r--leetcode/01-matrix/01-matrixV2.dart88L
-rw-r--r--leetcode/3sum-closest/3sum-closest.dart23L
-rw-r--r--leetcode/3sum-closest/3sum-closestDP.dart35L
-rw-r--r--leetcode/3sum-closest/3sum-closestV2.dart31L
-rw-r--r--leetcode/3sum/3sum.dart42L
-rw-r--r--leetcode/3sum/3sum.py65L
-rw-r--r--leetcode/3sum/3sumV2.dart60L
-rw-r--r--leetcode/3sum/3sumV2.py64L
-rw-r--r--leetcode/3sum/3sumV3.dart54L
-rw-r--r--leetcode/Design-Underground-System/design-underground-system.dart50L
-rw-r--r--leetcode/add-binary/add-binary.dart64L
-rw-r--r--leetcode/add-digits/add-digits.js24L
-rw-r--r--leetcode/add-two-numbers/add-two-numbers.cpp109L
-rw-r--r--leetcode/add-two-numbers/add-two-numbers.py44L
-rw-r--r--leetcode/airplane-seat-assignment-probability/airplane-seat-assignment-probability.dart18L
-rw-r--r--leetcode/all-paths-from-source-to-target/all-paths-from-source-to-target.dart41L
-rw-r--r--leetcode/all-paths-from-source-to-target/all-paths-from-source-to-targetV2.dart37L
-rw-r--r--leetcode/arranging-coins/arranging-coins.dart19L
-rw-r--r--leetcode/article-views-i/article-views-i.sql9L
-rw-r--r--leetcode/average-of-levels-in-binary-tree/average-of-levels-in-binary-tree.dart30L
-rw-r--r--leetcode/average-salary-excluding-min-and-max/average-salary.dart18L
-rw-r--r--leetcode/average-salary-excluding-min-and-max/average-salaryV2.dart25L
-rw-r--r--leetcode/average-time-of-process-per-machine/average-time-per-machine.sql10L
-rw-r--r--leetcode/balanced-binary-tree/balanced-binary-tree.py18L
-rw-r--r--leetcode/best-time-to-buy-and-sell-stock-ii/best-time-to-buy-and-sell-stock-ii.dart29L
-rw-r--r--leetcode/best-time-to-buy-and-sell-stock-ii/best-time-to-buy-and-sell-stock-iiV2.dart34L
-rw-r--r--leetcode/best-time-to-buy-and-sell-stock/buy-and-sell.js37L
-rw-r--r--leetcode/big-countries/big-countries.sql4L
-rw-r--r--leetcode/biggest-single-number/biggest-single-number.sql13L
-rw-r--r--leetcode/binary-search/binary-search.py26L
-rw-r--r--leetcode/binary-search/binary-searchV2.py25L
-rw-r--r--leetcode/binary-tree-inorder/binary-tree-traversal-iterative.cpp48L
-rw-r--r--leetcode/binary-tree-inorder/binary-tree-traversal.cpp31L
-rw-r--r--leetcode/binary-tree-inorder/binary-tree-traversal.dart28L
-rw-r--r--leetcode/binary-tree-level-order-traversal-ii/binary-tree-level-order-traversal-ii.dart38L
-rw-r--r--leetcode/binary-tree-level-order-traversal/trav.cpp51L
-rw-r--r--leetcode/binary-tree-level-order-traversal/trav.py29L
-rw-r--r--leetcode/binary-tree-level-order/binary-tree-level-order.js40L
-rw-r--r--leetcode/binary-tree-paths/binary-tree-paths.dart33L
-rw-r--r--leetcode/binary-tree-postorder-traversal/postorder-traversal.cpp32L
-rw-r--r--leetcode/binary-tree-postorder-traversal/postorder-traversal.dart23L
-rw-r--r--leetcode/binary-tree-preeorder-traversal/preorder-traversal-iterative.cpp38L
-rw-r--r--leetcode/binary-tree-preeorder-traversal/preorder-traversal.cpp37L
-rw-r--r--leetcode/binary-tree-preeorder-traversal/preorder-traversal.dart26L
-rw-r--r--leetcode/binary-tree-right-side-view/binary-tree-right-side-view.dart42L
-rw-r--r--leetcode/binary-tree-right-side-view/binary-tree-right-side-view.py33L
-rw-r--r--leetcode/binary-tree-zigzag-level-order/zig-zag-level-order.dart53L
-rw-r--r--leetcode/bulb-switcher/bulb-switcher.js26L
-rw-r--r--leetcode/bulb-switcher/bulb-switcherV2.js24L
-rw-r--r--leetcode/calculate-special-bonus/special-bonus.sql10L
-rw-r--r--leetcode/can-make-arithmetic-progression-from-sequence/can-make-arithmetic-progression-from-sequence.dart23L
-rw-r--r--leetcode/candy/candy.dart36L
-rw-r--r--leetcode/check-divisibility-by-digit-sum-and-product/check-divisibility-by-digit-sum-and-product.py16L
-rw-r--r--leetcode/cinema-seat-allocation/cinema-seat-allocation-v2.py40L
-rw-r--r--leetcode/cinema-seat-allocation/cinema-seat-allocation-v3.py43L
-rw-r--r--leetcode/cinema-seat-allocation/cinema-seat-allocation-v4.py38L
-rw-r--r--leetcode/cinema-seat-allocation/cinema-seat-allocation-v5.py36L
-rw-r--r--leetcode/cinema-seat-allocation/cinema-seat-allocation.py58L
-rw-r--r--leetcode/classes-more-than-5-students/classes-more-than-5-students.sql6L
-rw-r--r--leetcode/climbing-stairs/climbing-stairs.dart36L
-rw-r--r--leetcode/clone-graph/clone-graphV1.py50L
-rw-r--r--leetcode/combination-sum-ii/combination-sum-ii.dart41L
-rw-r--r--leetcode/combination-sum-ii/combination-sum-ii.py30L
-rw-r--r--leetcode/combination-sum-iii/combination-sum-iii.dart45L
-rw-r--r--leetcode/combination-sum-iv/combination-sum-iv.dart40L
-rw-r--r--leetcode/combination-sum/combination-sum.dart38L
-rw-r--r--leetcode/combination-sum/combination-sum.py32L
-rw-r--r--leetcode/combination-sum/combination-sumV2.py27L
-rw-r--r--leetcode/combinations/combinations.dart36L
-rw-r--r--leetcode/combine-two-tables/combine-twV1.sql5L
-rw-r--r--leetcode/combine-two-tables/combine.sql10L
-rw-r--r--leetcode/confirmation-rate/confirmation-rate.sql11L
-rw-r--r--leetcode/consecutive-numbers/consecutive-numbers.sql10L
-rw-r--r--leetcode/consecutive-numbers/consecutive-numbers1.sql8L
-rw-r--r--leetcode/contains-duplicate-ii/contains-duplicate.dart16L
-rw-r--r--leetcode/contains-duplicate-ii/contains-duplicate.py19L
-rw-r--r--leetcode/contains-duplicate-ii/contains-duplicateV2.dart27L
-rw-r--r--leetcode/contains-duplicate/contains-duplicate.cpp34L
-rw-r--r--leetcode/contains-duplicate/contains-duplicateV2.cpp50L
-rw-r--r--leetcode/convert-binary-number-in-a-linked-list-to-integer/convert-binary-number-in-a-linked-list-to-integer.dart27L
-rw-r--r--leetcode/convert-sorted-array-to-binary-search-tree/convert-sorted-array-to-binary-search-tree.dart19L
-rw-r--r--leetcode/convert-sorted-list-to-binary-search/convert-sorted-list-to-binary-search-tree.dart49L
-rw-r--r--leetcode/count-good-cyclic-rotations/count-good-cyclic-rotations.py27L
-rw-r--r--leetcode/count-good-nodes-in-binary-tree/count-good.py31L
-rw-r--r--leetcode/count-negative-numbers-in-a-matrix/count-negative-numbers-in-a-matrix.dart24L
-rw-r--r--leetcode/count-nodes-equal-to-average-of-subtree/count-nodes-equal-to-average-of-subtree.py32L
-rw-r--r--leetcode/count-number-of-texts/count-number-of-texts.dart44L
-rw-r--r--leetcode/count-primes/count-primes.cpp51L
-rw-r--r--leetcode/count-rotations-with-exactly-k-equal-adjacent-pairs/count-rotations-with-exactly-k-equal-adjacent-pairs.py23L
-rw-r--r--leetcode/counting-bits/counting-bits.cpp36L
-rw-r--r--leetcode/course-schedule-ii/course-schedule-ii-v2.cpp63L
-rw-r--r--leetcode/course-schedule-ii/course-schedule-ii.cpp71L
-rw-r--r--leetcode/course-schedule-iv/course-schedule-iv.cpp63L
-rw-r--r--leetcode/course-schedule/course-schedule.cpp69L
-rw-r--r--leetcode/cousins-in-binary-tree/cousins-in-binary-tree.dart44L
-rw-r--r--leetcode/customer-placing-the-largest/customer-placing-the-largest-number-of-orders.sql8L
-rw-r--r--leetcode/customers-who-bought-all-products/customers-who-bought-all.sql15L
-rw-r--r--leetcode/customers-who-never-order/customers-who-never-order.sql10L
-rw-r--r--leetcode/daily-leads-and-parners/daily-leads.sql6L
-rw-r--r--leetcode/decode-ways/decode-ways.dart39L
-rw-r--r--leetcode/delete-characters-to-make-fancy-string/delete-characters-to-make-fancy-stringV1.py21L
-rw-r--r--leetcode/delete-duplicate-emails/delete-duplicate-emails.sql5L
-rw-r--r--leetcode/department-highest-salary/department-highest-salary.sql11L
-rw-r--r--leetcode/design-add-and-search-words-data-structure/design-add.py55L
-rw-r--r--leetcode/design-hashset/design-hashset.dart41L
-rw-r--r--leetcode/design-parking-system/design-parking-system.dart42L
-rw-r--r--leetcode/design-twitter/design-twitterV1.py89L
-rw-r--r--leetcode/diameter-of-binary-tree/diameter-binary-tree.py48L
-rw-r--r--leetcode/distribute-elements-into-two-arrays-i/distribute-elements-into-two-arrays-i.py17L
-rw-r--r--leetcode/divide-two-integers/divide-two-integers-V2.dart56L
-rw-r--r--leetcode/divide-two-integers/divide-two-integers.dart18L
-rw-r--r--leetcode/duplicate-emails/duplicate-emails.sql9L
-rw-r--r--leetcode/elimination-game/elimination-game.dart27L
-rw-r--r--leetcode/employee-bonus/employee-bonus.sql8L
-rw-r--r--leetcode/employees-earning-more-than-managers/employees-earning.sql8L
-rw-r--r--leetcode/employees-reporting-to-managers/employees-reporting-to-managers.sql13L
-rw-r--r--leetcode/employees-whose-manager-left-the-company/managers-who-left-the-company.sql11L
-rw-r--r--leetcode/employees-with-missing-information/with-missing-info.sql19L
-rw-r--r--leetcode/equal-row-and-column-pairs/equal-row-and-column-pairs.dart30L
-rw-r--r--leetcode/even-odd-tree/even-odd-tree.py44L
-rw-r--r--leetcode/fibonacci-number/fibonacci-number.cpp13L
-rw-r--r--leetcode/fibonacci-number/fibonacci-number.dart20L
-rw-r--r--leetcode/find-all-possible-recipes-from-given-supplies/find-all-possible-recipes-from-given-supplies.py76L
-rw-r--r--leetcode/find-center-of-star-graph/find-center-of-star-graph.dart16L
-rw-r--r--leetcode/find-customer-referee/find-customer-referee.sql6L
-rw-r--r--leetcode/find-duplicate-subtrees/find-duplicate-subtrees.cpp46L
-rw-r--r--leetcode/find-eventual-safe-states/find-eventual-safe-states.cpp88L
-rw-r--r--leetcode/find-first-and-last-position-of-elements-in-sorted-array/first-and-last.dart100L
-rw-r--r--leetcode/find-followers-count/find-followers-count.sql6L
-rw-r--r--leetcode/find-longest-harmonious-subsequence/find-longest.py25L
-rw-r--r--leetcode/find-longest-harmonious-subsequence/find-longestV2.py25L
-rw-r--r--leetcode/find-min-in-rotated-sorted-array/findMin.py32L
-rw-r--r--leetcode/find-mode-in-binary-search-tree/mode-of-binary-tree.dart47L
-rw-r--r--leetcode/find-original-typed-string-i/find-original-i.py44L
-rw-r--r--leetcode/find-peak-element/find-peak-element.dart26L
-rw-r--r--leetcode/find-smallest-letter-greater-than-target/find-smallest-letter-greater-than-target.dart33L
-rw-r--r--leetcode/find-the-difference-of-two-array/difference-of-two-arrays.dart29L
-rw-r--r--leetcode/find-the-difference-of-two-array/difference-of-two-arraysV2.dart25L
-rw-r--r--leetcode/find-the-difference/find-the-difference.dart26L
-rw-r--r--leetcode/find-the-duplicate-number/find-duplicate.py16L
-rw-r--r--leetcode/find-the-index-of-the-first-occurence/find-index-of-first-occurence.dart51L
-rw-r--r--leetcode/find-the-index-of-the-first-occurrence-in-a-string/find-the-iV1.py6L
-rw-r--r--leetcode/find-the-index-of-the-first-occurrence-in-a-string/find-the-iV2.py13L
-rw-r--r--leetcode/find-the-k-th-character-in-string-game-i/find-the-k-th-character-in-string-game-iV1.py13L
-rw-r--r--leetcode/find-the-maximum-length-of-valid-subsequence-i/find-the-maximum-length-of-valid-subsequence-iV1.py54L
-rw-r--r--leetcode/find-unique-binary-string/find-unique-binary-string.dart29L
-rw-r--r--leetcode/first-missing-positive/first-missing-positive.dart24L
-rw-r--r--leetcode/first-missing-positive/first-missing-positiveV1.py39L
-rw-r--r--leetcode/first-non-repeating-character/first-non-repeating.dart20L
-rw-r--r--leetcode/first-unique-character-in-a-string/first-unique-character.dart24L
-rw-r--r--leetcode/flatten-binary-tree-to-linked-list/flatten-binary-tree-to-linked-list.dart30L
-rw-r--r--leetcode/game-of-life/game-of-life.dart79L
-rw-r--r--leetcode/game-play-analysis/game-play-analysis.sql6L
-rw-r--r--leetcode/generate-parentheses/generate-parentheses.dart34L
-rw-r--r--leetcode/group-sold-products-by-the-date/group-sold-products-by-the-date.sql9L
-rw-r--r--leetcode/guess_number/guess-number-higher-or-lower.cpp55L
-rw-r--r--leetcode/house-robber/house-robber-tle.dart51L
-rw-r--r--leetcode/house-robber/house-robberV2.dart57L
-rw-r--r--leetcode/image-overlap/image-overlap.py27L
-rw-r--r--leetcode/implement-queue/implement-queue.cpp59L
-rw-r--r--leetcode/implement-stack-using-queues/stack-using-queues.js32L
-rw-r--r--leetcode/implement-trie/trie.py58L
-rw-r--r--leetcode/increasing-order-search-tree/increasing-order-search-tree.dart42L
-rw-r--r--leetcode/insert-interval/insert-intervalV1.py50L
-rw-r--r--leetcode/insert-interval/insert-intervalV2.py33L
-rw-r--r--leetcode/insertion-sort-list/insertion-sort-list.dart65L
-rw-r--r--leetcode/integer-to-roman/integer-to-roman.cpp54L
-rw-r--r--leetcode/integer-to-roman/integer-to-romanV2Hash.cpp64L
-rw-r--r--leetcode/integer-to-roman/integer-to-romanV3Vector.cpp47L
-rw-r--r--leetcode/intersection-of-two-arrays/interesection-of-two-arrays.dart27L
-rw-r--r--leetcode/invalid-tweets/invalid-tweets.sql4L
-rw-r--r--leetcode/invert-binary-tree/invert-binary-tree.js52L
-rw-r--r--leetcode/invert-binary-tree/invert-binary-tree.py32L
-rw-r--r--leetcode/jewels-and-stones/jewels-and-stones.dart20L
-rw-r--r--leetcode/jump-game-ii/jump-game-ii.dart29L
-rw-r--r--leetcode/jump-game/jump-game.dart38L
-rw-r--r--leetcode/jump-game/jump-gameV2.dart30L
-rw-r--r--leetcode/k-closest-points-to-origin/k-closest-points-to-originV1.py65L
-rw-r--r--leetcode/koko-eating-bananas/eating.py50L
-rw-r--r--leetcode/kth-largest-element-in-a-stream/kth-largest-element-in-a-streamV1.py28L
-rw-r--r--leetcode/kth-largest-element-in-a-stream/kth-largest-element-in-a-streamV2.py21L
-rw-r--r--leetcode/kth-largest-element-in-a-stream/kth-largest-element-in-a-streamV3.py90L
-rw-r--r--leetcode/kth-largest-element-in-a-stream/kth-largest-element-in-a-streamV4.py98L
-rw-r--r--leetcode/kth-largest-element-in-a-stream/kth-largest-element-in-a-streamV5.py101L
-rw-r--r--leetcode/kth-largest-element-in-an-array/kth-largest-element-in-an-arrayV1.cpp49L
-rw-r--r--leetcode/kth-largest-element-in-an-array/kth-largest-element-in-an-arrayV1.py8L
-rw-r--r--leetcode/kth-largest-element-in-an-array/kth-largest-element-in-an-arrayV2.cpp55L
-rw-r--r--leetcode/kth-largest-element-in-an-array/kth-largest-element-in-an-arrayV2.py70L
-rw-r--r--leetcode/kth-largest-element/kth-largest-element.cpp24L
-rw-r--r--leetcode/kth-largest-element/kth-largest-elementV2.cpp49L
-rw-r--r--leetcode/kth-smallest-element-in-a-bst/kth-smallest.py40L
-rw-r--r--leetcode/largest-odd-number-in-string/largest-odd-number-in-string.dart21L
-rw-r--r--leetcode/last-stone-weight/last-stone-weightV1.py32L
-rw-r--r--leetcode/length-of-last-word/length-of-last-word.cpp42L
-rw-r--r--leetcode/length-of-last-word/length-of-last-word.dart32L
-rw-r--r--leetcode/letter-combinations-of-a-phone-number/letter-combinations-of-a-phone-number.dart43L
-rw-r--r--leetcode/letter-combinations-of-a-phone-number/letter-combinations-of-a-phone-numberV1.py37L
-rw-r--r--leetcode/linked-list-cycle/linked-list-cycle.js35L
-rw-r--r--leetcode/linked-list-cycle/linked-list-cycle.py24L
-rw-r--r--leetcode/linked-list-cycle/linked-list-cycleV2.py32L
-rw-r--r--leetcode/list-the-products-ordered-in-period/list-the-products.sql15L
-rw-r--r--leetcode/longest-common-prefix/longest-common-prefix.cpp34L
-rw-r--r--leetcode/longest-consecutive-sequence/longest-consecutive-sequence-v2.py50L
-rw-r--r--leetcode/longest-consecutive-sequence/longest-consecutive-sequence-v3.py58L
-rw-r--r--leetcode/longest-consecutive-sequence/longest-consecutive-sequence.py24L
-rw-r--r--leetcode/longest-increasing-subsequence/longest-increasing-subsequence.dart32L
-rw-r--r--leetcode/longest-palindromic-substring/longest-palindromic-substring.dart54L
-rw-r--r--leetcode/longest-palindromic-substring/longest-palindromic-substring.py35L
-rw-r--r--leetcode/longest-repeating-character-replacement/longest-repeating.py58L
-rw-r--r--leetcode/longest-subarray-of-1s-after-deleting-one-element/longest-subarray-of-1s-after-deleting-one-element.py22L
-rw-r--r--leetcode/longest-substring-without-repeating-characters/longest-substring-recursive.py17L
-rw-r--r--leetcode/longest-substring-without-repeating-characters/longest-substring.py25L
-rw-r--r--leetcode/longest-valid-parentheses/longest-valid-parentheses.js53L
-rw-r--r--leetcode/longest-zigzag-path/longest-zigzag-path.dart51L
-rw-r--r--leetcode/lowest-common-ancestor-of-a-binary-search-tree/lowest.py31L
-rw-r--r--leetcode/lru-cache/lru-cacheV1.py56L
-rw-r--r--leetcode/majority-element-ii/majority-element-ii.dart25L
-rw-r--r--leetcode/majority-element/majority.cpp50L
-rw-r--r--leetcode/matrix-diagonal-sum/diagonal-sum.dart32L
-rw-r--r--leetcode/max-area-of-island/max-area-of-islandV1.py34L
-rw-r--r--leetcode/max-dotproduct-of-subsequences/MaxDotProductOfTwoSubsequences.py13L
-rw-r--r--leetcode/maximum-depth/maximum-depth.dart35L
-rw-r--r--leetcode/maximum-depth/maximum-depth.py20L
-rw-r--r--leetcode/maximum-difference-between-adjacent-elements-in-a-circular-array/max-diff.py10L
-rw-r--r--leetcode/maximum-difference-by-remapping-a-digit/max-diff.py45L
-rw-r--r--leetcode/maximum-earnings-from-taxi/maximum-earnings-from-taxi-v1.py35L
-rw-r--r--leetcode/maximum-earnings-from-taxi/maximum-earnings-from-taxi-v2.py40L
-rw-r--r--leetcode/maximum-gap/maximum-gap.dart49L
-rw-r--r--leetcode/maximum-level-sum-of-a-binary-tree/max-level-sum-of-binary-tree.dart44L
-rw-r--r--leetcode/maximum-number-of-moves-in-a-grid/maximum-number-of-moves-in-a-grid.dart79L
-rw-r--r--leetcode/maximum-number-of-vowels-in-a-substring/max-vowels-in-substring.dart42L
-rw-r--r--leetcode/maximum-odd-binary-number/maximum-odd-binary-number.py39L
-rw-r--r--leetcode/maximum-odd-binary-number/maximum-odd-binary-numberV2.py18L
-rw-r--r--leetcode/maximum-product-subarray/maximum-product-subarray.dart30L
-rw-r--r--leetcode/maximum-subarray/maximum-subarray.cpp46L
-rw-r--r--leetcode/maximum-subarray/maximum-subarray.dart28L
-rw-r--r--leetcode/maximum-subarray/maximum-subarrayV2.cpp54L
-rw-r--r--leetcode/maximum-subsequence-score/maximum-subsequence-score.dart52L
-rw-r--r--leetcode/maximum-twin-sum-of-a-linked-list/maximum-twin-sum-of-a-linked-list.dart23L
-rw-r--r--leetcode/median-of-sorted-arrays/median-of-sorted-array.cpp43L
-rw-r--r--leetcode/merge-intervals/merge-intervalsV1.py36L
-rw-r--r--leetcode/merge-k-sorted-lists/merge-k-sorted-lists.dart83L
-rw-r--r--leetcode/merge-nodes-in-between-zeroes/merge-nodes-between-zeroes.dart48L
-rw-r--r--leetcode/merge-sorted-array/merge-sorted-arrays.dart38L
-rw-r--r--leetcode/merge-two-sorted-lists/merge-two-sorted-lists.dart64L
-rw-r--r--leetcode/merge-two-sorted-lists/merge-two-sorted-lists.js77L
-rw-r--r--leetcode/merge-two-sorted-lists/merge-two-sorted-lists.py46L
-rw-r--r--leetcode/merge-two-sorted-lists/merge-two-sorted-listsV2.dart81L
-rw-r--r--leetcode/mice-and-cheese/mice-and-cheese.py33L
-rw-r--r--leetcode/middle-of-linked-list/middle-of-linked-list.dart17L
-rw-r--r--leetcode/min-cost-climbing-stairs/min-cost-climbing-stairs.dart40L
-rw-r--r--leetcode/min-cost-to-connect-all-points/min-cost-to-connect-all-points.py43L
-rw-r--r--leetcode/minimum-absolute-difference-in-bst/min-diff-in-bst.dart34L
-rw-r--r--leetcode/minimum-cost-for-tickets/minimum-cost-for-tickets.dart67L
-rw-r--r--leetcode/minimum-depth-of-binary-tree/minimum-depth.js54L
-rw-r--r--leetcode/minimum-height-trees/minimum-height-trees.cpp79L
-rw-r--r--leetcode/minimum-number-of-work-sessions-to-finish-the-tasks/minimum-number-of-work-sessions.dart44L
-rw-r--r--leetcode/minimum-path-sum/minimum-path-sum.dart45L
-rw-r--r--leetcode/minimum-size-subarray-sum/minimum-size-subarray-sum-v2.py34L
-rw-r--r--leetcode/minimum-size-subarray-sum/minimum-size-subarray-sum.py29L
-rw-r--r--leetcode/minimum-sum-of-four-digit-number-after-splitting-digits/minimum-sum.dart31L
-rw-r--r--leetcode/minimum-time-to-visit-a-cell-in-a-grid/minimum-time-to-visit.dart56L
-rw-r--r--leetcode/missing-number/missing-number.cpp41L
-rw-r--r--leetcode/missing-number/missing-numberV1.py9L
-rw-r--r--leetcode/missing-number/missing-numberV2.cpp38L
-rw-r--r--leetcode/most-water/most-water.cpp47L
-rw-r--r--leetcode/n-queens/n-queens.dart65L
-rw-r--r--leetcode/nearest-available-drone/nearest-available-drone.py17L
-rw-r--r--leetcode/new-21-game/new-21-game-v2.py22L
-rw-r--r--leetcode/new-21-game/new-21-game-v3.py32L
-rw-r--r--leetcode/new-21-game/new-21-game.py31L
-rw-r--r--leetcode/non-overlapping-intervals/non-overlapping-intervalsV1.py62L
-rw-r--r--leetcode/non-overlapping-intervals/non-overlapping-intervalsV2.py60L
-rw-r--r--leetcode/not-boring-movies/not-boring-movies.sql6L
-rw-r--r--leetcode/number-of-1-bits/number-of-1-bitsV1.py15L
-rw-r--r--leetcode/number-of-1-bits/number-of-1-bitsV2.py14L
-rw-r--r--leetcode/number-of-good-pairs/number-of-good-pairs.dart40L
-rw-r--r--leetcode/number-of-islands/number-of-islands.dart52L
-rw-r--r--leetcode/number-of-islands/number-of-islandsV1.py44L
-rw-r--r--leetcode/number-of-islands/number-of-islandsV2.dart55L
-rw-r--r--leetcode/number-of-provinces/number-of-provinces-v2.cpp59L
-rw-r--r--leetcode/number-of-provinces/number-of-provinces.cpp51L
-rw-r--r--leetcode/number-of-provinces/number-of-provinces.dart50L
-rw-r--r--leetcode/number-of-unique-subjects-taught-by-each-teacher/number-of-subjects-by-teacher.sql6L
-rw-r--r--leetcode/odd-even-linked-list/odd-even-linked-list.dart42L
-rw-r--r--leetcode/palindrome-linked-list/palindrome-linked-list.dart45L
-rw-r--r--leetcode/palindrome-number/palindrome-number.cpp36L
-rw-r--r--leetcode/palindrome-number/palindrome-number.py10L
-rw-r--r--leetcode/palindrome-number/palindrome-numberV2.cpp42L
-rw-r--r--leetcode/palindrome-partitioning/palindrome-partitioningV1.py32L
-rw-r--r--leetcode/palindromic-substrings/palindromic-substrings.cpp34L
-rw-r--r--leetcode/pascals-triangle-ii/pascals-triangle-ii.dart22L
-rw-r--r--leetcode/pascals-triangle/pascals-triangle.dart27L
-rw-r--r--leetcode/path-sum-ii/path-sum-ii.dart23L
-rw-r--r--leetcode/path-sum-iii/path-sum-iii.dart55L
-rw-r--r--leetcode/path-sum/path-sum.dart31L
-rw-r--r--leetcode/path-with-maximum-gold/path-with-maximum-gold.dart50L
-rw-r--r--leetcode/patients-with-a-condition/patients-with-a-condition.sql10L
-rw-r--r--leetcode/percentage-of-users-attended-a-contest/percent-attended.sql13L
-rw-r--r--leetcode/permutation-in-string/perm-in-string.py70L
-rw-r--r--leetcode/permutations-ii/permutations-ii.cpp39L
-rw-r--r--leetcode/permutations-ii/permutations-ii.dart65L
-rw-r--r--leetcode/permutations-ii/permutations-ii.py34L
-rw-r--r--leetcode/permutations/permutations.dart28L
-rw-r--r--leetcode/permutations/permutationsV1.py40L
-rw-r--r--leetcode/plus-one/plus-one.dart36L
-rw-r--r--leetcode/power-of-two/power-of-two.dart17L
-rw-r--r--leetcode/powx-n/powx-n.dart17L
-rw-r--r--leetcode/primary-department-for-each-employee/primary-department.sql12L
-rw-r--r--leetcode/product-of-array-except-self/product-of-array-except-self.cpp43L
-rw-r--r--leetcode/product-sales-analysis-iii/product-sales-analysis-iii.sql11L
-rw-r--r--leetcode/project-employees-i/project-employees.sql8L
-rw-r--r--leetcode/range-sum-of-bst/range-sum-of-bst.dart21L
-rw-r--r--leetcode/range-sum-query-immutable/range-sum-query-immutable.cpp18L
-rw-r--r--leetcode/range-sum-query-mutable/range-sum-query-mutable-v2.py97L
-rw-r--r--leetcode/range-sum-query-mutable/range-sum-query-mutable.py80L
-rw-r--r--leetcode/rank-scores/rank-scores.sql9L
-rw-r--r--leetcode/recyclable-and-low-fat/recyclable-and-low-fat.sql8L
-rw-r--r--leetcode/redundant-connection/redundant-connection.cpp82L
-rw-r--r--leetcode/regular-expression-matching/regular-expression-matching.dart12L
-rw-r--r--leetcode/remove-all-occurences-of-a-substring/remove-all-lazy.dart11L
-rw-r--r--leetcode/remove-all-occurences-of-a-substring/remove-all.dart32L
-rw-r--r--leetcode/remove-duplicates-from-sorted-array/remove-duplicates.dart37L
-rw-r--r--leetcode/remove-duplicates-from-sorted-array/remove-duplicates.js24L
-rw-r--r--leetcode/remove-duplicates-from-sorted-array/remove-duplicates.py16L
-rw-r--r--leetcode/remove-duplicates-from-sorted-array/remove-duplicatesV2.js31L
-rw-r--r--leetcode/remove-duplicates-from-sorted-list/remove-duplicates.dart50L
-rw-r--r--leetcode/remove-element/remove-element.cpp40L
-rw-r--r--leetcode/remove-linked-list-elements/remove-elements.js50L
-rw-r--r--leetcode/remove-nodes-from-linked-list/remove-nodes-from-linked-list.dart44L
-rw-r--r--leetcode/remove-nth-node-from-end/remove-nth.py38L
-rw-r--r--leetcode/remove-nth-node/remove-nth-node-from-end.cpp61L
-rw-r--r--leetcode/remove-trailing-zeroes/remove-trailing-zeroes.cpp14L
-rw-r--r--leetcode/reorder-list/reorder-list.dart36L
-rw-r--r--leetcode/reorder-list/reorder-list.py77L
-rw-r--r--leetcode/replace-employee-id-with-the-unique-identifier/replace-employee-id.sql6L
-rw-r--r--leetcode/reverse-integer/reverse-integer-2.cpp29L
-rw-r--r--leetcode/reverse-integer/reverse-integer.cpp45L
-rw-r--r--leetcode/reverse-linked-list-ii/reverse-linked-list-ii.dart52L
-rw-r--r--leetcode/reverse-linked-list/reverse-list.dart40L
-rw-r--r--leetcode/reverse-linked-list/reverse-list.py26L
-rw-r--r--leetcode/reverse-words-in-a-string/reverse-words-in-a-string.dart26L
-rw-r--r--leetcode/rising-temperature/rising-temp.sql8L
-rw-r--r--leetcode/roman-to-integer/roman-to-integer.cpp48L
-rw-r--r--leetcode/rotate-array/rotate-array.dart19L
-rw-r--r--leetcode/rotate-image/rotate-image.dart21L
-rw-r--r--leetcode/rotate-list/rotate-list.dart57L
-rw-r--r--leetcode/sales-person/sales-person.sql20L
-rw-r--r--leetcode/same-tree/same-tree.dart54L
-rw-r--r--leetcode/same-tree/same-tree.py31L
-rw-r--r--leetcode/search-a-2d-matrix/search-a-2d-matrix.dart44L
-rw-r--r--leetcode/search-a-2d-matrix/search-a-2d-matrix.py25L
-rw-r--r--leetcode/search-a-2d-matrix/search-a-2d-matrixV2.dart55L
-rw-r--r--leetcode/search-in-rotated-array/search-in-roatated-array.dart15L
-rw-r--r--leetcode/search-in-rotated-sorted-array/searchArray.py32L
-rw-r--r--leetcode/search-insert-position/search-insert-position.cpp43L
-rw-r--r--leetcode/search-insert-position/search-insert-position.dart42L
-rw-r--r--leetcode/second-highest-salary/second-highest-salary.sql12L
-rw-r--r--leetcode/set-matrix-zeroes/set-matrix-zeroes.dart42L
-rw-r--r--leetcode/shortest-and-lexicographically-smallest-beautiful-string/shortest-and-lexicographically-smallest-beautiful-string.cpp80L
-rw-r--r--leetcode/shortest-bridge/shortest-bridge.dart112L
-rw-r--r--leetcode/shortest-path/shortest-path.dart47L
-rw-r--r--leetcode/shortest-path/shortest-pathV2.dart57L
-rw-r--r--leetcode/shuffle-the-array/shuffle-the-array.js31L
-rw-r--r--leetcode/sign-of-product-of-array/sign-of-productV1.dart19L
-rw-r--r--leetcode/sign-of-product-of-array/sign-of-productV2.dart26L
-rw-r--r--leetcode/similar-string-groups/similar-string-groups.js32L
-rw-r--r--leetcode/single-number/single-number.cpp45L
-rw-r--r--leetcode/single-number/single-number.py6L
-rw-r--r--leetcode/single-number/single-numberV2.cpp33L
-rw-r--r--leetcode/smallest-missing-multiple-of-k/smallest-missing-multiple-of-k-v2.py10L
-rw-r--r--leetcode/smallest-missing-multiple-of-k/smallest-missing-multiple-of-k.py12L
-rw-r--r--leetcode/snapshot-array/snapshot-array.dart26L
-rw-r--r--leetcode/solving-questions-with-brainpower/solving-questions-with-brainpower.dart30L
-rw-r--r--leetcode/solving-questions-with-brainpower/solving-questions-with-brainpowerV2.dart38L
-rw-r--r--leetcode/solving-questions-with-brainpower/solving-questionsV3.dart35L
-rw-r--r--leetcode/sort-an-array/sort-an-array.cpp56L
-rw-r--r--leetcode/sort-an-array/sort-an-array.dart40L
-rw-r--r--leetcode/sort-array-by-increasing-frequency/sort-array-by-increasing-frequency.dart47L
-rw-r--r--leetcode/sort-characters-by-frequency/sort-characters-by-freqency.dart37L
-rw-r--r--leetcode/sort-colors/sort-colors.dart44L
-rw-r--r--leetcode/sort-list/sort-list.cpp54L
-rw-r--r--leetcode/soup-serving/soup-serving.dart52L
-rw-r--r--leetcode/spiral-matrix-ii/spiral-matrix-ii.dart59L
-rw-r--r--leetcode/spiral-matrix-iv/spiral-matrix-iv.dart56L
-rw-r--r--leetcode/spiral-matrix/spiral-matrix.dart49L
-rw-r--r--leetcode/sqrtx/sqrtx.dart25L
-rw-r--r--leetcode/squares-of-a-sorted-array/squares-of-a-sorted-array.py44L
-rw-r--r--leetcode/students-and-examinations/students-and-examintions.sql12L
-rw-r--r--leetcode/subsets-ii/subsets-ii.dart35L
-rw-r--r--leetcode/subsets-ii/subsets-iiV1.py39L
-rw-r--r--leetcode/subsets-ii/subsets-iiV2.py30L
-rw-r--r--leetcode/subsets/subsets.cpp24L
-rw-r--r--leetcode/subsets/subsets.dart30L
-rw-r--r--leetcode/sudoku-solver/sudoku-solver.dart73L
-rw-r--r--leetcode/sum-of-left-leaves/sum-of-left-leaves.dart38L
-rw-r--r--leetcode/swap-nodes-in-pairs/swap.cpp49L
-rw-r--r--leetcode/swap-nodes-in-pairs/swap.py29L
-rw-r--r--leetcode/swap-nodes/swap-nodes.dart30L
-rw-r--r--leetcode/swap-nodes/swap-nodes.js36L
-rw-r--r--leetcode/swap-salary/swap-salary.sql7L
-rw-r--r--leetcode/swapping-nodes-in-a-linked-list/swapping-nodes-in-a-linked-list.dart29L
-rw-r--r--leetcode/symetric-tree/symetric-tree.js69L
-rw-r--r--leetcode/target-sum/target-sum.dart22L
-rw-r--r--leetcode/target-sum/target-sumV2.dart26L
-rw-r--r--leetcode/task-scheduler/task-schedulerV1.py74L
-rw-r--r--leetcode/task-scheduler/task-schedulerV2.py71L
-rw-r--r--leetcode/the-k-weakest-rows-in-a-matrix/the-k-weakest-rows-in-a-matrix.dart52L
-rw-r--r--leetcode/the-kth-factor-of-n/the-kth-factor-of-n.dart21L
-rw-r--r--leetcode/time-based-key-value-store/time-based.py45L
-rw-r--r--leetcode/top-k-frequent-elements/top-k-frequent-elements-v1.dart30L
-rw-r--r--leetcode/top-k-frequent-words/top-k-frequent-words-v2.py35L
-rw-r--r--leetcode/top-k-frequent-words/top-k-frequent-words.dart42L
-rw-r--r--leetcode/top-k-frequent-words/top-k-frequent-words.py22L
-rw-r--r--leetcode/transpose/transpose.py8L
-rw-r--r--leetcode/triangle-judgement/triangle-judgement.sql9L
-rw-r--r--leetcode/triangle/triangle.dart31L
-rw-r--r--leetcode/two-best-non-overlapping-events/non-overlapping-v2.cpp22L
-rw-r--r--leetcode/two-best-non-overlapping-events/non-overlapping.cpp49L
-rw-r--r--leetcode/two-sums/two-sum.dart35L
-rw-r--r--leetcode/two-sums/two-sum.js25L
-rw-r--r--leetcode/two-sums/two-sumV2.dart32L
-rw-r--r--leetcode/two-sums/two-sums.cpp57L
-rw-r--r--leetcode/two-sums/two-sums.py26L
-rw-r--r--leetcode/two-sums/two-sumsV2.cpp35L
-rw-r--r--leetcode/two-sums/two-sumsV2.py12L
-rw-r--r--leetcode/two-sums/two-sumsV3-hashtable.cpp50L
-rw-r--r--leetcode/unique-binary-search-trees/unique-binary-search-trees.dart36L
-rw-r--r--leetcode/unique-binary-search-trees/unique-binary-search-treesV2.dart32L
-rw-r--r--leetcode/unique-paths-ii/unique-paths-ii.dart33L
-rw-r--r--leetcode/unique-paths-iii/unique-paths-iii.dart62L
-rw-r--r--leetcode/unique-paths/unique-paths.dart27L
-rw-r--r--leetcode/unique-paths/unique-pathsV2.dart37L
-rw-r--r--leetcode/unique-three-digit-even-number/unique-three-digit-even-number.py26L
-rw-r--r--leetcode/valid-palindrome-ii/valid-palindrome-ii.dart30L
-rw-r--r--leetcode/valid-palindrome/valid-palindrome.dart25L
-rw-r--r--leetcode/valid-palindrome/valid-palindromeV2.dart42L
-rw-r--r--leetcode/valid-parenthesis/valid-parenthesis-v3.cpp30L
-rw-r--r--leetcode/valid-parenthesis/valid-parenthesis.cpp63L
-rw-r--r--leetcode/valid-parenthesis/valid-parenthesisV2.cpp30L
-rw-r--r--leetcode/valid-square/valid-square.py35L
-rw-r--r--leetcode/valid-sudoku/valid-sudoku.dart52L
-rw-r--r--leetcode/valid-word/valid-wordV1.py22L
-rw-r--r--leetcode/validate-binary-search-tree/validate-binary-search-tree.dart35L
-rw-r--r--leetcode/validate-binary-search-tree/validate-binary-search-tree.py38L
-rw-r--r--leetcode/water-bottles/water-bottles.cpp35L
-rw-r--r--leetcode/word-break/word-break.dart43L
-rw-r--r--leetcode/word-search/word-search.dart84L
-rw-r--r--leetcode/word-search/word-searchV1.py94L
-rw-r--r--leetcode/zig-zag-conversion/zig-zag-conversion.dart56L
-rw-r--r--plan.txt16L