Directories ¶ Show internal Expand all Path Synopsis hackerrank hashmaps/count-triplets command hashmaps/ransom-note command hashmaps/sherlock-and-anagrams command hashmaps/two-strings command leetcode 1-two-sum command 100-same-tree command 101-symmetric-tree command 102-binary-tree-level-order-traversal command 1021-remove-outermost-parentheses command 1029-two-city-scheduling command 103-binary-tree-zigzag-order command 1032-stream-of-characters command 104-maximum-depth-of-binary-tree command 105-construct-binary-tree-from-preorder-and-inorder-traversal command 106-construct-binary-tree-from-inorder-and-postorder-traversal command 107-binary-tree-level-order-traversal-II command 108-convert-sorted-array-to-binary-search-tree command 109-convert-sorted-list-to-binary-search-tree command 1094-car-pooling command 11-container-with-most-water command 110-balanced-binary-tree command 1103-distribute-candies-to-people command 1109-corporate-flight-bookings command 111-minimum-depth-of-binary-tree command 112-path-sum command 1122-relative-sort-array command 1129-shortest-path-with-alternating-colors command 113-path-sum-II command 114-flatten-binary-tree-to-linked-list command 1155-number-of-dice-rolls-with-target-sum command 1160-find-words-that-can-be-formed-by-characters command 1161-maximum-level-sum-of-a-binary-tree command 1162-as-far-from-land-as-possible command 1163-last-substring-in-lexicographical-order command 118-pascals-triangle command 1186-maximum-subarray-sum-with-one-deletion command 119-pascals-triangle-II command 1190-reverse-substrings-between-each-pair-of-parentheses command 1191-K-concatenation-maximum-sum command 1192-critical-connections-in-a-network command 121-best-time-to-buy-and-sell-stock command 1213-intersection-of-three-sorted-arrays command 1217-play-with-chips command 1218-longest-arithmetic-subsequence-of-given-difference command 1219-path-with-maximum-gold command 122-best-time-to-buy-and-sell-stock-II command 1220-count-vowels-permutation command 123-best-time-to-buy-and-sell-stock-III command 1248-count-number-of-nice-subarrays command 1249-minimum-remove-to-make-valid-parentheses command 125-valid-palindrome command 126-word-ladder-II command 1268-search-suggestions-system command 127-word-ladder command 128-longest-consecutive-sequence command 129-sum-root-to-leaf-numbers command 13-roman-to-integer command 1317-convert-Integer-to-the-sum-of-two-no-zero-Integers command 1318-minimum-flips-to-make-a-OR-b-equal-to-c command 1319-number-of-operations-to-make-network-connected command 1323-maximum-69-number command 1324-print-words-vertically command 1325-delete-leaves-with-a-given-value command 1326-minimum-number-of-taps-to-open-to-water-a-garden command 1332-remove-palindromic-subsequences command 1333-filter-restaurants-by-vegan-friendly-price-and-distance command 1334-find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance command 134-gas-station command 136-single-number command 1365-how-many-numbers-are-smaller-than-the-current-number command 1367-linked-list-in-binary-tree command 139-word-break command 14-longest-common-prefix command 140-word-break-II command 141-linked-list-cycle command 142-linked-list-cycle-II command 143-reorder-list command 144-binary-tree-preorder-traversal command 145-binary-tree-postorder-traversal command 146-LRU-cache command 148-sort-list command 15-3Sum command 150-evaluate-reverse-polish-notation command 151-reverse-words-in-a-string command 152-maximum-product-subarray command 153-find-minimum-in-rotated-sorted-array command 154-find-minimum-in-rotated-sorted-array-II command 155-min-stack command 159-longest-substring-with-at-most-two-distinct-characters command 16-3Sum-closest command 160-intersection-of-two-linked-lists command 164-maximum-gap command 167-two-sum-II command 169-majority-element command 17-letter-combination-of-a-phone-number command 173-binary-search-tree-iterator command 179-largest-number command 18-4Sum command 188-best-time-to-buy-and-sell-stock-IV command 189-rotate-array command 19-remove-Nth-node-from-end-of-list command 190-reverse-bits command 191-number-of-1-bits command 198-house-robber command 199-binary-tree-right-side-view command 2-add-two-numbers command 20-valid-parentheses command 200-number-of-islands command 202-happy-number command 203-remove-linked-list-elements command 204-count-primes command 205-isomorphic-strings command 206-reverse-linked-list command 207-course-schedule command 208-implement-trie command 209-minimum-size-subarray-sum command 21-merge-two-sorted-lists command 210-course-schedule-II command 212-word-search-II command 215-Kth-largest-element-in-an-array command 217-contains-duplicate command 22-generate-paretheses command 221-maximal-square command 222-count-complete-tree-nodes command 226-invert-binary-tree command 23-merge-k-sorted-lists command 230-Kth-smallest-element-in-a-BST command 232-implement-queue-using-stack command 234-palindrome-linked-list command 235-lowest-common-ancestor-of-a-binary-search-tree command 236-lowest-common-ancestor-of-a-binary-tree command 238-product-of-array-without-itself command 239-sliding-maximum-window command 24-swap-nodes-in-pairs command 240-search-in-2D-matrix-II command 242-valid-anagram command 252-meeting-rooms command 253-meeting-rooms-II command 257-binary-tree-paths command 258-add-digits command 26-remove-duplicates-from-sorted-array command 264-ugly-number-II command 268-missing-number command 269-alien-dictionary command 279-perfect-squares command 28-implement-strStr command 280-wiggle-sort command 283-move-zeros command 287-find-the-duplicate-number command 289-game-of-life command 29-divide-two-integers command 290-word-pattern command 295-find-median-from-data-stream command 3-longest-substring-without-repeating command 300-longest-increasing-subsequence command 309-Best-Time-to-Buy-and-Sell-Stock-with-Cooldown command 31-next-permutation command 315-count-of-smaller-number-after-self command 318-maximum-product-of-words-length command 32-longest-vald-parentheses command 322-coin-change command 328-odd-even-linked-list command 33-search-in-rotated-sorted-array command 338-counting-bits command 34-first-and-last-position-of-element-in-sorted-array command 344-reverse-string command 347-top-K-frequent-elements command 348-design-tic-tac-toe command 349-intersection-of-two-arrays command 35-search-insert-position command 350-intersection-of-two-arrays-II command 36-valid-sudoku command 367-valid-perfect-square command 37-sudoku-solver command 387-first-unique-character-in-a-string command 389-find-the-difference command 39-combination-sum command 394-decode-string command 395-longest-substring-with-at-least-K-repeating-characters command 4-median-of-two-sorted-arrays command 402-remove-k-digits command 403-frog-jump command 409-longest-palindrome command 41-first-missing-positive command 410-split-array-largest-sum command 412-fizz-buzz command 415-add-strings command 416-partition-equal-subset-sum command 419-battleships-in-a-board command 42-trapping-rain-water command 424-longest-repeating-character-replacement command 43-multiply-strings command 438-find-all-anagrams-in-a-string command 442-find-all-duplicates-in-an-array command 447-number-of-boomerangs command 448-find-all-numbers-disappeared-in-an-array command 45-jump-game-II command 450-delete-node-in-a-BST command 451-sort-characters-by-frequency command 452-minimum-number-of-arrows-to-burst-balloon command 454-4Sum-II command 455-assign-cookies command 456-132-pattern command 459-repeated-substring-pattern command 46-permutations command 461-hamming-distance command 463-island-perimeter command 47-permutations-II command 472-concatenated-words command 48-rotate-image command 485-max-consecutive-ones command 49-group-anagrams command 494-target-sum command 498-diagonal-traverse command 5-longest-palindromic-substring command 50-pow command 509-fibonacci-number command 51-N-queens command 518-coin-change-2 command 52-N-queens-II command 523-continious-subarray-sum command 53-maximum-subarray command 54-spiral-matrix command 542-01-matrix command 543-diameter-of-binary-tree command 545-boundary-of-binary-tree command 55-jump-game command 557-reverse-words-in-a-string-III command 56-merge-intervals command 560-subarray-sum-equals-K command 572-subtree-of-another-tree command 59-spiral-matrix-II command 594-most-harmonious-subsequence command 599-minimum-index-sum-of-two-lists command 60-permutation-sequence command 605-can-place-flowers command 609-find-duplicate-file-in-system command 61-rotate-list command 617-merge-two-binary-trees command 62-unique-paths command 621-task-scheduler command 622-design-circular-queue command 63-unique-paths-II command 64-minimum-path-sum command 642-design-search-autocomplete-system command 643-maximum-average-subarray-I command 647-palindromic-substrings command 652-find-duplicate-subtrees command 654-maximum-binary-tree command 657-robot-returning-to-origin command 658-find-K-closest-elements command 66-plus-one command 67-add-binary command 677-map-sum-pairs command 678-valid-parenthesis-string command 680-valid-palindrome-II command 692-top-K-frequent-words command 694-number-of-distinct-islands command 695-max-area-of-island command 7-reverse-integer command 70-climb-stairs command 700-search-in-a-binary-search-tree command 701-insert-into-binary-search-tree command 703-Kth-largest-element-in-a-stream command 704-binary-search command 705-design-hashset command 706-design-hashmap command 709-to-lower-case command 71-simplify-path command 716-max-stack command 719-find-Kth-smallest-pair-distance command 72-edit-distance command 724-find-pivot-index command 73-set-matrix-zeroes command 733-flood-fill command 736-parse-lisp-expression command 739-daily-temperatures command 74-search-in-2D-matrix command 744-find-smallest-letter-greater-than-target command 746-min-cost-climbing-stairs command 747-largest-number-at-least-twice-of-others command 75-sort-colors command 752-open-the-lock command 76-minimum-window-substring command 763-partition-labels command 77-combinations command 771-jewels-and-stones command 779-Kth-symbol-in-a-grammar command 78-subsets command 786-K-th-smallest-prime-factor command 787-cheapest-flights-within-K-stops command 79-word-search command 797-all-paths-from-source-to-target command 8-string-to-integer command 80-remove-duplicates-from-sorted-array-II command 802-find-eventual-safe-states command 804-unique-morse-code-words command 807-max-increase-to-keep-city-skyline command 81-search-in-rotated-sorted-array-II command 814-binary-tree-pruning command 818-race-car command 819-most-common-word command 82-remove-duplicates-from-sorted-list-II command 821-shortest-distance-to-a-character command 83-remove-duplicates-from-sorted-list command 832-flipping-a-image command 836-rectangle-overlap command 84-largest-rectangle-in-histogram command 841-keys-and-rooms command 844-backspace-string-compare command 852-peak-index-of-array command 856-score-of-parentheses command 86-partition-list command 860-lemonade-change command 862-shortest-subarray-with-sum-at-least-K command 866-prime-palindrome command 876-middle-of-the-linked-list command 88-merge-sorted-array command 881-boats-to-save-people command 887-super-egg-drop command 890-find-and-replace-pattern command 9-palindrome-number command 90-subsets-II command 904-fruits-into-baskets command 905-sort-array-by-parity command 907-sum-of-subarray-minimums command 91-decode-ways command 912-sort-an-array command 92-reverse-linked-list-II command 921-minimum-add-to-make-parenhless-valid command 925-long-pressed-name command 929-unique-email-addresses command 93-restore-ip-address command 930-binary-subarrays-with-sum command 931-minimum-falling-path-sum command 935-knight-dialer command 937-reorder-data-in-log-files command 938-range-sum-of-bst command 94-binary-tree-inorder-traversal command 942-di-string-match command 944-delete-columns-to-make-sorted command 95-unique-binary-search-trees-II command 950-reveal-cards-in-increasing-order command 957-prison-cells-after-N-days command 96-unique-binary-search-trees command 961-n-repeated-element-in-2n-array command 965-univalued-binary-tree command 969-pancake-sorting command 973-K-closest-point-to-origin command 975-odd-even-jump command 977-squares-of-sorted-array command 979-distribute-coins-in-binary-tree command 98-validate-binary-search-tree command 980-unique-paths-III command 981-time-based-key-value-storage command 987-vertical-order-traversal-of-a-binary-tree command 989-add-to-array-form-of-integer command 99-recover-binary-search-tree command 992-subarrays-with-k-different-integers command 994-rotting-oranges command math search sorting Click to show internal directories. Click to hide internal directories.