Full Code of Sagar0-0/DSA for AI

main fb3dccef4374 cached
2230 files
2.2 MB
691.9k tokens
3946 symbols
1 requests
Download .txt
Showing preview only (2,756K chars total). Download the full file or copy to clipboard to get everything.
Repository: Sagar0-0/DSA
Branch: main
Commit: fb3dccef4374
Files: 2230
Total size: 2.2 MB

Directory structure:
gitextract_b94qtoqo/

├── .github/
│   ├── ISSUE_TEMPLATE/
│   │   └── custom.md
│   └── pull_request_template.md
├── 0012-integer-to-roman/
│   ├── 0012-integer-to-roman.java
│   ├── 0012-integer-to-roman.py
│   ├── NOTES.md
│   └── README.md
├── 0026-remove-duplicates-from-sorted-array/
│   ├── 0026-remove-duplicates-from-sorted-array.java
│   ├── 0026-remove-duplicates-from-sorted-array.py
│   ├── NOTES.md
│   └── README.md
├── 0036-valid-sudoku/
│   ├── 0036-valid-sudoku.java
│   ├── 0036-valid-sudoku.py
│   ├── NOTES.md
│   └── README.md
├── 0037-sudoku-solver/
│   ├── 0037-sudoku-solver.java
│   ├── NOTES.md
│   └── README.md
├── 0038-count-and-say/
│   ├── 0038-count-and-say.java
│   ├── 0038-count-and-say.py
│   └── README.md
├── 0049-group-anagrams/
│   ├── 0049-group-anagrams.java
│   ├── 0049-group-anagrams.py
│   └── README.md
├── 0055-jump-game/
│   ├── 0055-jump-game.java
│   ├── 0055-jump-game.py
│   ├── NOTES.md
│   └── README.md
├── 0057-insert-interval/
│   ├── 0057-insert-interval.java
│   ├── 0057-insert-interval.py
│   ├── NOTES.md
│   └── README.md
├── 0070-climbing-stairs/
│   ├── 0070-climbing-stairs.java
│   ├── NOTES.md
│   └── README.md
├── 0076-minimum-window-substring/
│   ├── 0076-minimum-window-substring.java
│   ├── NOTES.md
│   └── README.md
├── 0079-word-search/
│   ├── 0079-word-search.java
│   ├── NOTES.md
│   └── README.md
├── 0093-restore-ip-addresses/
│   ├── 0093-restore-ip-addresses.java
│   └── README.md
├── 0100-same-tree/
│   ├── 0100-same-tree.java
│   ├── NOTES.md
│   └── README.md
├── 0124-binary-tree-maximum-path-sum/
│   ├── 0124-binary-tree-maximum-path-sum.java
│   ├── NOTES.md
│   └── README.md
├── 0125-valid-palindrome/
│   ├── 0125-valid-palindrome.java
│   ├── NOTES.md
│   └── README.md
├── 0131-palindrome-partitioning/
│   ├── 0131-palindrome-partitioning.java
│   ├── NOTES.md
│   └── README.md
├── 0134-gas-station/
│   ├── 0134-gas-station.java
│   ├── NOTES.md
│   └── README.md
├── 0144-binary-tree-preorder-traversal/
│   ├── 0144-binary-tree-preorder-traversal.java
│   ├── NOTES.md
│   └── README.md
├── 0149-max-points-on-a-line/
│   ├── 0149-max-points-on-a-line.java
│   ├── NOTES.md
│   └── README.md
├── 0150-evaluate-reverse-polish-notation/
│   ├── 0150-evaluate-reverse-polish-notation.java
│   ├── NOTES.md
│   └── README.md
├── 0151-reverse-words-in-a-string/
│   ├── 0151-reverse-words-in-a-string.java
│   ├── NOTES.md
│   └── README.md
├── 0198-house-robber/
│   ├── 0198-house-robber.java
│   └── README.md
├── 0212-word-search-ii/
│   ├── 0212-word-search-ii.java
│   ├── NOTES.md
│   └── README.md
├── 0219-contains-duplicate-ii/
│   ├── 0219-contains-duplicate-ii.java
│   ├── NOTES.md
│   └── README.md
├── 0222-count-complete-tree-nodes/
│   ├── 0222-count-complete-tree-nodes.java
│   ├── NOTES.md
│   └── README.md
├── 0223-rectangle-area/
│   ├── 0223-rectangle-area.java
│   ├── NOTES.md
│   └── README.md
├── 0224-basic-calculator/
│   ├── 0224-basic-calculator.java
│   ├── NOTES.md
│   └── README.md
├── 0232-implement-queue-using-stacks/
│   ├── 0232-implement-queue-using-stacks.java
│   ├── NOTES.md
│   └── README.md
├── 0236-lowest-common-ancestor-of-a-binary-tree/
│   ├── 0236-lowest-common-ancestor-of-a-binary-tree.java
│   ├── NOTES.md
│   └── README.md
├── 0237-delete-node-in-a-linked-list/
│   ├── 0237-delete-node-in-a-linked-list.java
│   ├── NOTES.md
│   └── README.md
├── 0242-valid-anagram/
│   ├── 0242-valid-anagram.cpp
│   ├── 0242-valid-anagram.java
│   ├── NOTES.md
│   └── README.md
├── 0263-ugly-number/
│   ├── 0263-ugly-number.java
│   ├── NOTES.md
│   └── README.md
├── 0279-perfect-squares/
│   ├── 0279-perfect-squares.java
│   ├── NOTES.md
│   └── README.md
├── 0290-word-pattern/
│   ├── 0290-word-pattern.java
│   └── README.md
├── 0295-find-median-from-data-stream/
│   ├── 0295-find-median-from-data-stream.java
│   ├── NOTES.md
│   └── README.md
├── 0309-best-time-to-buy-and-sell-stock-with-cooldown/
│   ├── 0309-best-time-to-buy-and-sell-stock-with-cooldown.java
│   ├── NOTES.md
│   └── README.md
├── 0328-odd-even-linked-list/
│   ├── 0328-odd-even-linked-list.java
│   ├── NOTES.md
│   └── README.md
├── 0334-increasing-triplet-subsequence/
│   ├── 0334-increasing-triplet-subsequence.java
│   ├── NOTES.md
│   └── README.md
├── 0345-reverse-vowels-of-a-string/
│   ├── 0345-reverse-vowels-of-a-string.java
│   ├── NOTES.md
│   └── README.md
├── 0374-guess-number-higher-or-lower/
│   ├── 0374-guess-number-higher-or-lower.java
│   ├── NOTES.md
│   └── README.md
├── 0380-insert-delete-getrandom-o1/
│   ├── 0380-insert-delete-getrandom-o1.java
│   ├── NOTES.md
│   └── README.md
├── 0409-longest-palindrome/
│   ├── 0409-longest-palindrome.java
│   ├── NOTES.md
│   └── README.md
├── 0446-arithmetic-slices-ii-subsequence/
│   ├── 0446-arithmetic-slices-ii-subsequence.java
│   ├── NOTES.md
│   └── README.md
├── 0451-sort-characters-by-frequency/
│   ├── 0451-sort-characters-by-frequency.java
│   ├── NOTES.md
│   └── README.md
├── 0452-minimum-number-of-arrows-to-burst-balloons/
│   ├── 0452-minimum-number-of-arrows-to-burst-balloons.java
│   ├── NOTES.md
│   └── README.md
├── 0491-non-decreasing-subsequences/
│   ├── 0491-non-decreasing-subsequences.java
│   ├── NOTES.md
│   └── README.md
├── 0520-detect-capital/
│   ├── 0520-detect-capital.java
│   └── NOTES.md
├── 0523-continuous-subarray-sum/
│   ├── 0523-continuous-subarray-sum.java
│   ├── NOTES.md
│   └── README.md
├── 0587-erect-the-fence/
│   ├── 0587-erect-the-fence.java
│   └── README.md
├── 0645-set-mismatch/
│   ├── 0645-set-mismatch.java
│   ├── NOTES.md
│   └── README.md
├── 0692-top-k-frequent-words/
│   ├── 0692-top-k-frequent-words.java
│   ├── NOTES.md
│   └── README.md
├── 0739-daily-temperatures/
│   ├── 0739-daily-temperatures.java
│   └── README.md
├── 0766-toeplitz-matrix/
│   ├── 0766-toeplitz-matrix.java
│   └── README.md
├── 0787-cheapest-flights-within-k-stops/
│   ├── 0787-cheapest-flights-within-k-stops.java
│   ├── NOTES.md
│   └── README.md
├── 0790-domino-and-tromino-tiling/
│   ├── 0790-domino-and-tromino-tiling.java
│   ├── NOTES.md
│   └── README.md
├── 0797-all-paths-from-source-to-target/
│   ├── 0797-all-paths-from-source-to-target.java
│   ├── NOTES.md
│   └── README.md
├── 0834-sum-of-distances-in-tree/
│   ├── 0834-sum-of-distances-in-tree.java
│   ├── NOTES.md
│   └── README.md
├── 0835-image-overlap/
│   ├── 0835-image-overlap.java
│   ├── NOTES.md
│   └── README.md
├── 0841-keys-and-rooms/
│   ├── 0841-keys-and-rooms.java
│   ├── NOTES.md
│   └── README.md
├── 0872-leaf-similar-trees/
│   ├── 0872-leaf-similar-trees.java
│   ├── NOTES.md
│   └── README.md
├── 0876-middle-of-the-linked-list/
│   ├── 0876-middle-of-the-linked-list.java
│   ├── NOTES.md
│   └── README.md
├── 0886-possible-bipartition/
│   ├── 0886-possible-bipartition.java
│   ├── NOTES.md
│   └── README.md
├── 0899-orderly-queue/
│   ├── 0899-orderly-queue.java
│   ├── NOTES.md
│   └── README.md
├── 0901-online-stock-span/
│   ├── 0901-online-stock-span.java
│   ├── NOTES.md
│   └── README.md
├── 0907-sum-of-subarray-minimums/
│   ├── 0907-sum-of-subarray-minimums.java
│   ├── NOTES.md
│   └── README.md
├── 0909-snakes-and-ladders/
│   ├── 0909-snakes-and-ladders.java
│   ├── NOTES.md
│   └── README.md
├── 0918-maximum-sum-circular-subarray/
│   ├── 0918-maximum-sum-circular-subarray.java
│   └── README.md
├── 0926-flip-string-to-monotone-increasing/
│   ├── 0926-flip-string-to-monotone-increasing.java
│   └── NOTES.md
├── 0938-range-sum-of-bst/
│   ├── 0938-range-sum-of-bst.java
│   ├── NOTES.md
│   └── README.md
├── 0944-delete-columns-to-make-sorted/
│   ├── 0944-delete-columns-to-make-sorted.java
│   ├── NOTES.md
│   └── README.md
├── 0947-most-stones-removed-with-same-row-or-column/
│   ├── 0947-most-stones-removed-with-same-row-or-column.java
│   ├── NOTES.md
│   └── README.md
├── 0974-subarray-sums-divisible-by-k/
│   ├── 0974-subarray-sums-divisible-by-k.java
│   ├── NOTES.md
│   └── README.md
├── 0976-largest-perimeter-triangle/
│   ├── 0976-largest-perimeter-triangle.java
│   ├── NOTES.md
│   └── README.md
├── 0980-unique-paths-iii/
│   ├── 0980-unique-paths-iii.java
│   ├── NOTES.md
│   └── README.md
├── 0997-find-the-town-judge/
│   ├── 0997-find-the-town-judge.java
│   ├── NOTES.md
│   └── README.md
├── 1007-minimum-domino-rotations-for-equal-row/
│   ├── 1007-minimum-domino-rotations-for-equal-row.java
│   ├── NOTES.md
│   └── README.md
├── 102-binary-tree-level-order-traversal/
│   ├── 102-binary-tree-level-order-traversal.java
│   ├── 102-binary-tree-level-order-traversal.py
│   ├── NOTES.md
│   └── README.md
├── 1020-number-of-enclaves/
│   └── 1020-number-of-enclaves.cpp
├── 1020. Number of Enclaves.java
├── 1026-maximum-difference-between-node-and-ancestor/
│   ├── 1026-maximum-difference-between-node-and-ancestor.java
│   ├── NOTES.md
│   └── README.md
├── 1029-two-city-scheduling/
│   ├── 1029-two-city-scheduling.java
│   ├── NOTES.md
│   └── README.md
├── 1046-last-stone-weight/
│   ├── 1046-last-stone-weight.java
│   ├── NOTES.md
│   └── README.md
├── 1047-remove-all-adjacent-duplicates-in-string/
│   ├── 1047-remove-all-adjacent-duplicates-in-string.java
│   ├── NOTES.md
│   └── README.md
├── 1048-longest-string-chain/
│   ├── 1048-longest-string-chain.java
│   ├── NOTES.md
│   └── README.md
├── 105-construct-binary-tree-from-preorder-and-inorder-traversal/
│   ├── 105-construct-binary-tree-from-preorder-and-inorder-traversal.java
│   ├── NOTES.md
│   └── README.md
├── 1061-lexicographically-smallest-equivalent-string/
│   ├── 1061-lexicographically-smallest-equivalent-string.java
│   ├── NOTES.md
│   └── README.md
├── 1074-number-of-submatrices-that-sum-to-target/
│   ├── 1074-number-of-submatrices-that-sum-to-target.java
│   └── NOTES.md
├── 108-convert-sorted-array-to-binary-search-tree/
│   ├── 108-convert-sorted-array-to-binary-search-tree.java
│   ├── NOTES.md
│   └── README.md
├── 1081-smallest-subsequence-of-distinct-characters/
│   ├── 1081-smallest-subsequence-of-distinct-characters.java
│   ├── NOTES.md
│   └── README.md
├── 1091-shortest-path-in-binary-matrix/
│   ├── 1091-shortest-path-in-binary-matrix.java
│   ├── NOTES.md
│   └── README.md
├── 11-container-with-most-water/
│   ├── 11-container-with-most-water.java
│   ├── Container_With_Most_Water.cpp
│   ├── NOTES.md
│   └── README.md
├── 112-path-sum/
│   ├── 112-path-sum.java
│   ├── NOTES.md
│   └── README.md
├── 113 Path Sum II med s24.cpp
├── 113-Path-Sum-II.cpp
├── 113-path-sum-ii/
│   ├── 113-path-sum-ii.java
│   ├── 113. Path Sum II.cpp
│   ├── NOTES.md
│   └── README.md
├── 114-flatten-binary-tree-to-linked-list/
│   ├── 114-flatten-binary-tree-to-linked-list.java
│   ├── NOTES.md
│   ├── README.md
│   └── SolutionCode.cpp
├── 1143-longest-common-subsequence/
│   ├── 1143-longest-common-subsequence.java
│   └── README.md
├── 1155-number-of-dice-rolls-with-target-sum/
│   ├── 1155-number-of-dice-rolls-with-target-sum.java
│   ├── NOTES.md
│   └── README.md
├── 117-populating-next-right-pointers-in-each-node-ii/
│   ├── 117-populating-next-right-pointers-in-each-node-ii.java
│   ├── NOTES.md
│   └── README.md
├── 118-pascals-triangle/
│   ├── 118-pascals-triangle.java
│   ├── NOTES.md
│   └── README.md
├── 1192-critical-connections-in-a-network/
│   ├── 1192-critical-connections-in-a-network.java
│   └── README.md
├── 12-integer-to-roman/
│   ├── 12-Leetcode-Integer-to-roman.cpp
│   ├── 12-integer-to-roman.java
│   ├── NOTES.md
│   └── README.md
├── 120-triangle/
│   ├── 120-triangle.java
│   ├── NOTES.md
│   └── README.md
├── 1207-unique-number-of-occurrences/
│   ├── 1207-unique-number-of-occurrences.java
│   ├── NOTES.md
│   └── README.md
├── 1209-remove-all-adjacent-duplicates-in-string-ii/
│   ├── 1209-remove-all-adjacent-duplicates-in-string-ii.java
│   ├── NOTES.md
│   └── README.md
├── 1220-count-vowels-permutation/
│   ├── 1220-count-vowels-permutation.java
│   ├── NOTES.md
│   └── README.md
├── 1235-maximum-profit-in-job-scheduling/
│   ├── 1235-maximum-profit-in-job-scheduling.java
│   ├── NOTES.md
│   └── README.md
├── 1239-maximum-length-of-a-concatenated-string-with-unique-characters/
│   ├── 1239-maximum-length-of-a-concatenated-string-with-unique-characters.java
│   ├── NOTES.md
│   └── README.md
├── 126-word-ladder-ii/
│   ├── 126-word-ladder-ii.java
│   ├── NOTES.md
│   └── README.md
├── 1260-shift-2d-grid/
│   ├── 1260-shift-2d-grid.java
│   ├── NOTES.md
│   └── README.md
├── 1268-search-suggestions-system/
│   ├── 1268-search-suggestions-system.java
│   ├── NOTES.md
│   └── README.md
├── 128-longest-consecutive-sequence/
│   ├── 128-longest-consecutive-sequence.java
│   ├── NOTES.md
│   └── README.md
├── 1293-shortest-path-in-a-grid-with-obstacles-elimination/
│   ├── 1293-shortest-path-in-a-grid-with-obstacles-elimination.java
│   ├── NOTES.md
│   └── README.md
├── 13-roman-to-integer/
│   ├── 13-roman-to-integer.cpp
│   ├── 13-roman-to-integer.java
│   ├── NOTES.md
│   └── README.md
├── 1302-deepest-leaves-sum/
│   ├── 1302-deepest-leaves-sum.java
│   ├── NOTES.md
│   └── README.md
├── 1323-maximum-69-number/
│   ├── 1323-maximum-69-number.java
│   ├── NOTES.md
│   └── README.md
├── 1328-break-a-palindrome/
│   ├── 1328-break-a-palindrome.java
│   ├── NOTES.md
│   └── README.md
├── 1329-sort-the-matrix-diagonally/
│   ├── 1329-sort-the-matrix-diagonally.cpp
│   ├── 1329-sort-the-matrix-diagonally.java
│   ├── NOTES.md
│   ├── README.md
│   └── SolutionCode.cpp
├── 1332-remove-palindromic-subsequences/
│   ├── 1332-remove-palindromic-subsequences.java
│   └── README.md
├── 1335-minimum-difficulty-of-a-job-schedule/
│   ├── 1335-minimum-difficulty-of-a-job-schedule.java
│   ├── NOTES.md
│   └── README.md
├── 1337-the-k-weakest-rows-in-a-matrix/
│   ├── 1337-the-k-weakest-rows-in-a-matrix.java
│   ├── NOTES.md
│   └── README.md
├── 1338-reduce-array-size-to-the-half/
│   ├── 1338-reduce-array-size-to-the-half.cpp
│   ├── 1338-reduce-array-size-to-the-half.java
│   └── README.md
├── 1339-maximum-product-of-splitted-binary-tree/
│   ├── 1339-maximum-product-of-splitted-binary-tree.java
│   ├── NOTES.md
│   └── README.md
├── 1342-number-of-steps-to-reduce-a-number-to-zero/
│   ├── 1342-number-of-steps-to-reduce-a-number-to-zero.java
│   ├── NOTES.md
│   └── README.md
├── 135-candy/
│   ├── 135-candy.java
│   ├── NOTES.md
│   └── README.md
├── 1354-construct-target-array-with-multiple-sums/
│   ├── 1354-construct-target-array-with-multiple-sums.java
│   ├── 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.java
│   └── README.md
├── 1381. Design a Stack With Increment Operation/
│   └── 1381-Design-a-Stack-With-Increment-Operation.cpp
├── 1383 Maximum Performance of a Team lc hard.cpp
├── 1383-maximum-performance-of-a-team/
│   ├── 1383-maximum-performance-of-a-team.java
│   └── README.md
├── 1396-design-underground-system/
│   ├── 1396-design-underground-system.java
│   ├── NOTES.md
│   └── README.md
├── 14. Longest Common Prefix.py
├── 1423-maximum-points-you-can-obtain-from-cards/
│   ├── 1423-maximum-points-you-can-obtain-from-cards.java
│   ├── NOTES.md
│   └── README.md
├── 143-Reorder List.java
├── 1443-minimum-time-to-collect-all-apples-in-a-tree/
│   ├── 1443-minimum-time-to-collect-all-apples-in-a-tree.java
│   └── README.md
├── 1448-count-good-nodes-in-binary-tree/
│   ├── 1448-count-good-nodes-in-binary-tree.java
│   ├── NOTES.md
│   └── README.md
├── 1457 Pseudo-Palindromic Paths in a Binary Tree lc.cpp
├── 1457-pseudo-palindromic-paths-in-a-binary-tree/
│   ├── 1457-pseudo-palindromic-paths-in-a-binary-tree.java
│   └── 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.java
│   ├── 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.java
│   ├── NOTES.md
│   └── README.md
├── 1473-paint-house-iii/
│   ├── 1473-paint-house-iii.java
│   ├── NOTES.md
│   └── README.md
├── 1480-running-sum-of-1d-array/
│   ├── 1480-running-sum-of-1d-array.java
│   ├── NOTES.md
│   └── README.md
├── 15. 3Sum/
│   └── SolutionCode.cpp
├── 151. Reverse Words in a String.java
├── 1519-number-of-nodes-in-the-sub-tree-with-the-same-label/
│   ├── 1519-number-of-nodes-in-the-sub-tree-with-the-same-label.java
│   ├── NOTES.md
│   └── README.md
├── 1531-string-compression-ii/
│   ├── 1531-string-compression-ii.java
│   ├── NOTES.md
│   └── README.md
├── 1544-make-the-string-great/
│   ├── 1544-make-the-string-great.java
│   ├── NOTES.md
│   └── README.md
├── 1578-minimum-time-to-make-rope-colorful/
│   ├── 1578-minimum-time-to-make-rope-colorful.java
│   ├── NOTES.md
│   └── README.md
├── 1584-min-cost-to-connect-all-points/
│   ├── 1584-min-cost-to-connect-all-points.java
│   ├── NOTES.md
│   └── README.md
├── 16-3sum-closest/
│   ├── 16-3sum-closest.java
│   ├── NOTES.md
│   └── README.md
├── 16. 3Sum Closest - leetcode/
│   └── SolutionCode.cpp
├── 160-intersection-of-two-linked-lists/
│   ├── 160-intersection-of-two-linked-lists.java
│   ├── NOTES.md
│   └── README.md
├── 1631-path-with-minimum-effort/
│   ├── 1631-path-with-minimum-effort.java
│   ├── NOTES.md
│   └── README.md
├── 1641-count-sorted-vowel-strings/
│   ├── 1641-count-sorted-vowel-strings.java
│   ├── NOTES.md
│   └── README.md
├── 1642-furthest-building-you-can-reach/
│   ├── 1642-furthest-building-you-can-reach.java
│   ├── NOTES.md
│   └── README.md
├── 1647-minimum-deletions-to-make-character-frequencies-unique/
│   ├── 1647-minimum-deletions-to-make-character-frequencies-unique.java
│   ├── NOTES.md
│   └── README.md
├── 1657-determine-if-two-strings-are-close/
│   ├── 1657-determine-if-two-strings-are-close.java
│   ├── NOTES.md
│   └── README.md
├── 1658-minimum-operations-to-reduce-x-to-zero/
│   ├── 1658-minimum-operations-to-reduce-x-to-zero.java
│   ├── NOTES.md
│   └── README.md
├── 1662-check-if-two-string-arrays-are-equivalent/
│   ├── 1662-check-if-two-string-arrays-are-equivalent.java
│   ├── NOTES.md
│   └── README.md
├── 1663-smallest-string-with-a-given-numeric-value/
│   ├── 1663-smallest-string-with-a-given-numeric-value.java
│   ├── NOTES.md
│   └── README.md
├── 167-two-sum-ii-input-array-is-sorted/
│   ├── 167-two-sum-ii-input-array-is-sorted.java
│   ├── NOTES.md
│   └── README.md
├── 1679-max-number-of-k-sum-pairs/
│   ├── 1679-max-number-of-k-sum-pairs.java
│   └── NOTES.md
├── 1680 Concatenation of Consecutive Binary Numbers med s23.cpp
├── 1680-concatenation-of-consecutive-binary-numbers/
│   ├── 1680-concatenation-of-consecutive-binary-numbers.java
│   └── README.md
├── 1689-partitioning-into-minimum-number-of-deci-binary-numbers/
│   ├── 1689-partitioning-into-minimum-number-of-deci-binary-numbers.java
│   ├── NOTES.md
│   └── README.md
├── 1695-maximum-erasure-value/
│   ├── 1695-maximum-erasure-value.java
│   ├── NOTES.md
│   └── README.md
├── 1696-jump-game-vi/
│   ├── 1696-jump-game-vi.java
│   ├── NOTES.md
│   └── README.md
├── 17-letter-combinations-of-a-phone-number/
│   ├── 17-letter-combinations-of-a-phone-number.java
│   ├── NOTES.md
│   └── README.md
├── 1704-determine-if-string-halves-are-alike/
│   ├── 1704-determine-if-string-halves-are-alike.java
│   ├── NOTES.md
│   └── README.md
├── 1706-where-will-the-ball-fall/
│   ├── 1706-where-will-the-ball-fall.java
│   ├── NOTES.md
│   └── README.md
├── 1710-maximum-units-on-a-truck/
│   ├── 1710-maximum-units-on-a-truck.java
│   ├── NOTES.md
│   └── README.md
├── 1721-swapping-nodes-in-a-linked-list/
│   ├── 1721-swapping-nodes-in-a-linked-list.java
│   └── README.md
├── 173-binary-search-tree-iterator/
│   ├── 173-binary-search-tree-iterator.java
│   ├── NOTES.md
│   └── binary-search-tree-iterator.cpp
├── 1742. Maximum Number of Balls in a Box(leetcode)
├── 1770 Maximum Score from Performing Multiplication Operations lc.cpp
├── 1770-maximum-score-from-performing-multiplication-operations/
│   ├── 1770-maximum-score-from-performing-multiplication-operations.java
│   ├── NOTES.md
│   └── README.md
├── 179-Largest Number.java
├── 1791. Find Center of Star Graph.java
├── 1832-check-if-the-sentence-is-pangram/
│   ├── 1832-check-if-the-sentence-is-pangram.java
│   ├── NOTES.md
│   └── README.md
├── 1833-maximum-ice-cream-bars/
│   ├── 1833-maximum-ice-cream-bars.java
│   ├── NOTES.md
│   └── README.md
├── 1834-single-threaded-cpu/
│   ├── 1834-single-threaded-cpu.java
│   ├── NOTES.md
│   └── README.md
├── 188-best-time-to-buy-and-sell-stock-iv/
│   ├── 188-best-time-to-buy-and-sell-stock-iv.java
│   ├── NOTES.md
│   └── README.md
├── 188. Best Time to Buy and Sell Stock IV.cpp
├── 19-remove-nth-node-from-end-of-list/
│   ├── 19-remove-nth-node-from-end-of-list.java
│   ├── NOTES.md
│   └── README.md
├── 191-number-of-1-bits/
│   ├── 191-number-of-1-bits.java
│   ├── NOTES.md
│   └── README.md
├── 1926-nearest-exit-from-entrance-in-maze/
│   ├── 1926-nearest-exit-from-entrance-in-maze.java
│   ├── NOTES.md
│   └── README.md
├── 1962-remove-stones-to-minimize-the-total/
│   ├── 1962-remove-stones-to-minimize-the-total.java
│   ├── NOTES.md
│   └── README.md
├── 1971-find-if-path-exists-in-graph/
│   ├── 1971-find-if-path-exists-in-graph.java
│   └── README.md
├── 199-binary-tree-right-side-view/
│   ├── 199-binary-tree-right-side-view.java
│   ├── NOTES.md
│   └── README.md
├── 1991-find-the-middle-index-in-array/
│   ├── 1991-find-the-middle-index-in-array.java
│   ├── NOTES.md
│   └── README.md
├── 1996-the-number-of-weak-characters-in-the-game/
│   ├── 1996-the-number-of-weak-characters-in-the-game.cpp
│   ├── 1996-the-number-of-weak-characters-in-the-game.java
│   ├── NOTES.md
│   └── README.md
├── 200-number-of-islands/
│   ├── 200-number-of-islands.java
│   ├── NOTES.md
│   └── README.md
├── 2007 Find Original Array From Doubled Array lc.cpp
├── 2007-find-original-array-from-doubled-array/
│   ├── 2007-find-original-array-from-doubled-array.java
│   ├── NOTES.md
│   └── README.md
├── 2095-delete-the-middle-node-of-a-linked-list/
│   ├── 2095-delete-the-middle-node-of-a-linked-list.java
│   └── NOTES.md
├── 2131-longest-palindrome-by-concatenating-two-letter-words/
│   ├── 2131-longest-palindrome-by-concatenating-two-letter-words.java
│   └── README.md
├── 2136-earliest-possible-day-of-full-bloom/
│   ├── 2136-earliest-possible-day-of-full-bloom.java
│   └── NOTES.md
├── 215-kth-largest-element-in-an-array/
│   ├── 215-kth-largest-element-in-an-array.java
│   └── NOTES.md
├── 216-combination-sum-iii/
│   ├── 216-combination-sum-iii.java
│   ├── NOTES.md
│   └── README.md
├── 218-the-skyline-problem/
│   ├── 218-the-skyline-problem.java
│   ├── NOTES.md
│   └── README.md
├── 2225-find-players-with-zero-or-one-losses/
│   ├── 2225-find-players-with-zero-or-one-losses.java
│   ├── NOTES.md
│   └── README.md
├── 2244-minimum-rounds-to-complete-all-tasks/
│   ├── 2244-minimum-rounds-to-complete-all-tasks.java
│   ├── NOTES.md
│   └── README.md
├── 2246-longest-path-with-different-adjacent-characters/
│   ├── 2246-longest-path-with-different-adjacent-characters.java
│   ├── NOTES.md
│   └── README.md
├── 225-implement-stack-using-queues/
│   ├── 225-implement-stack-using-queues.java
│   └── NOTES.md
├── 2256-minimum-average-difference/
│   ├── 2256-minimum-average-difference.java
│   ├── NOTES.md
│   └── README.md
├── 2279-maximum-bags-with-full-capacity-of-rocks/
│   ├── 2279-maximum-bags-with-full-capacity-of-rocks.java
│   ├── 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.java
│   └── NOTES.md
├── 234-palindrome-linked-list/
│   ├── 234-palindrome-linked-list.java
│   ├── 234-palindrome-linked-list.py
│   ├── NOTES.md
│   ├── README.md
│   └── palindrome-linked-list.cpp
├── 234. Palindrome Linked List/
│   └── SolutionCode.cpp
├── 235-lowest-common-ancestor-of-a-binary-search-tree/
│   ├── 235-lowest-common-ancestor-of-a-binary-search-tree.java
│   ├── 235-lowest-common-ancestor-of-a-binary-search-tree.py
│   ├── NOTES.md
│   └── README.md
├── 2359-find-closest-node-to-given-two-nodes/
│   ├── NOTES.md
│   └── README.md
├── 236-lowest-common-ancestor-of-a-binary-tree/
│   ├── 236-lowest-common-ancestor-of-a-binary-tree.java
│   └── NOTES.md
├── 237-delete-node-in-a-linked-list/
│   ├── 237-delete-node-in-a-linked-list.java
│   └── NOTES.md
├── 2389-longest-subsequence-with-limited-sum/
│   ├── 2389-longest-subsequence-with-limited-sum.java
│   ├── NOTES.md
│   └── README.md
├── 2389_longest_subsequence_with_limited_sum.cpp
├── 2390_removing_stars_from_a_string.cpp
├── 2395_Find_Subarrays_With_Equal_Sum.cpp
├── 240-search-a-2d-matrix-ii/
│   ├── 240-search-a-2d-matrix-ii.java
│   ├── NOTES.md
│   └── README.md
├── 242-valid-anagram/
│   ├── 242-valid-anagram.java
│   ├── NOTES.md
│   └── README.md
├── 2421-number-of-good-paths/
│   ├── 2421-number-of-good-paths.java
│   └── NOTES.md
├── 2429-minimize-xor/
│   ├── 2429-minimize-xor.cpp
│   ├── Notes.md
│   └── Readme.md
├── 2453-destroy-sequential-targets/
│   ├── 2453-destroy-sequential-targets.java
│   └── NOTES.md
├── 268-missing-number/
│   ├── 268-missing-number.java
│   ├── NOTES.md
│   └── README.md
├── 284-peeking-iterator/
│   ├── 284-peeking-iterator.java
│   └── README.md
├── 287-find-the-duplicate-number/
│   ├── 287-find-the-duplicate-number.java
│   ├── NOTES.md
│   └── README.md
├── 289-game-of-life/
│   ├── 289-game-of-life.java
│   ├── NOTES.md
│   └── README.md
├── 29-divide-two-integers/
│   ├── 29-divide-two-integers.java
│   └── NOTES.md
├── 3-longest-substring-without-repeating-characters/
│   ├── 3-longest-substring-without-repeating-characters.java
│   ├── NOTES.md
│   └── README.md
├── 30-substring-with-concatenation-of-all-words/
│   ├── 30-substring-with-concatenation-of-all-words.java
│   ├── 30-substring-with-concatenation-of-all-words.py
│   ├── NOTES.md
│   └── README.md
├── 300-longest-increasing-subsequence/
│   ├── 300-longest-increasing-subsequence.java
│   ├── NOTES.md
│   └── README.md
├── 304-range-sum-query-2d-immutable/
│   ├── 304-range-sum-query-2d-immutable.java
│   ├── NOTES.md
│   └── README.md
├── 307-range-sum-query-mutable/
│   ├── 307-range-sum-query-mutable.java
│   ├── NOTES.md
│   └── README.md
├── 31-next-permutation/
│   ├── 31-next-permutation.java
│   ├── NOTES.md
│   ├── README.md
│   └── nextPurmutation.cpp
├── 315-count-of-smaller-numbers-after-self/
│   ├── 315-count-of-smaller-numbers-after-self.java
│   ├── NOTES.md
│   └── README.md
├── 316-remove-duplicate-letters/
│   ├── 316-remove-duplicate-letters.java
│   ├── NOTES.md
│   └── README.md
├── 318-maximum-product-of-word-lengths/
│   ├── 318-maximum-product-of-word-lengths.java
│   ├── NOTES.md
│   └── README.md
├── 32-longest-valid-parentheses/
│   ├── 32-longest-valid-parentheses.java
│   ├── NOTES.md
│   └── README.md
├── 322-coin-change/
│   ├── 322-coin-change.java
│   ├── NOTES.md
│   └── README.md
├── 326-power-of-three/
│   ├── 326-power-of-three.java
│   ├── 326_Power_of_three.cpp
│   ├── NOTES.md
│   └── README.md
├── 329-longest-increasing-path-in-a-matrix/
│   ├── 329-longest-increasing-path-in-a-matrix.java
│   └── README.md
├── 33-search-in-rotated-sorted-array/
│   ├── 33-search-in-rotated-sorted-array.java
│   └── README.md
├── 336-palindrome-pairs/
│   ├── 336-palindrome-pairs.java
│   ├── 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.java
│   └── README.md
├── 341-flatten-nested-list-iterator/
│   ├── 341-flatten-nested-list-iterator.java
│   ├── NOTES.md
│   └── README.md
├── 342-power-of-four/
│   ├── 342-power-of-four.java
│   ├── NOTES.md
│   ├── README.md
│   └── power of four.cpp
├── 344-reverse-string/
│   ├── 344-reverse-string.java
│   ├── NOTES.md
│   └── README.md
├── 347-top-k-frequent-elements/
│   ├── 347-top-k-frequent-elements.cpp
│   ├── 347-top-k-frequent-elements.java
│   ├── NOTES.md
│   └── README.md
├── 354-russian-doll-envelopes/
│   ├── 354-russian-doll-envelopes.java
│   ├── NOTES.md
│   └── README.md
├── 363-max-sum-of-rectangle-no-larger-than-k/
│   ├── 363-max-sum-of-rectangle-no-larger-than-k.cpp
│   ├── 363-max-sum-of-rectangle-no-larger-than-k.java
│   ├── NOTES.md
│   └── README.md
├── 37-Sudoku-solver/
│   ├── 37-Sudoku-solver.js
│   └── README.md
├── 371-sum-of-two-integers/
│   ├── 371-sum-of-two-integers.java
│   ├── NOTES.md
│   └── README.md
├── 376-wiggle-subsequence/
│   ├── 376-wiggle-subsequence.java
│   ├── NOTES.md
│   └── README.md
├── 377-combination-sum-iv/
│   ├── 377-combination-sum-iv.java
│   ├── NOTES.md
│   └── README.md
├── 378-kth-smallest-element-in-a-sorted-matrix/
│   ├── 378-kth-smallest-element-in-a-sorted-matrix.java
│   └── NOTES.md
├── 383-ransom-note/
│   ├── 383-ransom-note.java
│   ├── NOTES.md
│   ├── README.md
│   ├── ransom-note.cpp
│   └── ransome-note-two-approaches.cpp
├── 387-first-unique-character-in-a-string/
│   ├── 387-first-unique-character-in-a-string.java
│   ├── NOTES.md
│   ├── README.md
│   └── first-unique-character-in-a-string.CPP
├── 393-utf-8-validation/
│   ├── 393-utf-8-validation.java
│   ├── NOTES.md
│   └── README.md
├── 399-evaluate-division/
│   ├── 399-evaluate-division.java
│   ├── NOTES.md
│   └── README.md
├── 4-median-of-two-sorted-arrays/
│   ├── 4-median-of-two-sorted-arrays.java
│   └── NOTES.md
├── 406-queue-reconstruction-by-height/
│   ├── 406-queue-reconstruction-by-height.java
│   ├── NOTES.md
│   └── README.md
├── 410-split-array-largest-sum/
│   ├── 410-split-array-largest-sum.java
│   ├── NOTES.md
│   └── README.md
├── 417-pacific-atlantic-water-flow/
│   ├── 417-pacific-atlantic-water-flow.java
│   ├── NOTES.md
│   └── README.md
├── 417_Pacific Atlantic Water Flow.cpp
├── 42 Trapping Rain Water hd s18.cpp
├── 42-trapping-rain-water/
│   ├── 42-trapping-rain-water.java
│   ├── NOTES.md
│   └── README.md
├── 429-n-ary-tree-level-order-traversal/
│   ├── 429-n-ary-tree-level-order-traversal.cpp
│   ├── 429-n-ary-tree-level-order-traversal.java
│   ├── NOTES.md
│   └── README.md
├── 456-132-pattern/
│   ├── 456-132-pattern.java
│   ├── NOTES.md
│   └── README.md
├── 458-poor-pigs/
│   ├── 458-poor-pigs.java
│   ├── NOTES.md
│   └── README.md
├── 462-minimum-moves-to-equal-array-elements-ii/
│   ├── 462-minimum-moves-to-equal-array-elements-ii.java
│   ├── NOTES.md
│   └── README.md
├── 47-permutations-ii/
│   ├── 47-permutations-ii.java
│   ├── NOTES.md
│   └── README.md
├── 473-matchsticks-to-square/
│   ├── 473-matchsticks-to-square.java
│   ├── NOTES.md
│   └── README.md
├── 474-ones-and-zeroes/
│   ├── 474-ones-and-zeroes.java
│   ├── NOTES.md
│   └── README.md
├── 48-rotate-image/
│   ├── 48-Rotate-Image.cpp
│   ├── 48-rotate-image.java
│   ├── NOTES.md
│   └── README.md
├── 5-longest-palindromic-substring/
│   ├── 5-longest-palindromic-substring.java
│   ├── NOTES.md
│   └── README.md
├── 50-powx-n/
│   ├── 50-powx-n.java
│   ├── NOTES.md
│   └── README.md
├── 509-fibonacci-number/
│   ├── 509-fibonacci-number.java
│   ├── NOTES.md
│   └── README.md
├── 51-n-queens/
│   ├── 51-n-queens.java
│   ├── NOTES.md
│   └── README.md
├── 52-n-queens-ii/
│   ├── 52-n-queens-ii.java
│   ├── NOTES.md
│   └── README.md
├── 53-maximum-subarray/
│   ├── 53-maximum-subarray.java
│   ├── Maximum Subarray.py
│   ├── NOTES.md
│   └── README.md
├── 535-encode-and-decode-tinyurl/
│   ├── 535-encode-and-decode-tinyurl.java
│   ├── NOTES.md
│   └── README.md
├── 538-convert-bst-to-greater-tree/
│   ├── 538-convert-bst-to-greater-tree.java
│   ├── NOTES.md
│   └── README.md
├── 541-reverse-string-ii/
│   ├── 541-reverse-string-ii.java
│   ├── NOTES.md
│   └── README.md
├── 557 Reverse Words in a String III easy lc s22.cpp
├── 557-reverse-words-in-a-string-iii/
│   ├── 557-reverse-words-in-a-string-iii.java
│   └── NOTES.md
├── 560. Subarray Sum Equals K/
│   └── 560. Subarray Sum Equals K.cpp
├── 576-out-of-boundary-paths/
│   ├── 576-out-of-boundary-paths.java
│   ├── NOTES.md
│   └── README.md
├── 581-shortest-unsorted-continuous-subarray/
│   ├── 581-shortest-unsorted-continuous-subarray.java
│   ├── NOTES.md
│   └── README.md
├── 583-delete-operation-for-two-strings/
│   ├── 583-delete-operation-for-two-strings.java
│   ├── NOTES.md
│   └── README.md
├── 59-spiral-matrix-ii/
│   ├── 59-spiral-matrix-ii.java
│   ├── NOTES.md
│   └── README.md
├── 6-zigzag-conversion/
│   ├── 6-zigzag-conversion.java
│   ├── NOTES.md
│   └── README.md
├── 606-construct-string-from-binary-tree/
│   ├── 606-construct-string-from-binary-tree.java
│   ├── NOTES.md
│   └── README.md
├── 609 Find Duplicate File in System lc med s19.cpp
├── 609-find-duplicate-file-in-system/
│   ├── 609-find-duplicate-file-in-system.java
│   ├── NOTES.md
│   └── README.md
├── 62-unique-paths/
│   ├── 62-unique-paths.java
│   ├── NOTES.md
│   └── README.md
├── 622-design-circular-queue/
│   ├── 622-design-circular-queue.java
│   ├── NOTES.md
│   └── README.md
├── 623-add-one-row-to-tree/
│   ├── 623-add-one-row-to-tree.java
│   ├── NOTES.md
│   └── README.md
├── 629-k-inverse-pairs-array/
│   ├── 629-k-inverse-pairs-array.java
│   ├── NOTES.md
│   └── README.md
├── 63-unique-paths-ii/
│   ├── 63-unique-paths-ii.java
│   ├── NOTES.md
│   └── README.md
├── 630-course-schedule-iii/
│   ├── 630-course-schedule-iii.java
│   └── README.md
├── 637-average-of-levels-in-binary-tree/
│   ├── 637-average-of-levels-in-binary-tree.cpp
│   ├── 637-average-of-levels-in-binary-tree.java
│   └── README.md
├── 637-average-of-levels-in-binary-tree.py
├── 647-palindromic-substrings/
│   ├── 647-palindromic-substrings.java
│   └── NOTES.md
├── 653-two-sum-iv-input-is-a-bst/
│   ├── 653-two-sum-iv-input-is-a-bst.java
│   ├── NOTES.md
│   └── README.md
├── 658-find-k-closest-elements/
│   ├── 658-find-k-closest-elements.java
│   └── README.md
├── 659-split-array-into-consecutive-subsequences/
│   ├── 659-split-array-into-consecutive-subsequences.cpp
│   ├── 659-split-array-into-consecutive-subsequences.java
│   ├── NOTES.md
│   └── README.md
├── 665-non-decreasing-array/
│   ├── 665-non-decreasing-array.java
│   ├── NOTES.md
│   └── README.md
├── 669-trim-a-binary-search-tree/
│   ├── 669-trim-a-binary-search-tree.java
│   ├── NOTES.md
│   └── README.md
├── 680-valid-palindrome-ii/
│   ├── 680-valid-palindrome-ii.java
│   ├── NOTES.md
│   └── README.md
├── 682-baseball-game/
│   ├── 682-baseball-game.java
│   ├── NOTES.md
│   └── README.md
├── 695-max-area-of-island/
│   ├── 695-max-area-of-island.java
│   ├── NOTES.md
│   ├── README.md
│   └── SolutionCode.cpp
├── 698-partition-to-k-equal-sum-subsets/
│   ├── 698-partition-to-k-equal-sum-subsets.java
│   └── README.md
├── 7 Segment Display.java
├── 70-climbing-stairs/
│   ├── 70-climbing-stairs.java
│   ├── NOTES.md
│   └── README.md
├── 700-search-in-a-binary-search-tree/
│   ├── 700-search-in-a-binary-search-tree.java
│   ├── NOTES.md
│   └── README.md
├── 703-kth-largest-element-in-a-stream/
│   ├── 703-kth-largest-element-in-a-stream.py
│   └── NOTES.md
├── 704-binary-search/
│   ├── 704-binary-search.java
│   ├── NOTES.md
│   └── README.md
├── 705-design-hashset/
│   ├── 705-design-hashset.java
│   ├── NOTES.md
│   └── README.md
├── 706-design-hashmap/
│   ├── 706-design-hashmap.java
│   ├── NOTES.md
│   └── README.md
├── 713_Subarray_Product_Less_Than_K.cpp
├── 718-Maximum-Length-of-Repeated-Subarray.cpp
├── 718-maximum-length-of-repeated-subarray/
│   ├── 718-maximum-length-of-repeated-subarray.java
│   ├── NOTES.md
│   ├── README.md
│   └── Solved Using DP.java
├── 718. Maximum Length of Repeated Subarray/
│   └── 718. Maximum Length of Repeated Subarray.cpp
├── 718. Maximum Length of Repeated Subarray lc med s20.cpp
├── 724-find-pivot-index/
│   ├── 724-find-pivot-index.java
│   ├── NOTES.md
│   └── README.md
├── 729-my-calendar-i/
│   ├── 729-my-calendar-i.java
│   ├── NOTES.md
│   └── README.md
├── 732-my-calendar-iii/
│   ├── 732-my-calendar-iii.java
│   ├── NOTES.md
│   └── README.md
├── 74-search-a-2d-matrix/
│   ├── 74-search-a-2d-matrix.java
│   ├── NOTES.md
│   └── README.md
├── 743-network-delay-time/
│   ├── 743-network-delay-time.java
│   ├── NOTES.md
│   └── README.md
├── 745-prefix-and-suffix-search/
│   ├── 745-prefix-and-suffix-search.java
│   ├── NOTES.md
│   └── README.md
├── 746-min-cost-climbing-stairs/
│   ├── 746-min-cost-climbing-stairs.java
│   ├── NOTES.md
│   └── README.md
├── 76-minimum-window-substring/
│   ├── 76-minimum-window-substring.java
│   ├── NOTES.md
│   └── README.md
├── 763-partition-labels/
│   ├── 763-partition-labels.java
│   ├── NOTES.md
│   └── README.md
├── 785-is-graph-bipartite/
│   ├── 785-is-graph-bipartite.java
│   ├── NOTES.md
│   └── README.md
├── 791-Custom-Sort-String-Leetcode.cpp
├── 792-number-of-matching-subsequences/
│   ├── 792-number-of-matching-subsequences.java
│   ├── NOTES.md
│   └── README.md
├── 802. Find Eventual Safe States.java
├── 804-unique-morse-code-words/
│   ├── 804-unique-morse-code-words.java
│   ├── NOTES.md
│   ├── README.md
│   └── unique-morse-code.cpp
├── 81-search-in-rotated-sorted-array-ii/
│   ├── 81-search-in-rotated-sorted-array-ii.java
│   ├── NOTES.md
│   └── README.md
├── 814-binary-tree-pruning/
│   ├── 814-binary-tree-pruning.java
│   └── README.md
├── 82-remove-duplicates-from-sorted-list-ii/
│   ├── 82-remove-duplicates-from-sorted-list-ii.java
│   ├── NOTES.md
│   └── README.md
├── 820-short-encoding-of-words/
│   ├── 820-short-encoding-of-words.java
│   ├── NOTES.md
│   └── README.md
├── 823-binary-trees-with-factors/
│   ├── 823-binary-trees-with-factors.java
│   ├── NOTES.md
│   └── README.md
├── 838-push-dominoes/
│   ├── 838-push-dominoes.java
│   ├── NOTES.md
│   └── README.md
├── 844-backspace-string-compare/
│   ├── 844-backspace-string-compare.java
│   ├── NOTES.md
│   └── README.md
├── 845_Longest_Mountain_in_Array.cpp
├── 856-score-of-parentheses/
│   ├── 856-score-of-parentheses.java
│   ├── NOTES.md
│   └── README.md
├── 86-partition-list/
│   ├── 86-partition-list.java
│   ├── NOTES.md
│   └── README.md
├── 867-transpose-matrix/
│   ├── 867-transpose-matrix.java
│   └── README.md
├── 869-Reordered-Power-of-2/
│   └── 869-Reordered-Power-of-2.cpp
├── 871-minimum-number-of-refueling-stops/
│   ├── 871-minimum-number-of-refueling-stops.java
│   ├── Minimum-Number-of-Refueling-Stops.cpp
│   ├── NOTES.md
│   └── README.md
├── 871. Minimum Number of Refueling Stops.cpp
├── 876-middle-of-the-linked-list/
│   ├── 876-middle-of-the-linked-list.java
│   ├── NOTES.md
│   └── README.md
├── 88-merge-sorted-array/
│   ├── 88-merge-sorted-array.java
│   ├── NOTES.md
│   └── README.md
├── 881-boats-to-save-people/
│   ├── 881-boats-to-save-people.java
│   ├── NOTES.md
│   └── README.md
├── 890-find-and-replace-pattern/
│   ├── 890-find-and-replace-pattern.java
│   ├── NOTES.md
│   └── README.md
├── 895-maximum-frequency-stack/
│   ├── 895-maximum-frequency-stack.java
│   ├── NOTES.md
│   └── README.md
├── 897-increasing-order-search-tree/
│   ├── 897-increasing-order-search-tree.java
│   ├── NOTES.md
│   └── README.md
├── 905-sort-array-by-parity/
│   ├── 905-sort-array-by-parity.java
│   ├── NOTES.md
│   └── README.md
├── 91-decode-ways/
│   ├── 91-decode-ways.java
│   ├── NOTES.md
│   └── README.md
├── 916-word-subsets/
│   ├── 916-word-subsets.java
│   ├── NOTES.md
│   └── README.md
├── 92-reverse-linked-list-ii/
│   ├── 92-reverse-linked-list-ii.java
│   ├── NOTES.md
│   └── README.md
├── 923-3sum-with-multiplicity/
│   ├── 923-3sum-with-multiplicity.java
│   ├── NOTES.md
│   └── README.md
├── 936-stamping-the-sequence/
│   ├── 936-stamping-the-sequence.java
│   ├── NOTES.md
│   ├── README.md
│   ├── Stamping The Sequence.cpp
│   └── stamping-the-sequence.cpp
├── 94-binary-tree-inorder-traversal/
│   ├── 94-binary-tree-inorder-traversal.java
│   ├── Binary Tree InOrder Traversal lc.cpp
│   ├── NOTES.md
│   └── README.md
├── 94. Binary Tree Inorder Traversal.cpp
├── 948 Bag of Tokens lc med.cpp
├── 948-bag-of-tokens/
│   ├── 948-bag-of-tokens.java
│   ├── NOTES.md
│   └── README.md
├── 96-Unique Binary Search Trees.java
├── 967-numbers-with-same-consecutive-differences/
│   ├── 967-numbers-with-same-consecutive-differences.java
│   ├── NOTES.md
│   └── README.md
├── 968-binary-tree-cameras/
│   ├── 968-binary-tree-cameras.java
│   ├── NOTES.md
│   └── README.md
├── 97-interleaving-string/
│   ├── 97-interleaving-string.java
│   ├── NOTES.md
│   └── README.md
├── 98-validate-binary-search-tree/
│   ├── 98-validate-binary-search-tree.java
│   ├── NOTES.md
│   └── README.md
├── 981-time-based-key-value-store/
│   ├── 981-time-based-key-value-store.java
│   ├── NOTES.md
│   └── README.md
├── 985 Sum of Even Numbers After Queries lc med.cpp
├── 985-sum-of-even-numbers-after-queries/
│   ├── 985-sum-of-even-numbers-after-queries.java
│   ├── NOTES.md
│   └── README.md
├── 987-vertical-order-traversal-of-a-binary-tree/
│   ├── 987-vertical-order-traversal-of-a-binary-tree.java
│   ├── NOTES.md
│   └── README.md
├── 99-recover-binary-search-tree/
│   ├── 99-recover-binary-search-tree.java
│   └── README.md
├── 990-satisfiability-of-equality-equations/
│   ├── 990-satisfiability-of-equality-equations.java
│   ├── NOTES.md
│   └── README.md
├── 991-broken-calculator/
│   ├── 991-broken-calculator.java
│   ├── NOTES.md
│   └── README.md
├── Add 1 to linked list.java
├── Add Binary Strings.java
├── Add Digits.java
├── Add One To Array.java
├── Add Two Numbers.java
├── Add all greater values to every node in a BST.java
├── Add binary.java
├── Adding Array Elements.java
├── Adventure in a Maze - GFG/
│   ├── README.md
│   └── adventure-in-a-maze.java
├── Alien Dictionary - GFG/
│   └── Alien Dictionary.cpp
├── All Elements in Two Binary Search Trees.java
├── All Factors.py
├── All Possible Combinations.java
├── All Unique Permutations.java
├── Allocate minimum number of pages.cpp
├── Alternate positive and negative numbers.cpp
├── Alternate positive and negative numbers.java
├── Anagram of String.java
├── Anagrams.java
├── Anti Diagonals.py
├── Arithmetic Slices.java
├── Array 3 Pointers.java
├── Array Partition - GFG/
│   ├── README.md
│   └── array-partition.java
├── Array Sum.java
├── Array to BST - GFG/
│   ├── README.md
│   └── array-to-bst.java
├── Assign Mice to Holes.java
├── Assignment Problem - GFG/
│   ├── README.md
│   ├── assignment-problem.cpp
│   ├── assignment-problem.java
│   ├── assignment-problem.py
│   └── hungarian_java(not_accepted).java
├── Average of level in Binary tree.cpp
├── Average of levels in binary tree.java
├── BST To Max Heap.cpp
├── BST to greater sum tree - GFG/
│   ├── README.md
│   └── bst-to-greater-sum-tree.java
├── BST to max heap GFG/
│   └── BstToMaxHeap.cpp
├── BST to max heap gfg med.cpp
├── BST-to-max-Heap/
│   ├── BSTtoMaxHeap.java
│   ├── Solution.cpp
│   └── question.md
├── Bag Of Tokens.java
├── Balance Array.java
├── Balanced Binary Tree.java
├── Balanced Parantheses!.java
├── Ball Coloring.cpp
├── Ball coloring.cpp
├── Ball coloring.java
├── Ball coloring.py
├── Ball-Coloring/
│   ├── ball_coloring.java
│   └── question.md
├── Best Time to Buy and Sell Stock IV.java
├── Best Time to Buy and Sell Stock.java
├── Biconnected Graph.java
├── Bike Racing - GFG/
│   ├── README.md
│   └── bike-racing.java
├── Binary Matrix with at most K 1s.java
├── Binary Tree Pruning lc.cpp
├── Binary Tree Pruning.java
├── Bipartite Graph - GFG/
│   ├── README.md
│   └── bipartite-graph.java
├── Bit Difference - GFG/
│   └── Bit Difference.cpp
├── Bitwise AND of the Array.java
├── Black Shapes.java
├── Book_Allcoation_Problem.cpp
├── Brackets in Matrix Chain Multiplication - GFG/
│   ├── README.md
│   ├── brackets-in-matrix-chain-multiplication.cpp
│   └── brackets-in-matrix-chain-multiplication.java
├── Brain Game - GFG/
│   ├── README.md
│   ├── brain-game.cpp
│   └── brain-game.java
├── Breadth first search.cpp
├── Broken blocks - GFG/
│   ├── README.md
│   └── broken-blocks.java
├── Burning Tree.cpp
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── Can Make Triangle.java
├── Can Place Flowers.java
├── Capacity To Ship Packages Within D Days.java
├── Capitalize the Title
├── Case-specific Sorting of Strings.java
├── Case-specific Sorting of Strings.py
├── Case-specific Sorting string.cpp
├── Ceil in BST.java
├── Champagne Tower.java
├── Change Bits - GFG/
│   ├── README.md
│   └── change-bits.java
├── Check Mirror in N-ary tree.java
├── Check Palindrome!.java
├── Check if Every Row and Column Contains All Numbers
├── Check if subtree
├── Cherry Pickup II (LC)
├── Chips Factory.java
├── Chocolate_Distribution_Problem_gfg.cpp
├── Choose and Swap - GFG/
│   ├── README.md
│   └── choose-and-swap.java
├── Climbing Stairs.java
├── Clone Graph.java
├── Clone a stack without using extra space
├── Closest Palindrome - GFG/
│   ├── README.md
│   └── closest-palindrome.java
├── Coin Piles - GFG/
│   ├── README.md
│   └── coin-piles.java
├── Coins of Geekland.java
├── Combination Sum II.java
├── Combination Sum.java
├── Combinations.java
├── Compare Version Numbers.java
├── Complete Binary Tree.java
├── Composite And Prime.java
├── Composite and Prime gfg med s18.cpp
├── Composite and Prime.cpp
├── Composite and Prime.java
├── Composite and Prime.py
├── Composite-and-prime.cpp
├── Compute Before Matrix.java
├── Concatenate two numbers.java
├── Connect Ropes.java
├── Consecutive Parent - Child.java
├── Construct BST from Preorder.java
├── Construct Binary Tree From Inorder And Preorder.java
├── Construct String With Repeat Limit.java
├── Construct String from Binary Tree lc easy.cpp
├── Construct String from Binary Tree.java
├── Container With Most Water.java
├── Contiguous Binary Array.java
├── Convert Sorted List to Binary Search Tree.java
├── Convert the amount in number to words.java
├── Convert to Palindrome.java
├── Copy List with Random Pointer.java
├── Corona Vaccine.java
├── Count All Valid Pickup and Delivery Options.java
├── Count And Say.java
├── Count BST nodes that lie in a given range - GFG/
│   ├── README.md
│   └── count-bst-nodes-that-lie-in-a-given-range.java
├── Count Common Words With One Occurrence
├── Count Integers With Even Digit Sum.py
├── Count Operations to Obtain Zero.java
├── Count Palindromic  Subsequence.cpp
├── Count Palindromic Subsequences.java
├── Count Smaller elements.java
├── Count Words Obtained After Adding a Letter
├── Count digit groupings of a number - GFG/
│   ├── README.md
│   └── count-digit-groupings-of-a-number.java
├── Count occurrences of a given word in a 2-d array(dynamic programming).cpp
├── Count occurrences of a given word in a 2-d array.cpp
├── Count occurrences of a given word in a 2-d array.java
├── Count occurrences of a given word in a 2-d array.py
├── Count pairs in array divisible by K - GFG/
│   ├── README.md
│   └── count-pairs-in-array-divisible-by-k.java
├── Count possible ways to construct buildings - GFG/
│   ├── README.md
│   └── count-possible-ways-to-construct-buildings.java
├── Count subsequences of type a^i, b^j, c^k - GFG/
│   ├── README.md
│   └── count-subsequences-of-type-ai-bj-ck.java
├── Count the paths - GFG/
│   ├── README.md
│   └── count-the-paths.java
├── Count-occurrences-of-a-given-string-in-2d-array.cpp
├── Count_occurences_of_a_given_word_in_a_2-d_array/
│   ├── Solution.java
│   └── question.md
├── Counting Bits.java
├── Counts Zeros Xor Pairs - GFG/
│   ├── README.md
│   └── counts-zeros-xor-pairs.java
├── Course Schedule - GFG/
│   ├── README.md
│   └── course-schedule.java
├── Cousins of a given node.java
├── Covered-Uncovered Nodes.java
├── Create number of weak characters in game.java
├── Delete and Earn.java
├── Delete nodes greater than k.java
├── Deserialize.java
├── Design Add and Search Words Data Structure.java
├── Design Bitset.java
├── Design Browser History/
│   └── Design-Browser-History.cpp
├── Diagonal Traversal of Binary Tree - GFG/
│   ├── README.md
│   └── diagonal-traversal-of-binary-tree.java
├── Different Bits Sum Pairwise.java
├── Diffk II.java
├── Diffk.java
├── Digital Root.java
├── Dijkstra’s_Algorithm_Shortest_distance.cpp
├── Distance from the Source (Bellman-Ford Algorithm).java
├── Distinct Numbers in Window.java
├── Distinct Subsequences.java
├── Distinct palindromic substrings.java
├── Distribute in Circle!.java
├── Divisible by 60.java
├── Dungeon Princess.java
├── Earthquake and the Paint Shop - GFG/
│   ├── README.md
│   └── earthquake-and-the-paint-shop.java
├── Egg Dropping Puzzle.java
├── Elements in the Range.java
├── Equivalent Sub-Arrays - GFG/
│   ├── README.md
│   └── equivalent-sub-arrays.java
├── Escape the Forbidden Forest.java
├── Eulerian Path in an Undirected Graph - GFG/
│   ├── README.md
│   └── eulerian-path-in-an-undirected-graph.java
├── Evaluate Expression To True.java
├── Evaluate Expression(Postfix).java
├── Even and Odd - GFG/
│   ├── README.md
│   └── even-and-odd.java
├── Exactly one swap.java
├── Excel Column Title.java
├── Excel Sheet Column Number.java
├── Exceptionally odd.java
├── Fact Digit Sum/
│   └── Fact-Digit-Sum.cpp
├── Fact Digit Sum.cpp
├── Fact Digit Sum.java
├── Farthest number - GFG/
│   ├── README.md
│   └── farthest-number.java
├── File Search.java
├── Fill the Tank - GFG/
│   ├── README.md
│   └── fill-the-tank.java
├── Filling Bucket - GFG/
│   ├── README.md
│   └── filling-bucket.java
├── Find All Anagrams in a String.java
├── Find Last Digit.java
├── Find Missing And Repeating.java
├── Find Original Array From Doubled Array.java
├── Find Prime numbers in a range.java
├── Find Second Smallest and Second Largest Element in an array without sorting/
│   └── Find-Second-Smallest-and-Second-Largest-Element-in-an-array-with-out-sorting.cpp
├── Find Three Consecutive Integers That Sum to a Given Number.py
├── Find Transition Point - GFG/
│   ├── README.md
│   └── find-transition-point.java
├── Find a peak element.java
├── Find all distinct subset (or subsequence) sums - GFG/
│   └── Find all distinct subset (or subsequence) sums.cpp
├── Find all distinct subset (or subsequence) sums.java
├── Find all possible paths from top to bottom - GFG/
│   ├── README.md
│   └── find-all-possible-paths-from-top-to-bottom.java
├── Find an Replace in String - GFG/
│   ├── README.md
│   └── find-an-replace-in-string.java
├── Find length of Loop - GFG/
│   ├── README.md
│   └── find-length-of-loop.java
├── Find pairs with given sum in doubly linked list.cpp
├── Find pairs with given sum in doubly linked list.java
├── Find rectangle with corners as 1.java
├── Find the Difference.java
├── Find the Maximum Flow - GFG/
│   ├── README.md
│   └── find-the-maximum-flow.java
├── Find the nearest smaller number in left.cpp
├── Find the number of islands.java
├── Find whether path exist - GFG/
│   ├── README.md
│   └── find-whether-path-exist.java
├── Find-Pattern/
│   ├── find_patter.java
│   └── question.md
├── Finding Profession - GFG/
│   ├── README.md
│   └── finding-profession.java
├── Firing employees.java
├── First Missing Integer.java
├── First Repeating element.java
├── Flip.java
├── Foldable Binary Tree.cpp
├── Foldable Binary Tree.java
├── Form a palindrome - GFG/
│   ├── README.md
│   └── form-a-palindrome.java
├── Form coils in a matrix - GFG/
│   ├── README.md
│   └── form-coils-in-a-matrix.java
├── Fraction Trouble - GFG/
│   ├── README.md
│   └── fraction-trouble.java
├── Fraction.java
├── Friends Pairing Problem DP.java
├── Friends Pairing Problem.cpp
├── Friends Pairing Problem.java
├── GFG/
│   ├── 0 -1 Knapsack Problem/
│   │   └── 0 - 1 Knapsack Problem.java
│   ├── 2D Hopscotch/
│   │   └── 2D Hopscotch.java
│   ├── 3 Divisors/
│   │   └── 3 Divisors.java
│   ├── A Game of LCM/
│   │   └── A Game of LCM.java
│   ├── A difference of values and indexes/
│   │   └── A difference of values and indexes.java
│   ├── Absolute List Sorting/
│   │   └── Absolute List Sorting.java
│   ├── Absolute difference divisible by K/
│   │   └── Absolute difference divisible by K.java
│   ├── Add Binary Strings/
│   │   └── Add Binary Strings.java
│   ├── Aggressive Cows/
│   │   └── Aggressive Cows.java
│   ├── Akku and Binary Numbers/
│   │   └── Akku and Binary Numbers.java
│   ├── Alex Travelling/
│   │   ├── Alex Travelling.cpp
│   │   └── Alex Travelling.java
│   ├── Alternate Vowel and Consonant String/
│   │   ├── Alternate Vowel and Consonant String.java
│   │   └── ReadMe.md
│   ├── Array Pair Sum Divisibility Problem/
│   │   └── Array Pair Sum Divisibility Problem.java
│   ├── Array Removals/
│   │   ├── Array Removals.cpp
│   │   └── Array Removals.java
│   ├── Articulation Point - I/
│   │   └── Articulation Point - I.java
│   ├── Asteroid Collision/
│   │   ├── Asteroid Collision.cpp
│   │   └── Asteroid Collision.java
│   ├── Balanced string/
│   │   └── Balanced string.java
│   ├── Base Equivalance/
│   │   └── Base Equivalence.java
│   ├── Base Equivalence/
│   │   └── Base Equivalence.java
│   ├── Binary Tree to DLL/
│   │   ├── Binary Tree to DLL.cpp
│   │   └── Binary Tree to DLL.java
│   ├── Black and White/
│   │   └── Black and White.java
│   ├── Break a number/
│   │   └── Break a number.java
│   ├── Build the smallest/
│   │   └── Build the smallest.java
│   ├── Burst Balloons/
│   │   └── Burst Balloons.java
│   ├── Check for BST/
│   │   └── Check for BST.java
│   ├── Check if all levels of two trees are anagrams or not/
│   │   └── Check if all levels of two trees are anagrams or not.java
│   ├── Check if it is possible to convert one string into another with given constraints/
│   │   └── Check if it is possible to convert one string into another with given constraints.java
│   ├── Chicks in a Zoo/
│   │   ├── Chicks in a Zoo.cpp
│   │   └── Chicks in a Zoo.java
│   ├── Complement/
│   │   └── Complement.java
│   ├── Construct Binary Tree from String with bracket representation/
│   │   ├── Construct Binary Tree from String with bracket representation.cpp
│   │   └── Construct Binary Tree from String with bracket representation.java
│   ├── Container With Most Water/
│   │   ├── Container With Most Water.cpp
│   │   └── Container With Most Water.java
│   ├── Count Lucky Permutations/
│   │   └── Count Lucky Permutations.java
│   ├── Count all possible paths from top left to bottom right/
│   │   ├── Count all possible paths from top left to bottom right oc4.cpp
│   │   ├── Count all possible paths from top left to bottom right.cpp
│   │   └── README.md
│   ├── Count even length/
│   │   └── Count even length.java
│   ├── Count of Subarrays/
│   │   ├── Count of Subarrays.cpp
│   │   ├── Count of Subarrays.java
│   │   └── README.md
│   ├── Count the Substring/
│   │   ├── Count the Substring.cpp
│   │   └── Count the Substring.java
│   ├── Counting Elements in Two Arrays/
│   │   ├── Counting Elements in Two Arrays.cpp
│   │   ├── Counting Elements in Two Arrays.java
│   │   └── Counting Elements in Two Arrays.py
│   ├── Cycle in Directed Graph/
│   │   └── Cycle in Directed Graph.java
│   ├── Cycle in Undirected Graph/
│   │   └── Cycle in Undirected Graph.java
│   ├── Decode the string/
│   │   ├── Decode the string.cpp
│   │   ├── Decode the string.java
│   │   └── README.md
│   ├── Distance of nearest cell having 1/
│   │   └── Distance of nearest cell having 1.java
│   ├── Earthquake and the Paint Shop/
│   │   ├── Earthquake and the Paint Shop.cpp
│   │   └── README.md
│   ├── Enemy/
│   │   ├── Enemy.cpp
│   │   └── Enemy.java
│   ├── Fill up buckets/
│   │   ├── Fill up buckets.cpp
│   │   └── Fill up buckets.java
│   ├── Filling Bucket/
│   │   ├── Filling Bucket.cpp
│   │   ├── Filling Bucket.java
│   │   └── README.md
│   ├── Find The Safe Position/
│   │   ├── Find The Safe Position s30.cpp
│   │   └── Find the Safe Position.java
│   ├── Find minimum number of Laptops required/
│   │   ├── Find minimum number of Laptops required.cpp
│   │   └── Find minimum number of Laptops required.java
│   ├── Find patterns/
│   │   ├── Find patterns.cpp
│   │   ├── Find patterns.java
│   │   └── README.md
│   ├── Find the N-th character/
│   │   └── Find the N-th character.cpp
│   ├── Find the first node of loop in linked list/
│   │   └── Find the first node of loop in linked list.java
│   ├── Find the longest string/
│   │   └── Find the longest string.java
│   ├── Find the maximum GCD of the siblings of a Binary Tree/
│   │   └── Find the maximum GCD of the siblings of a Binary Tree.java
│   ├── Fitting The Array/
│   │   ├── Fitting The Array s28.cpp
│   │   ├── Fitting The Array.cpp
│   │   └── Fitting The Array.java
│   ├── Flatten binary tree to linked list/
│   │   ├── Flatten binary tree to linked list.java
│   │   └── Readme.md
│   ├── Flattening a Linked List/
│   │   └── Flattening a Linked List.java
│   ├── Floyd Warshall/
│   │   ├── Floyd Warshall.java
│   │   ├── FloydWarshall.cpp
│   │   └── README.md
│   ├── Form a palindrome/
│   │   └── Form a palindrome.py
│   ├── GCD Array/
│   │   └── GCD Array.java
│   ├── Geek and Number String/
│   │   └── Geek and Number Str.cpp
│   ├── Geek and Strings/
│   │   ├── Geek and Strings.java
│   │   └── ReadMe.md
│   ├── Geek in a Maze/
│   │   ├── Geek in a maze.java
│   │   └── README.md
│   ├── Grouping Of Numbers/
│   │   └── Grouping Of Numbers.java
│   ├── Hamiltonian Path/
│   │   ├── Hamiltonian Path.cpp
│   │   ├── Hamiltonian Path.java
│   │   └── README.md
│   ├── Help Ishaan/
│   │   ├── Help Ishaan.cpp
│   │   ├── Help Ishaan.java
│   │   └── README.md
│   ├── Help a Thief/
│   │   ├── Help a thief.cpp
│   │   └── README.md
│   ├── Help the Old Man/
│   │   ├── Help the old man.java
│   │   └── README.md
│   ├── Hungry Pizza Lovers/
│   │   ├── Hungry pizza lovers.java
│   │   └── README.md
│   ├── IPL/
│   │   └── IPL.cpp
│   ├── IPL 2021 - Match Day 2/
│   │   └── IPL 2021 - Match Day 2 gfg med s22.cpp
│   ├── Ishaan Loves Chocolates/
│   │   ├── Ishaan loves chocolates.py
│   │   └── README.md
│   ├── Josephus problem/
│   │   └── Josephus problem.java
│   ├── Jump Game/
│   │   ├── Jump game.java
│   │   └── README.md
│   ├── Jumping Numbers/
│   │   ├── Jumping Numbers.cpp
│   │   └── README.md
│   ├── K-Ary Tree/
│   │   └── README.md
│   ├── Knight Walk/
│   │   ├── Knight Walk.cpp
│   │   └── Knight Walk.java
│   ├── Kth smallest element/
│   │   └── Kth smallest element.py
│   ├── LCM Triplet/
│   │   └── LCM Triplet.java
│   ├── Largest subtree sum in a tree/
│   │   ├── Largest subtree sum in a tree.cpp
│   │   └── Largest subtree sum in a tree.java
│   ├── Last modified ball/
│   │   └── Last modified ball.java
│   ├── Longest Bitonic subsequence/
│   │   └── Longest Bitonic subsequence.java
│   ├── Longest Perfect Piece/
│   │   └── Longest Perfect Piece.java
│   ├── Magic Triplets/
│   │   └── Magic Triplets.java
│   ├── Majority Element/
│   │   ├── Majority Element.java
│   │   ├── Majority Element.py
│   │   └── README.md
│   ├── Make array elements unique/
│   │   └── Make array elements unique.java
│   ├── Max Min/
│   │   ├── Max Min.cpp
│   │   ├── Max Min.java
│   │   ├── Max Min.py
│   │   └── README.md
│   ├── Maximize the sum of selected numbers from an array to make it empty/
│   │   ├── Maximize the sum of selected numbers from a sorted array to make it empty.cpp
│   │   ├── Maximize the sum of selected numbers from an array to make it empty.java
│   │   └── README.md
│   ├── Maximum Number of Toys/
│   │   └── Maximum Number of Toys.java
│   ├── Maximum Profit By Choosing A Subset Of Intervals/
│   │   └── Maximum Profit By Choosing A Subset Of Intervals.java
│   ├── Maximum Sub Array/
│   │   └── Maximum Sub Array.java
│   ├── Maximum Sub-String after at most K changes/
│   │   ├── Maximum Sub-String after at most K changes.cpp
│   │   ├── Maximum Sub-String after at most K changes.java
│   │   └── README.md
│   ├── Maximum Sum LCM/
│   │   └── Maximum Sum LCM.java
│   ├── Maximum Value/
│   │   └── Maximum Value.java
│   ├── Maximum of all subarrays of size k/
│   │   └── Maximum of all subarrays of size k.java
│   ├── Median in a row-wise sorted Matrix/
│   │   └── Median in a row-wise sorted Matrix.java
│   ├── Merge Sort/
│   │   └── Merge Sort.java
│   ├── Merge two BST 's/
│   │   └── Merge two BST.cpp
│   ├── Min operations/
│   │   └── Min operations.java
│   ├── Minimize number of Students to be removed/
│   │   └── Minimize number of Students to be removed.java
│   ├── Minimize the sum/
│   │   └── Minimize the sum.java
│   ├── Minimum Cost of ropes/
│   │   └── Minimum Cost of ropes.java
│   ├── Minimum Costs of Ropes/
│   │   └── Minimum Costs of Ropes.cpp
│   ├── Minimum characters to be added at front to make string palindrome/
│   │   ├── Minimum characters to be added at front to make string palindrome oc2.cpp
│   │   ├── Minimum characters to be added at front to make string palindrome.cpp
│   │   ├── Minimum characters to be added at front to make string palindrome.java
│   │   ├── Minimum characters to be added at front to make string palindrome.py
│   │   └── README.md
│   ├── Minimum number of Coins/
│   │   ├── Minimum number of Coins.cpp
│   │   └── Minimum number of Coins.java
│   ├── Minimum sum partition/
│   │   ├── Minimum sum partition.cpp
│   │   ├── Minimum sum partition.java
│   │   └── README.md
│   ├── Missing number in matrix.java/
│   │   └── Missing number in matrix.java
│   ├── Modified Numbers and Queries/
│   │   ├── Modified Numbers And Queries.java
│   │   ├── Modified Numbers and Queries oc3.cpp
│   │   ├── Modified Numbers and Queries.py
│   │   └── README.md
│   ├── Move Last Element to Front of a Linked List/
│   │   ├── Move Last Element to Front of a Linked List 2 different approaches.java
│   │   ├── Move Last Element to Front of a Linked List.cpp
│   │   ├── Move Last Element to Front of a Linked List.java
│   │   └── README.md
│   ├── Next Greater Element/
│   │   └── Next Greater Element.java
│   ├── Next Happy Number/
│   │   └── Next Happy Number.java
│   ├── Nine Divisors/
│   │   ├── Nine Divisors.cpp
│   │   └── Nine Divisors.java
│   ├── Number Formation/
│   │   ├── Number Formation.cpp
│   │   ├── Number Formation.java
│   │   └── README.md
│   ├── Number Of Islands/
│   │   ├── Number Of Islands.cpp
│   │   ├── Number Of Islands.java
│   │   └── README.md
│   ├── Number Of Open Doors/
│   │   └── Number Of Open Doors.java
│   ├── Number of Distinct Islands/
│   │   ├── Number of Distinct Islands oct1.cpp
│   │   └── Number of Distinct Islands.py
│   ├── Number of turns in binary tree/
│   │   ├── Number of turns in binary tree.cpp
│   │   └── Number of turns in binary tree.java
│   ├── Phone directory/
│   │   ├── Phone directory.cpp
│   │   └── Phone directory.java
│   ├── Primes sum/
│   │   ├── Primes sum.cpp
│   │   ├── Primes sum.java
│   │   └── README.md
│   ├── Print Diagonally/
│   │   ├── Print Diagonally.cpp
│   │   ├── Print Diagonally.java
│   │   └── README.md
│   ├── Print leaf nodes from preorder traversal of BST/
│   │   ├── Print leaf nodes from preorder traversal of BST.cpp
│   │   ├── Print leaf nodes from preorder traversal of BST.java
│   │   └── README.md
│   ├── Queries on a matrix/
│   │   └── Queries on a matrix hard s25 gfg.cpp
│   ├── Rearrange Array Alternately/
│   │   └── Rearrange Array Alternately.java
│   ├── Reorder List/
│   │   └── Reorder List.java
│   ├── Replace O's with X's/
│   │   └── Replace O's with X's.cpp
│   ├── Replace every element with the least greater element on its right/
│   │   ├── README.md
│   │   ├── Replace every element with the least greater element on its right.cpp
│   │   └── Replace every element with the least greater element on its right.java
│   ├── Reverse Spiral Form of Matrix/
│   │   ├── Reverse Spiral Form of Matrix.cpp
│   │   └── Reverse Spiral Form of Matrix.java
│   ├── Satisfy the equation/
│   │   └── Satisfy the equation.java
│   ├── Save Your Life/
│   │   ├── README.md
│   │   ├── Save Your Life.cpp
│   │   └── Save Your Life.java
│   ├── Search Pattern (KMP-Algorithm)/
│   │   └── Search Pattern (KMP-Algorithm).java
│   ├── Search Pattern (Rabin-Karp Algorithm)/
│   │   └── Search Pattern (Rabin-Karp Algorithm).java
│   ├── Sequence Fun/
│   │   └── Sequence Fun.java
│   ├── Shortest Distance in a Binary Maze/
│   │   ├── README.md
│   │   ├── Shortest Distance in a Binary Maze.cpp
│   │   └── Shortest Distance in a Binary Maze.java
│   ├── Shortest Path by Removing K walls/
│   │   └── Shortest Path by Removing K walls.java
│   ├── Shortest Prime Path/
│   │   └── Shortest Prime Path.java
│   ├── Shreyansh and his bits/
│   │   └── Shreyansh and his bits.java
│   ├── Single valued subtree/
│   │   └── Single valued subtree.java
│   ├── Sort an array of 0s, 1s and 2s/
│   │   ├── Sort an array of 0s, 1s and 2s.java
│   │   └── Sort an array of 0s,1s and 2s s29.cpp
│   ├── Spiral Matrix/
│   │   └── Spiral Matrix.cpp
│   ├── Split Array Largest Sum/
│   │   └── Split Array Largest Sum.java
│   ├── Stepping Numbers/
│   │   ├── README.md
│   │   ├── Stepping Numbers.cpp
│   │   └── Stepping Numbers.java
│   ├── Substrings of length k with k-1 distinct elements/
│   │   ├── README.md
│   │   ├── Substrings of length k with k-1 distinct elements.cpp
│   │   └── Substrings of length k with k-1 distinct elements.java
│   ├── Sum of Beauty of All Substrings/
│   │   └── Sum of Beauty of All Substrings.java
│   ├── The Smurfs/
│   │   ├── The Smurfs.cpp
│   │   └── The Smurfs.java
│   ├── Tom and jerry/
│   │   ├── Tom and Jerry easy s26.cpp
│   │   ├── Tom and Jerry.java
│   │   └── Tom and Jerry.py
│   ├── Transform to Sum Tree/
│   │   └── Transform to Sum Tree.java
│   ├── Two numbers with odd occurrences/
│   │   ├── README.md
│   │   ├── Two numbers with odd occurrences.cpp
│   │   └── Two numbers with odd occurrences.java
│   ├── Unique partitions/
│   │   └── Unique partitions.java
│   ├── Wine Buying and Selling/
│   │   └── Wine Buying and Selling.java
│   ├── Zero Sum Subarrays/
│   │   └── Zero Sum Subarrays.java
│   └── k-th smallest element in BST/
│       └── k-th smallest element in BST.java
├── GFG_Find_all_distinct_subset_(or subsequence
├── Game with nos
├── Game with nos.java
├── Gas Station.java
├── Geek and Number String s23 med.cpp
├── Geek and Number String.cpp
├── Geek and Number String.java
├── Geek and knots.java
├── Generate IP Addresses.cpp
├── Generate IP Addresses.java
├── Generate IP Addresses.py
├── Generate all Parentheses II.java
├── Get min at pop.java
├── Greater of Lesser.java
├── Greater than All.java
├── Hamiltonian Path - GFG/
│   ├── README.md
│   └── hamiltonian-path.java
├── Height Using Parent Array.java
├── Highest Product.java
├── Highest Score.java
├── Hit most Balloons.java
├── INVERSIONS.java
├── IPL 2021 - Match Day 2 by AMAN SAINI
├── IPL 2021 - Match Day 2.cpp
├── IPL 2021 - Match Day 2.java
├── IPL 2021 - Match Day 2.py
├── Identical Binary Trees.java
├── Immediate Smaller Element.java
├── Immediate Smaller Element.js
├── Immediate Smaller Element.py
├── Implement Power Function(IB)
├── Implement StrStr.java
├── Implementing Dijkstra Algorithm.java
├── Inorder Traversal of Cartesian Tree.java
├── Inorder linear Traversal.java
├── Insert into a Binary Search Tree
├── Insertion Sort List.java
├── Insertion Sort for Singly Linked List.java
├── Integer To Roman.java
├── Integers in Strings.java
├── Intersection Of Sorted Arrays.java
├── Intersection of Linked Lists.java
├── Interviewbit/
│   ├── Colorful Number/
│   │   ├── Colorful Number.java
│   │   └── Colorful Number.py
│   ├── Copy List/
│   │   └── Copy List.java
│   └── Valid Sudoku/
│       ├── Valid Sudoku.cpp
│       └── Valid Sudoku.java
├── Invert the Binary Tree.java
├── Is Subsequence.java
├── IsRectangle.java
├── Jump Game Array.java
├── Jump Game IV
├── K Largest Elements.java
├── K-diff Pairs in an Array.java
├── Kill Captain America - GFG/
│   ├── README.md
│   └── kill-captain-america.java
├── Killing Spree - GFG/
│   ├── README.md
│   └── killing-spree.java
├── Koko Eating Bananas.java
├── Kth Permutation Sequence.java
├── Kth Row of Pascal's Triangle.java
├── Kth Smallest Absolute Difference.java
├── Kth Smallest Element In Tree.java
├── Kth smallest element.cpp
├── LC 1000. Minimum Cost to Merge Stones.cpp
├── LCP - GFG/
│   ├── README.md
│   └── lcp.java
├── LICENSE
├── Largest BST - GFG/
│   ├── README.md
│   └── largest-bst.java
├── Largest Number.java
├── Largest Permutation.java
├── Largest Rectangle in Histogram.java
├── Largest number with given sum - GFG/
│   ├── README.md
│   └── largest-number-with-given-sum.java
├── Largest prime factor.cpp
├── Largest value in each level.java
├── Last Node in a Complete Binary Tree.java
├── Last digit K count.java
├── Leaders in an array.java
├── Leaves to DLL.java
├── Leetcode/
│   ├── 104 maximum depth of binary tree/
│   │   ├── 104 maximum depth of binary tree.cpp
│   │   ├── 104. Maximum Depth of Binary Tree.java
│   │   └── README.md
│   ├── 112 Path Sum/
│   │   ├── 112 Path Sum oc4.cpp
│   │   └── Path Sum.java
│   ├── 1155. Number of Dice Rolls With Target Sum/
│   │   ├── 1155 Number of Dice Rolls With Target Sum.cpp
│   │   ├── 1155. Number of Dice Rolls With Target Sum.java
│   │   └── 1155. Number of Dice Rolls With Target Sum.py
│   ├── 1217. Minimum Cost to Move Chips to The Same Position/
│   │   ├── 1217. Minimum Cost to Move Chips to The Same Position.java
│   │   ├── Notes.md
│   │   └── README.md
│   ├── 1252. Cells with Odd Values in a Matrix/
│   │   ├── 1252. Cells with Odd Values in a Matrix.java
│   │   ├── Notes.md
│   │   └── README.md
│   ├── 1304.Find N Unique Integers Sum up to Zero/
│   │   ├── 1304.Find N Unique Integers Sum up to Zero.java
│   │   ├── Notes.md
│   │   └── README.md
│   ├── 15. 3Sum/
│   │   ├── 3sum.java
│   │   └── README.md
│   ├── 151.Reverse Words in a String/
│   │   └── Reverse Words in a String.java
│   ├── 1531. String Compression II/
│   │   └── 1531. String Compression II.cpp
│   ├── 1578 Minimum Time to Make Rope Colorful/
│   │   └── 1578 Minimum Time to Make Rope Colorful.cpp
│   ├── 1578. Minimum Time to Make Rope Colorful/
│   │   └── 1578. Minimum Time to Make Rope Colorful.py
│   ├── 1662. Check If Two String Arrays are Equivalent/
│   │   └── Check If Two String Arrays are Equivalent.java
│   ├── 19 Remove Nth Node From End of List/
│   │   ├── 19 Remove Nth Node From End of List.cpp
│   │   └── Remove Nth Node from End Of List.java
│   ├── 1996. The Number of Weak Characters in the Game/
│   │   └── The Number of Weak Characters in the Game.cpp
│   ├── 2095. Delete the Middle Node of a Linked List/
│   │   ├── 2095 Delete the Middle Node of a Linked List.java
│   │   └── README.md
│   ├── 2124. Check if All A's Appears Before All B's/
│   │   └── 2124. Check if All A's Appears Before All B's.java
│   ├── 218 The Skyline Problem/
│   │   └── 218 The Skyline Problem s30.cpp
│   ├── 221. Maximal Square/
│   │   └── 221. Maximal Square.java
│   ├── 222. Count Complete Tree Nodes/
│   │   └── Count Complete Tree Nodes.java
│   ├── 2368. Reachable Nodes With Restrictions/
│   │   └── Reachable Nodes With Restrictions.cpp
│   ├── 237. Delete Node in a Linked List/
│   │   ├── Delete Node in a Linked List.cpp
│   │   └── Delete Node in a Linked List.java
│   ├── 2424. Longest Uploaded Prefix/
│   │   └── 2424. Longest Uploaded Prefix.java
│   ├── 2427. Number of Common Factors/
│   │   └── 2427. Number of Common Factors.cpp
│   ├── 2428. Maximum Sum of an Hour Glass/
│   │   └── 2428. Maximum Sum of an Hour Glass.cpp
│   ├── 263. Ugly Number/
│   │   └── 263. Ugly Number.cpp
│   ├── 279. Perfect Squares/
│   │   └── 279. Perfect Squares.cpp
│   ├── 336. Palindrome Pairs/
│   │   ├── 336. Palindrome Pairs.java
│   │   └── 336. Palindrome pairs.cpp
│   ├── 4. Median of Two Sorted Arrays/
│   │   ├── 4. Median of Two Sorted Arrays.java
│   │   └── Median of Two Sorted Arrays.cpp
│   ├── 401 binary watch/
│   │   ├── 401-binary-watch.java
│   │   ├── NOTES.md
│   │   └── README.md
│   ├── 437 Path Sum III/
│   │   └── pathSum.cpp
│   ├── 450 Delete Node in a BST/
│   │   └── deleteNode.java
│   ├── 4Sum II/
│   │   └── 4Sum II.java
│   ├── 622 Design Circular Queue/
│   │   └── 622 Design Circular Queue med s25.cpp
│   ├── 623 Add One Row To Tree/
│   │   ├── Add one row to tree.java
│   │   └── ReadMe.md
│   ├── 623 Add One Row to Tree/
│   │   └── 623 Add One Row to Tree.java
│   ├── 658 Find K Closest Elements/
│   │   ├── 658 Find K Closest Elements s29.cpp
│   │   └── Find k Closest Elements.java
│   ├── 704 binary search/
│   │   ├── 704-Binary-Search.py
│   │   ├── NOTES.md
│   │   └── README.md
│   ├── 72 Edit distance/
│   │   ├── minDistance.cpp
│   │   └── minDistance.java
│   ├── 75.Sort colors/
│   │   ├── 75.Sort-colors.java
│   │   ├── Notes.md
│   │   ├── README.md
│   │   └── Sort colors.cpp
│   ├── 766.Toeplitz Matrix/
│   │   └── Toeplitz Matrix.java
│   ├── 79.Word Search/
│   │   ├── 79. Word Search.cpp
│   │   ├── NOTES.md
│   │   └── README.md
│   ├── 838 Push Dominoes/
│   │   └── 838 Push Dominoes lc med s27.cpp
│   ├── 91 Decode Ways/
│   │   └── 91 Decode Ways oc1.cpp
│   ├── 92 Reverse Linked List II/
│   │   ├── Reverse Linked List II.cpp
│   │   └── Reverse Linked List II.java
│   ├── 990 Satisfiability of Equality Equations/
│   │   └── 990 Satisfiability of Equality Equations med s26.cpp
│   ├── Break A Palindrome/
│   │   └── Break A Palindrome.java
│   ├── K diff pairs/
│   │   └── K diff pairs.cpp
│   ├── Merge Overlapping Intervals/
│   │   └── Merge Overlapping Intervals.cpp
│   ├── Minimum time to Make Rope Colorful/
│   │   └── Minimum Time to Make Rope Colorful.cpp
│   ├── Number of Dice rolls with target sum/
│   │   └── Number of dice rolls.cpp
│   ├── Remove Letter To Equalize Frequency/
│   │   └── Remove Letter To Equalize Frequency.cpp
│   ├── Sort Colors/
│   │   └── Sort Colors.cpp
│   ├── Top K Frequent Words/
│   │   └── Top K Frequent Words.cpp
│   └── Two Sum IV-Input is BST/
│       └── Two Sum IV-Input is a BST.java
├── Length of Last Word.java
├── Length of longest palindrome in Linked List.java
├── Length of longest palindrome in linked list.java
├── Letter Phone.java
├── Level Order.java
├── Levels Of Game.java
├── Licence Key Formatting.java
├── License Key Formatting GFG/
│   └── Licence.cpp
├── License Key Formatting med s21.cpp
├── License Key Formatting(explanation in comments).cpp
├── License Key Formatting.cpp
├── License Key Formatting.java
├── Linked List Cycle II.java
├── Linked List Cycle.java
├── Longest Bitonic subsequence.cpp
├── Longest Common Prefix.java
├── Longest Common Subsequence.java
├── Longest Palindrome by Concatenating Two Letter Words
├── Longest Palindromic Subsequence.java
├── Longest Palindromic Substring.java
├── Longest Path in a matrix - GFG/
│   ├── README.md
│   └── longest-path-in-a-matrix.java
├── Longest Possible Route in a Matrix with Hurdles - GFG/
│   ├── README.md
│   └── longest-possible-route-in-a-matrix-with-hurdles.java
├── Longest Sub-Array with Sum K.cpp
├── Longest Sub-Array with Sum K.java
├── Longest subarray with sum divisible by K - GFG/
│   ├── README.md
│   └── longest-subarray-with-sum-divisible-by-k.java
├── Longest substring to form a Palindrome - GFG/
│   ├── README.md
│   └── longest-substring-to-form-a-palindrome.java
├── Longest valid Parentheses.java
├── M-Coloring Problem.java
├── MInimum time to fulfil all orders.cpp
├── Magician and Chocolates.java
├── Magnet Array Problem - GFG/
│   ├── README.md
│   └── magnet-array-problem.java
├── Majority Element.java
├── Make equal elements Array.java
├── Matrix Chain Multiplication.cpp
├── Matrix Exponentiation - GFG/
│   ├── README.md
│   └── matrix-exponentiation.java
├── Matrix Operations.java
├── Matrix Search.java
├── Max Depth of Binary Tree.java
├── Max Distance.java
├── Max Non Negative SubArray.java
├── Max Product Subarray.java
├── Max Rectangle in Binary Matrix.java
├── Max Sum Path in Binary Tree.java
├── Max length chain.cpp
├── Max length chain.java
├── Maximize Distance to Closest Person
├── Maximize The Array - GFG/
│   ├── README.md
│   └── maximize-the-array.java
├── Maximize the sum of selected numbers from an array to make it empty - GFG/
│   ├── README.md
│   └── maximize-the-sum-of-selected-numbers-from-an-array-to-make-it-empty.java
├── Maximum Depth of Binary Tree.java
├── Maximum GCD of siblings of a binary tree - GFG/
│   ├── README.md
│   └── maximum-gcd-of-siblings-of-a-binary-tree.java
├── Maximum Number of Words Found in Sentences.java
├── Maximum Path Sum between 2 Leaf Nodes.cpp
├── Maximum Path in Triangle.java
├── Maximum Product of Increasing Subsequence of Size 3 - GFG/
│   ├── README.md
│   └── maximum-product-of-increasing-subsequence-of-size-3.java
├── Maximum Split of Positive Even Integers.py
├── Maximum Twin Sum of a Linked List.java
├── Maximum Width of Binary Tree.java
├── Maximum Winning score.java
├── Maximum XOR of Two Numbers in an Array.java
├── Maximum average subarray - GFG/
│   ├── README.md
│   └── maximum-average-subarray.java
├── Maximum level sum.java
├── Maximum number of 2X2 squares.cpp
├── Maximum number of 2X2 squares.java
├── Maximum number of events that can be attended.java
├── Maximum selections - GFG/
│   ├── README.md
│   └── maximum-selections.java
├── Maximum sum Rectangle - GFG/
│   ├── README.md
│   └── maximum-sum-rectangle.java
├── Maximum sum leaf to root path.java
├── Maximum sum of Non-adjacent nodes.java
├── Maximum sum of increasing order elements from n arrays.java
├── Maximum twin sum of a linkedlist.cpp
├── Maximum-number-of-2X2-squares.cpp
├── Merge Intervals
├── Merge K sorted linked lists.java
├── Merge Nodes in Between Zeros.java
├── Merge Overlapping Intervals.java
├── Merge Two Sorted Array.py
├── Merge Two Sorted Lists
├── Merge Two Sorted Lists.java
├── Merge Without Extra Space.cpp
├── Merge k Sorted Lists.java
├── Merge new Interval.java
├── Merge two Binary Tree.java
├── Merge two binary Max heaps
├── Merge two sorted linked lists - GFG/
│   ├── README.md
│   └── merge-two-sorted-linked-lists.java
├── Merging Details - GFG/
│   └── Merging Details.cpp
├── Merging Details _GFG.cpp
├── Merging Details.java
├── Min Coin - GFG/
│   ├── README.md
│   └── min-coin.java
├── Min Depth of Binary Tree.java
├── Min Jumps Array.java
├── Min Stack.java
├── Min Steps in Infinite Grid.java
├── Min Sum Path in Matrix.java
├── Min Sum Path in Triangle.java
├── Min sum formed by digits - GFG/
│   ├── README.md
│   └── min-sum-formed-by-digits.java
├── Minimize Deviation in Array.java
├── Minimum Add to Make Parentheses Valid/
│   └── Minimum-Add-to-Make-Parentheses-Valid.cpp
├── Minimum Cost to Set Cooking Time.java
├── Minimum Cost to cut a board into squares.cpp
├── Minimum Cost to cut a board into squares.java
├── Minimum Cost to cut a board into squares.py
├── Minimum Exchange GFG/
│   └── MinimumExchange.cpp
├── Minimum Exchange gfg easy sep12.cpp
├── Minimum Exchange.java
├── Minimum Lights to Activate.java
├── Minimum Number in a sorted rotated array - GFG/
│   ├── README.md
│   ├── minimum-number-in-a-sorted-rotated-array.java
│   └── minimum-number-in-a-sorted-rotated-array.py
├── Minimum Number of Arrows to Burst Balloons(Non Overlapping intervals)
├── Minimum Number of Vertices to Reach All Nodes.java
├── Minimum Operations to Make the Array Alternating.java
├── Minimum Parantheses!.java
├── Minimum Platforms.java
├── Minimum Remove to Make Valid Parentheses/
│   └── Minimum-Remove-to-Make-Valid-Parentheses.cpp
├── Minimum Remove to Make Valid Parentheses.java
├── Minimum Sum of Absolute Differences of Pairs gfg easy.cpp
├── Minimum Sum of Absolute Differences of Pairs.java
├── Minimum Sum of Absolute Differences of Pairs.py
├── Minimum Sum of Four Digit Number After Splitting Digits.java
├── Minimum Swaps GFG (easy solution with comments).cpp
├── Minimum Swaps to Group All 1's Together II.cpp
├── Minimum Swaps to Sort.java
├── Minimum Swaps.java
├── Minimum Time To Fulfill All Orders Using BinarySearch And ApSeries Formula.java
├── Minimum Time to Remove All Cars Containing Illegal Goods.java
├── Minimum X (xor) A - GFG/
│   ├── README.md
│   └── minimum-x-xor-a.java
├── Minimum increment/
│   └── decrement to make array non-Increasing - GFG/
│       ├── README.md
│       └── minimum-incrementdecrement-to-make-array-non-increasing.java
├── Minimum sum of absolute difference of pairs.cpp
├── Minimum time to fulfil all orders
├── Minimum time to fulfil all orders gfg hard.cpp
├── Minimum time to fulfil all orders.java
├── Minimum time to fulfill  all orders.java
├── Minimum times A has to be repeated such that B is a substring of it - GFG/
│   ├── README.md
│   └── minimum-times-a-has-to-be-repeated-such-that-b-is-a-substring-of-it.py
├── Minimum-Exchange/
│   ├── Solution.java
│   └── question.md
├── Minimum-swaps.cpp
├── Minimum_Cost_to_cut_a_board_into_squares_gfg_greedy.cpp
├── Mirror Reflection.java LeetCode
├── Move Last Element to Front of a Linked List - GFG/
│   ├── README.md
│   └── move-last-element-to-front-of-a-linked-list.java
├── Move Zeroes.java
├── Move all zeroes to end of the array.java
├── Move all zeros to the front of the linked list - GFG/
│   ├── README.md
│   └── move-all-zeros-to-the-front-of-the-linked-list.java
├── Moving on grid - GFG/
│   ├── README.md
│   └── moving-on-grid.java
├── Multiple left rotations of the array.java
├── N Digit numbers with digits in increasing order
├── N by 3 Repeating Number
├── N-th_Tribonacci_Number_leetcode1137.cpp
├── Nearest Smaller Element.java
├── Nearly sorted - GFG/
│   ├── README.md
│   └── nearly-sorted.java
├── Negative weight cycle - GFG/
│   ├── README.md
│   └── negative-weight-cycle.java
├── Next Permutation
├── Next Pointer Binary Tree.java
├── Next Right Node.cpp
├── Next Right Node.java
├── Next element with greater frequency - GFG/
│   ├── README.md
│   └── next-element-with-greater-frequency.java
├── Noble Integer.java
├── Node with highest edge score.cpp
├── Nodes at even distance - GFG/
│   ├── README.md
│   └── nodes-at-even-distance.java
├── Nth item through sum - GFG/
│   ├── README.md
│   └── nth-item-through-sum.py
├── Number Formation - GFG/
│   ├── README.md
│   └── number-formation.java
├── Number of 1 Bits.java
├── Number of Provinces.java
├── Number of Sundays.java
├── Number of Ways to Arrive at Destination gfg med sep16.cpp
├── Number of Ways to Arrive at Destination.cpp
├── Number of Ways to Arrive at Destination.java
├── Number of distict Words with k maximum contiguous vowels.java
├── Number of distinct Words with k maximum contiguous vowels - GFG/
│   ├── README.md
│   └── number-of-distinct-words-with-k-maximum-contiguous-vowels.java
├── Number of positive integral solutions - GFG/
│   ├── README.md
│   └── number-of-positive-integral-solutions.py
├── Number of ways - GFG/
│   ├── README.md
│   └── number-of-ways.java
├── Number-of-ways-to-arrive-destination/
│   ├── Solution.cpp
│   └── question.md
├── Numbers-With-Same-Consecutive-Differences.cpp
├── Occurence of Each Number.java
├── Odd Even Rule.java
├── POTD_gfg_The_Bit_Game .py
├── Pair With Given Difference.java
├── Pairs With Given Xor.java
├── Pairs of Non Coinciding Points - GFG/
│   ├── README.md
│   └── pairs-of-non-coinciding-points.java
├── Palindrome List.java
├── Palindrome Numbers.java
├── Palindrome Partitioning II.java
├── Palindrome Partitioning.java
├── Palindromic Substrings.java
├── Palindromic Time.java
├── Palindromic Words.java
├── Partition Array According to Given Pivot.java
├── Partition Labels .cpp
├── Partition List.java
├── Partition a Linked List around a given value - GFG/
│   ├── README.md
│   └── partition-a-linked-list-around-a-given-value.java
├── Partition a number into two divisible parts - GFG/
│   ├── README.md
│   └── partition-a-number-into-two-divisible-parts.java
├── Partition array to K subsets - GFG/
│   ├── README.md
│   ├── partition-array-to-k-subsets.java
│   └── partition-array-to-k-subsets.py
├── Partition array to K subsets.java
├── Party in Town - GFG/
│   ├── README.md
│   └── party-in-town.java
├── Pascal's Triangle.java
├── Path in Directed Graph.java
├── Path in Matrix.java
├── Path to Given Node.java
├── Path with good nodes!.java
├── Perfect Peak of Array.java
├── Permutation in String.java
├── Permutation with Spaces - GFG/
│   ├── README.md
│   └── permutation-with-spaces.java
├── Permutations.java
├── Polynomial Addition - GFG/
│   ├── README.md
│   └── polynomial-addition.java
├── Positive Negative Pair
├── Postorder Traversal (Iterative).java
├── Postorder Traversal.py
├── Pots of Gold Game.java
├── Power Of 2 and Subsequences GFG/
│   └── powerOf2Sub.cpp
├── Power Of 2 and Subsequences.cpp
├── Power Of 2 and Subsequences.java
├── Power Of 2 and Subsequences.py
├── Power of 2 and Subsequences.cpp
├── Power of 2 and Subsequences.java
├── Power-of-2-&-Subsequences/
│   ├── Solution.cpp
│   └── question.md
├── Preorder Traversal.java
├── Preorder to BST.java
├── Previous number in one swap - GFG/
│   ├── README.md
│   └── previous-number-in-one-swap.py
├── Prim's_Algorithm.cpp
├── Prime Sum.java
├── Print Diagonally - GFG/
│   ├── README.md
│   └── print-diagonally.java
├── Print Pattern using String.java
├── Print the pattern gfg sep_4.cpp
├── Print the pattern.java
├── Probability of Knight - GFG/
│   ├── README.md
│   └── probability-of-knight.java
├── Product of Digits.java
├── Product of Primes - GFG/
│   ├── README.md
│   └── product-of-primes.java
├── Profit Maximisation.java
├── Pythagorean Triplets.java
├── Queries on Strings - GFG/
│   ├── README.md
│   └── queries-on-strings.java
├── Queries on a Matrix.java
├── Queue using two Stacks.java
├── QuickSort on Doubly Linked List.java
├── README.md
├── Rank The Permutations - GFG/
│   ├── README.md
│   └── rank-the-permutations.java
├── Rat Maze With Multiple Jumps - GFG/
│   ├── README.md
│   └── rat-maze-with-multiple-jumps.java
├── Reaching the heights - GFG/
│   ├── README.md
│   └── reaching-the-heights.java
├── Rearrange Geek and his Classmates.java
├── Recursively remove all adjacent duplicates - GFG/
│   ├── README.md
│   └── recursively-remove-all-adjacent-duplicates.java
├── Redundant Braces.java
├── Region in BinaryMatrix.java
├── Remove Consecutive Characters.java
├── Remove Covered Intervals.java
├── Remove Duplicates from Sorted Array II.java
├── Remove Duplicates from Sorted List II.java
├── Remove Duplicates from Sorted List.java
├── Remove Half Nodes.java
├── Remove K Digits.java
├── Remove Nth Node from List End.java
├── Remove leading zeros from an IP address.java
├── Repeat and Missing Number Array.java
├── Repeated Character.java
├── Replace every element with the least greater element on its right - GFG/
│   ├── README.md
│   └── replace-every-element-with-the-least-greater-element-on-its-right.java
├── Return two prime numbers.java
├── Reverse Bits.java
├── Reverse First K elements of Queue
├── Reverse Level Order.java
├── Reverse Spiral Form of Matrix - GFG/
│   ├── README.md
│   └── reverse-spiral-form-of-matrix.java
├── Reverse a Stack using Recursion.cpp
├── Reverse a string using Stack.java
├── Reverse a sublist of a linked list - GFG/
│   ├── README.md
│   └── reverse-a-sublist-of-a-linked-list.java
├── Reverse array in groups(GFG))
├── Reverse the String.cpp
├── Reverse the String.java
├── Reverse-Interger.java
├── Richest Customer Wealth.java
├── RightView in a Binary Tree
├── Robot Bounded In Circle
├── Robots.java
├── Roman To Integer.java
├── Root to Leaf Paths With Sum.java
├── Rotate Image.cpp
├── Rotate List.java
├── Rotate Matrix.java
├── Salutes.java
├── Save Your Life - GFG/
│   ├── README.md
│   └── save-your-life.java
├── Score of Parentheses.java
├── Search for a Range.java
├── Search in Bitonic Array!.java
├── Search insert position of K in a sorted array - GFG/
│   ├── README.md
│   └── search-insert-position-of-k-in-a-sorted-array.java
├── Searching all indices for matching substring.py
├── Segregate 0s and 1s in an array.java
├── Self Permutation.java
├── Sequential Digits.java
├── Serialize.java
├── Shop in Candy Store - GFG/
│   ├── README.md
│   └── shop-in-candy-store.java
├── Shortest Distance in a Binary Maze - GFG/
│   ├── README.md
│   └── shortest-distance-in-a-binary-maze.java
├── Shortest Path Visiting All Nodes.java
├── Shortest Path between Cities - GFG/
│   ├── README.md
│   └── shortest-path-between-cities.java
├── Shortest Uncommon Subsequence - GFG/
│   ├── README.md
│   ├── shortest-uncommon-subsequence.cpp
│   └── shortest-uncommon-subsequence.java
├── Shortest Unique prefix for every word.java
├── Shortest_distance_in_Directed_acyclic_graph.cpp
├── Simplify Path.java
├── Single Element in Sorted Array.py
├── Single Number II.java
├── Single Number.java
├── Sliding Window Maximum.java
├── Smaller on Left - GFG/
│   ├── README.md
│   └── smaller-on-left.java
├── Smallest Subset With Greater Sum.Java
├── Smallest Subset With Greater Sum.java
├── Smallest Subset with Greater Sum GFG/
│   └── SmallestSubsetWithGreterSum.cpp
├── Smallest Subset with Greater Sum gfg s15.cpp
├── Smallest Subset with Greater Sum.Cpp
├── Smallest Subset with Greater Sum.java
├── Smallest Subset with Max Sum.py
├── Smallest Value of the Rearranged Number.java
├── Smallest distinct window - GFG/
│   └── README.md
├── Smallest factorial number - GFG/
│   ├── README.md
│   └── smallest-factorial-number.java
├── Smallest greater elements in whole array - GFG/
│   ├── README.md
│   └── smallest-greater-elements-in-whole-array.java
├── Smallest number on left gfg med.cpp
├── Smallest number on left.cpp
├── Smallest number on left.java
├── Smallest number with sum of digits as N and divisible by 10^N.cpp
├── Smallest number with sum of digits as N and divisible by 10^N.java
├── Smallest number with sum of digits as N and divisible by 10^N.py
├── Smallest number with sum of digits as N and divisible by 10powerN.cpp
├── Smallest sum contiguous subarray.cpp
├── Smallest sum contiguous subarray.java
├── Smallest sum contiguous subarray.py
├── Smallest window containing 0, 1 and 2.java
├── SmallestNumberWithSumOfDigitsAsNAndDivisbileBy10ToThePowerN.java
├── Solve-the-Sudoku - GFG/
│   └── Solve-the-Sudoku.java
├── Sort Binary Linked List.java
├── Sort Even and Odd Indices Independently.java
├── Sort List.java
├── Sort by Set Bit Count.java
├── Sorted Array To Balanced BST.java
├── Sorted Insert Position.java
├── Sorted Link List to BST - GFG/
│   └── README.md
├── Special Matrix.java
├── Spidey Sense.java
├── Spiral Matrix.java
├── Spiral Order Matrix II.java
├── Split_Array_Into_Consecutive_subsequence.java
├── Square Root of Integer.java
├── Stack Permutation med gfg sep7.cpp
├── Stack Permutations [GFG POTD(07-09-22)].java
├── Stack Permutations.java
├── Stack Permutations.py
├── Step by Step.java
├── Stepping Numbers - GFG/
│   ├── README.md
│   └── stepping-numbers.java
├── Steps by Knight
├── Stock buy and sell - GFG/
│   └── Stock buy and sell.cpp
├── Stone Game IV.java
├── String And Its Frequency.java
├── String formation from substring - GFG/
│   ├── README.md
│   └── string-formation-from-substring.java
├── String to Integer (atoi).java
├── Subarray Sum Equals K.java
├── Subarray with equal occurences!.java
├── Subarray with given sum - GFG/
│   └── Subarray with given sum.cpp
├── Subset.java
├── Subsets II.java
├── Subsets with XOR value - GFG/
│   ├── README.md
│   └── subsets-with-xor-value.java
├── Subsets.java
├── Sum Of k smallest elements in BST.java
├── Sum Root to Leaf Numbers.java
├── Sum of 7's Multiple.java
├── Sum of K smallest elements  in BST.cpp
├── Sum of Root To Leaf Binary Numbers.java
├── Sum of elements between k1'th and k2'th smallest elements - GFG/
│   ├── README.md
│   └── sum-of-elements-between-k1th-and-k2th-smallest-elements.java
├── Sum of k smallest elements in BST.cpp
├── Sum of k smallest elements in BST.java
├── Sum of nodes within k distance from target - GFG/
│   ├── README.md
│   └── sum-of-nodes-within-k-distance-from-target.java
├── Sum of two large numbers.cpp
├── Sum of two large numbers.java
├── Sum of two numbers without using arithmetic operators - GFG/
│   ├── README.md
│   └── sum-of-two-numbers-without-using-arithmetic-operators.java
├── Summary Ranges.java
├── Super Primes - GFG/
│   ├── README.md
│   └── super-primes.java
├── Swap Bits.java
├── Swap Kth nodes from ends - GFG/
│   ├── README.md
│   └── swap-kth-nodes-from-ends.java
├── Swap Nodes in Pairs.java
├── Swap bits - GFG/
│   ├── README.md
│   └── swap-bits.java
├── Symmetric Binary Tree.java
├── The Bit Game easy s24.cpp
├── The bit Game.cpp
├── Theft at World Bank - GFG/
│   ├── README.md
│   └── theft-at-world-bank.java
├── Topo_sort.cpp
├── Total Moves For Bishop!.java
├── Towers_CSES.cpp
├── Trailing Zeroes.java
├── Transfiguration.java
├── Transform String - GFG/
│   └── README.md
├── Tree Path Sum.java
├── Triangle and Square - GFG/
│   ├── README.md
│   └── triangle-and-square.java
├── Tricky Subset Problem - GFG/
│   ├── README.md
│   └── tricky-subset-problem.java
├── Two Sum.java
├── Two Sum.py
├── UTF-8-Validation med lc.cpp
├── Union-Find - GFG/
│   ├── README.md
│   └── union-find.java
├── Unique Subsets - GFG/
│   ├── README.md
│   └── unique-subsets.java
├── Unit Area of largest region of 1's.cpp
├── Unit Area of largest region of 1's.java
├── Valid Binary Search Tree.java
├── Valid Mountain Array.java
├── Valid Parentheses.java
├── Valid Password.java
├── Validate Stack Sequences.java
├── Verify Prime.java
├── Vertical Sum of a Binary Tree.java
├── Villain Con - GFG/
│   ├── README.md
│   └── villain-con.java
├── Vowel and Consonant Substrings!.java
├── Wave Array.java
├── Ways to Decode.java
├── Window String.java
├── Word Break - Part 2 - GFG/
│   ├── README.md
│   └── word-break-part-2.java
├── Word Break II.cpp
├── Word Break II.java
├── Word Break.java
├── Word Count.py
├── Word Ladder I.cpp
├── Word Ladder II.py
├── Word Ladder.java
├── Word Pattern.java
├── Word Wrap - GFG/
│   ├── README.md
│   └── word-wrap.java
├── X Total Shapes.java
├── XOR Game.java
├── XOR-ing the Subarrays!.java
├── ZigZag Level Order Traversal BT.java
├── Zigzag String.java
├── alternate positive and negative.cpp
├── check if array is sorted and rotated/
│   └── check-if-array-is-rotated-and-sorted.cpp
├── depth first search.cpp
├── rotate-array/
│   └── rotate-array.cpp
├── sorting-characters-by-frequency/
│   └── sorting-characters-by-frequency.cpp
├── split array into consecutive subsequences/
│   └── split-array-into-consecutive-subsequences.cpp
├── string-to-integer(atoi)/
│   └── string-to-integer(atoi).cpp
├── sum of k smallest elements in  BST.cpp
└── valid parenthesis.java

================================================
FILE CONTENTS
================================================

================================================
FILE: .github/ISSUE_TEMPLATE/custom.md
================================================
---
name: Custom issue template
about: Describe this issue template's purpose here.
title: ''
labels: ''
assignees: ''

---




================================================
FILE: .github/pull_request_template.md
================================================
**Please fill the details before contributing.**

<!-- These are the comment to assist you better, anything you put inside these standard html tags is not visible to us-->
<!-- Use [x] to mark as checked -->

# ⚠️Important!!
<!--NOTE: Your PR will be marked as SPAM if you check this without actually reading the mentioned file or creating a wrong PR after reading it.-->
<!--You will be disqualified from Hacktoberfest after 2+ spam reports!-->
- [ ] Done reading [CONTRIBUTING.md](https://github.com/Sagar0-0/DsA/blob/main/CONTRIBUTING.md)?<!--MUST READ-->

# Adding Code PRs?🔥<!-- If adding new code files, only then fill this portion-->
⚠️Do not add multiple files for the same solution!!!
- [ ] Added problem statement(Readme.md) with solution?<!--Choice-->
<!--Check one out or these two-->
- [ ] Contributing new file?
- [ ] Appending your code in already existing file?

### From Platform:
<!--Check one out of these three-->
- [ ] Leetcode 
- [ ] GFG 
- [ ] Interviewbit
- [ ] Others(only acceptable after DISCUSSIONS)

# Migration PRs?🤝<!-- ONLY fill out this portion, If helping in migrating old code files in their respective directories -->

- [ ] Done deleteing file from home directory?<!--MUST-->
- [ ] Added file with correct name and correct directory?<!--MUST-->



================================================
FILE: 0012-integer-to-roman/0012-integer-to-roman.java
================================================
class Solution {
    
   
    public String intToRoman(int num) {
       
         int[] val = { 1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1 };
    String[] code = { "M", "CM", "D", "CD", "C", "XC", "L", "XL", "X", "IX", "V", "IV", "I" };

        
        StringBuilder sb = new StringBuilder();

        while (num > 0) {

            for (int i = 0; i < 13; i++) {

                if (num >= val[i]) {

                    num -= val[i];
                    sb.append(code[i]);
                    break;
                }
            }
        }

        return sb.toString();

    }
}

================================================
FILE: 0012-integer-to-roman/0012-integer-to-roman.py
================================================
class Solution:
    def intToRoman(self, num: int) -> str:
        d = {1000: 'M', 900: 'CM', 500: 'D', 400: 'CD', 100: 'C', 90: 'XC', 50: 'L', 40: 'XL', 10: 'X', 9: 'IX', 5: 'V', 4: 'IV', 1: 'I'}
        res = ''
        for k in d:
            while num >= k:
                res += d[k]
                num -= k
        return res

================================================
FILE: 0012-integer-to-roman/NOTES.md
================================================
​

================================================
FILE: 0012-integer-to-roman/README.md
================================================
<h2><a href="https://leetcode.com/problems/integer-to-roman/">12. Integer to Roman</a></h2><h3>Medium</h3><hr><div><p>Roman numerals are represented by seven different symbols:&nbsp;<code>I</code>, <code>V</code>, <code>X</code>, <code>L</code>, <code>C</code>, <code>D</code> and <code>M</code>.</p>

<pre><strong>Symbol</strong>       <strong>Value</strong>
I             1
V             5
X             10
L             50
C             100
D             500
M             1000</pre>

<p>For example,&nbsp;<code>2</code> is written as <code>II</code>&nbsp;in Roman numeral, just two one's added together. <code>12</code> is written as&nbsp;<code>XII</code>, which is simply <code>X + II</code>. The number <code>27</code> is written as <code>XXVII</code>, which is <code>XX + V + II</code>.</p>

<p>Roman numerals are usually written largest to smallest from left to right. However, the numeral for four is not <code>IIII</code>. Instead, the number four is written as <code>IV</code>. Because the one is before the five we subtract it making four. The same principle applies to the number nine, which is written as <code>IX</code>. There are six instances where subtraction is used:</p>

<ul>
	<li><code>I</code> can be placed before <code>V</code> (5) and <code>X</code> (10) to make 4 and 9.&nbsp;</li>
	<li><code>X</code> can be placed before <code>L</code> (50) and <code>C</code> (100) to make 40 and 90.&nbsp;</li>
	<li><code>C</code> can be placed before <code>D</code> (500) and <code>M</code> (1000) to make 400 and 900.</li>
</ul>

<p>Given an integer, convert it to a roman numeral.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>

<pre><strong>Input:</strong> num = 3
<strong>Output:</strong> "III"
<strong>Explanation:</strong> 3 is represented as 3 ones.
</pre>

<p><strong class="example">Example 2:</strong></p>

<pre><strong>Input:</strong> num = 58
<strong>Output:</strong> "LVIII"
<strong>Explanation:</strong> L = 50, V = 5, III = 3.
</pre>

<p><strong class="example">Example 3:</strong></p>

<pre><strong>Input:</strong> num = 1994
<strong>Output:</strong> "MCMXCIV"
<strong>Explanation:</strong> M = 1000, CM = 900, XC = 90 and IV = 4.
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>1 &lt;= num &lt;= 3999</code></li>
</ul>
</div>

================================================
FILE: 0026-remove-duplicates-from-sorted-array/0026-remove-duplicates-from-sorted-array.java
================================================
class Solution {
    public int removeDuplicates(int[] nums) {
        int idx=0;
        int i=0;
        while(i<nums.length-1){
            while(i<nums.length-1 && nums[i]==nums[i+1]){
                i++;
            }
            nums[idx]=nums[i];
            idx++;
            i++;
        }
        if(i==nums.length)return idx;
        nums[idx]=nums[i];
        return idx+1;
    }
}

================================================
FILE: 0026-remove-duplicates-from-sorted-array/0026-remove-duplicates-from-sorted-array.py
================================================
class Solution(object):
    def removeDuplicates(self, nums):
        """
        :type nums: List[int]
        :rtype: int
        """
        x = 1
        for i in range(len(nums)-1):
            if(nums[i]!=nums[i+1]):
                nums[x] = nums[i+1]
                x+=1
        return(x)

================================================
FILE: 0026-remove-duplicates-from-sorted-array/NOTES.md
================================================
​

================================================
FILE: 0026-remove-duplicates-from-sorted-array/README.md
================================================
<h2><a href="https://leetcode.com/problems/remove-duplicates-from-sorted-array/">26. Remove Duplicates from Sorted Array</a></h2><h3>Easy</h3><hr><div><p>Given an integer array <code>nums</code> sorted in <strong>non-decreasing order</strong>, remove the duplicates <a href="https://en.wikipedia.org/wiki/In-place_algorithm" target="_blank"><strong>in-place</strong></a> such that each unique element appears only <strong>once</strong>. The <strong>relative order</strong> of the elements should be kept the <strong>same</strong>.</p>

<p>Since it is impossible to change the length of the array in some languages, you must instead have the result be placed in the <strong>first part</strong> of the array <code>nums</code>. More formally, if there are <code>k</code> elements after removing the duplicates, then the first <code>k</code> elements of <code>nums</code>&nbsp;should hold the final result. It does not matter what you leave beyond the first&nbsp;<code>k</code>&nbsp;elements.</p>

<p>Return <code>k</code><em> after placing the final result in the first </em><code>k</code><em> slots of </em><code>nums</code>.</p>

<p>Do <strong>not</strong> allocate extra space for another array. You must do this by <strong>modifying the input array <a href="https://en.wikipedia.org/wiki/In-place_algorithm" target="_blank">in-place</a></strong> with O(1) extra memory.</p>

<p><strong>Custom Judge:</strong></p>

<p>The judge will test your solution with the following code:</p>

<pre>int[] nums = [...]; // Input array
int[] expectedNums = [...]; // The expected answer with correct length

int k = removeDuplicates(nums); // Calls your implementation

assert k == expectedNums.length;
for (int i = 0; i &lt; k; i++) {
    assert nums[i] == expectedNums[i];
}
</pre>

<p>If all assertions pass, then your solution will be <strong>accepted</strong>.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>

<pre><strong>Input:</strong> nums = [1,1,2]
<strong>Output:</strong> 2, nums = [1,2,_]
<strong>Explanation:</strong> Your function should return k = 2, with the first two elements of nums being 1 and 2 respectively.
It does not matter what you leave beyond the returned k (hence they are underscores).
</pre>

<p><strong class="example">Example 2:</strong></p>

<pre><strong>Input:</strong> nums = [0,0,1,1,1,2,2,3,3,4]
<strong>Output:</strong> 5, nums = [0,1,2,3,4,_,_,_,_,_]
<strong>Explanation:</strong> Your function should return k = 5, with the first five elements of nums being 0, 1, 2, 3, and 4 respectively.
It does not matter what you leave beyond the returned k (hence they are underscores).
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>1 &lt;= nums.length &lt;= 3 * 10<sup>4</sup></code></li>
	<li><code>-100 &lt;= nums[i] &lt;= 100</code></li>
	<li><code>nums</code> is sorted in <strong>non-decreasing</strong> order.</li>
</ul>
</div>

================================================
FILE: 0036-valid-sudoku/0036-valid-sudoku.java
================================================
class Solution {
    public static boolean isCorrect(char[][] board,int x,int y){
        for(int i=0;i<board.length;i++){
            if(i!=y && board[x][i]==board[x][y]) return false;
            if(i!=x && board[i][y]==board[x][y]) return false;
        }
        int row=(x/3)*3; 
        int col=(y/3)*3;
        for(int i=row;i<row+3;i++){
            for(int j=col;j<col+3;j++){
                if((i!=x && j!=y) && board[i][j]==board[x][y]) return false;
            }
        } 
        return true;
    }

    public boolean isValidSudoku(char[][] board) {
        for(int i=0;i<board.length;i++){
            for(int j=0;j<board.length;j++){
                if(board[i][j]!='.'){
                    if(!isCorrect(board,i,j)){
                        return false;
                    }
                }
            }
        }
        return true;
    }
    
}

================================================
FILE: 0036-valid-sudoku/0036-valid-sudoku.py
================================================
class Solution:
    def isValidSudoku(self, board) -> bool:
        seen = sum(([(c, i), (j, c), (i//3, j//3, c)]
                for i in range(9) for j in range(9)
                for c in [board[i][j]] if c != '.'), [])
        return len(seen) == len(set(seen))

================================================
FILE: 0036-valid-sudoku/NOTES.md
================================================
​

================================================
FILE: 0036-valid-sudoku/README.md
================================================
<h2><a href="https://leetcode.com/problems/valid-sudoku/">36. Valid Sudoku</a></h2><h3>Medium</h3><hr><div><p>Determine if a&nbsp;<code>9 x 9</code> Sudoku board&nbsp;is valid.&nbsp;Only the filled cells need to be validated&nbsp;<strong>according to the following rules</strong>:</p>

<ol>
	<li>Each row&nbsp;must contain the&nbsp;digits&nbsp;<code>1-9</code> without repetition.</li>
	<li>Each column must contain the digits&nbsp;<code>1-9</code>&nbsp;without repetition.</li>
	<li>Each of the nine&nbsp;<code>3 x 3</code> sub-boxes of the grid must contain the digits&nbsp;<code>1-9</code>&nbsp;without repetition.</li>
</ol>

<p><strong>Note:</strong></p>

<ul>
	<li>A Sudoku board (partially filled) could be valid but is not necessarily solvable.</li>
	<li>Only the filled cells need to be validated according to the mentioned&nbsp;rules.</li>
</ul>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/ff/Sudoku-by-L2G-20050714.svg/250px-Sudoku-by-L2G-20050714.svg.png" style="height:250px; width:250px">
<pre><strong>Input:</strong> board = 
[["5","3",".",".","7",".",".",".","."]
,["6",".",".","1","9","5",".",".","."]
,[".","9","8",".",".",".",".","6","."]
,["8",".",".",".","6",".",".",".","3"]
,["4",".",".","8",".","3",".",".","1"]
,["7",".",".",".","2",".",".",".","6"]
,[".","6",".",".",".",".","2","8","."]
,[".",".",".","4","1","9",".",".","5"]
,[".",".",".",".","8",".",".","7","9"]]
<strong>Output:</strong> true
</pre>

<p><strong class="example">Example 2:</strong></p>

<pre><strong>Input:</strong> board = 
[["8","3",".",".","7",".",".",".","."]
,["6",".",".","1","9","5",".",".","."]
,[".","9","8",".",".",".",".","6","."]
,["8",".",".",".","6",".",".",".","3"]
,["4",".",".","8",".","3",".",".","1"]
,["7",".",".",".","2",".",".",".","6"]
,[".","6",".",".",".",".","2","8","."]
,[".",".",".","4","1","9",".",".","5"]
,[".",".",".",".","8",".",".","7","9"]]
<strong>Output:</strong> false
<strong>Explanation:</strong> Same as Example 1, except with the <strong>5</strong> in the top left corner being modified to <strong>8</strong>. Since there are two 8's in the top left 3x3 sub-box, it is invalid.
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>board.length == 9</code></li>
	<li><code>board[i].length == 9</code></li>
	<li><code>board[i][j]</code> is a digit <code>1-9</code> or <code>'.'</code>.</li>
</ul>
</div>

================================================
FILE: 0037-sudoku-solver/0037-sudoku-solver.java
================================================
class Solution {
    public void solveSudoku(char[][] board) {
        dfs(0,0,board);
    }
    boolean dfs(int i,int j,char[][]board){
        if(i==9)return true;
        if(board[i][j]!='.'){
            if(j==8){
                return dfs(i+1,0,board);
            }else{
                return dfs(i,j+1,board);
            }
        }
        
        for(int num=1;num<=9;num++){
            board[i][j]=(char)(num+'0');
            if(safe(board,i,j)){
                boolean ans;
                if(j==8){
                    ans=dfs(i+1,0,board);
                }else{
                    ans=dfs(i,j+1,board);
                }
                if(ans)return true;
            }
            board[i][j]='.';
        }
        
        return false;
    }
    boolean notInRow(char arr[][], int row)
    {
        HashSet<Character> st = new HashSet<>();
        for (int i = 0; i < 9; i++) {
            if (st.contains(arr[row][i]))
                return false;
 
            if (arr[row][i] != '.')
                st.add(arr[row][i]);
        }
        return true;
    }
    boolean notInCol(char arr[][], int col)
    {
        HashSet<Character> st = new HashSet<>();
        for (int i = 0; i < 9; i++) {
            if (st.contains(arr[i][col]))
                return false;
            if (arr[i][col] != '.')
                st.add(arr[i][col]);
        }
        return true;
    }
    boolean notInBox(char arr[][], int startRow, int startCol)
    {
        HashSet<Character> st = new HashSet<>();
 
        for (int row = 0; row < 3; row++) {
            for (int col = 0; col < 3; col++) {
                char curr = arr[row + startRow][col + startCol];
                if (st.contains(curr))
                    return false;
                
                if (curr != '.')
                    st.add(curr);
            }
        }
        return true;
    }
    boolean safe(char arr[][], int row,
                                  int col)
    {
        return notInRow(arr, row) && notInCol(arr, col)
            && notInBox(arr, row - row % 3, col - col % 3);
    }
}

================================================
FILE: 0037-sudoku-solver/NOTES.md
================================================
​

================================================
FILE: 0037-sudoku-solver/README.md
================================================
<h2><a href="https://leetcode.com/problems/sudoku-solver/">37. Sudoku Solver</a></h2><h3>Hard</h3><hr><div><p>Write a program to solve a Sudoku puzzle by filling the empty cells.</p>

<p>A sudoku solution must satisfy <strong>all of the following rules</strong>:</p>

<ol>
	<li>Each of the digits <code>1-9</code> must occur exactly once in each row.</li>
	<li>Each of the digits <code>1-9</code> must occur exactly once in each column.</li>
	<li>Each of the digits <code>1-9</code> must occur exactly once in each of the 9 <code>3x3</code> sub-boxes of the grid.</li>
</ol>

<p>The <code>'.'</code> character indicates empty cells.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/ff/Sudoku-by-L2G-20050714.svg/250px-Sudoku-by-L2G-20050714.svg.png" style="height:250px; width:250px">
<pre><strong>Input:</strong> board = [["5","3",".",".","7",".",".",".","."],["6",".",".","1","9","5",".",".","."],[".","9","8",".",".",".",".","6","."],["8",".",".",".","6",".",".",".","3"],["4",".",".","8",".","3",".",".","1"],["7",".",".",".","2",".",".",".","6"],[".","6",".",".",".",".","2","8","."],[".",".",".","4","1","9",".",".","5"],[".",".",".",".","8",".",".","7","9"]]
<strong>Output:</strong> [["5","3","4","6","7","8","9","1","2"],["6","7","2","1","9","5","3","4","8"],["1","9","8","3","4","2","5","6","7"],["8","5","9","7","6","1","4","2","3"],["4","2","6","8","5","3","7","9","1"],["7","1","3","9","2","4","8","5","6"],["9","6","1","5","3","7","2","8","4"],["2","8","7","4","1","9","6","3","5"],["3","4","5","2","8","6","1","7","9"]]
<strong>Explanation:</strong>&nbsp;The input board is shown above and the only valid solution is shown below:

<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/3/31/Sudoku-by-L2G-20050714_solution.svg/250px-Sudoku-by-L2G-20050714_solution.svg.png" style="height:250px; width:250px">
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>board.length == 9</code></li>
	<li><code>board[i].length == 9</code></li>
	<li><code>board[i][j]</code> is a digit or <code>'.'</code>.</li>
	<li>It is <strong>guaranteed</strong> that the input board has only one solution.</li>
</ul>
</div>

================================================
FILE: 0038-count-and-say/0038-count-and-say.java
================================================
class Solution {
    public String countAndSay(int n) {
        StringBuilder sb = new StringBuilder("1");
        for (int i = 2; i <= n; i++) {
            sb = getNextState(sb);
        }
        return sb.toString();
    }

    private StringBuilder getNextState(StringBuilder curSb) {
        StringBuilder nextSb = new StringBuilder();
        int len = curSb.length();
        int i = 0;
		
        while (i < len) {
            char c = curSb.charAt(i++);
            int count = 1;
            while (i < len && c == curSb.charAt(i)) {
                count++;
                i++;
            }
            nextSb.append(count).append(c);
        }
		
        return nextSb;
    }
}

================================================
FILE: 0038-count-and-say/0038-count-and-say.py
================================================
import re
class Solution:
    def countAndSay(self, n: int) -> str:
        s = '1'
        for _ in range(n - 1):
            s = re.sub(r'(.)\1*', lambda m: str(len(m.group(0))) + m.group(1), s)
        return s

================================================
FILE: 0038-count-and-say/README.md
================================================
<h2><a href="https://leetcode.com/problems/count-and-say/">38. Count and Say</a></h2><h3>Medium</h3><hr><div><p>The <strong>count-and-say</strong> sequence is a sequence of digit strings defined by the recursive formula:</p>

<ul>
	<li><code>countAndSay(1) = "1"</code></li>
	<li><code>countAndSay(n)</code> is the way you would "say" the digit string from <code>countAndSay(n-1)</code>, which is then converted into a different digit string.</li>
</ul>

<p>To determine how you "say" a digit string, split it into the <strong>minimal</strong> number of substrings such that each substring contains exactly <strong>one</strong> unique digit. Then for each substring, say the number of digits, then say the digit. Finally, concatenate every said digit.</p>

<p>For example, the saying and conversion for digit string <code>"3322251"</code>:</p>
<img alt="" src="https://assets.leetcode.com/uploads/2020/10/23/countandsay.jpg" style="width: 581px; height: 172px;">
<p>Given a positive integer <code>n</code>, return <em>the </em><code>n<sup>th</sup></code><em> term of the <strong>count-and-say</strong> sequence</em>.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>

<pre><strong>Input:</strong> n = 1
<strong>Output:</strong> "1"
<strong>Explanation:</strong> This is the base case.
</pre>

<p><strong class="example">Example 2:</strong></p>

<pre><strong>Input:</strong> n = 4
<strong>Output:</strong> "1211"
<strong>Explanation:</strong>
countAndSay(1) = "1"
countAndSay(2) = say "1" = one 1 = "11"
countAndSay(3) = say "11" = two 1's = "21"
countAndSay(4) = say "21" = one 2 + one 1 = "12" + "11" = "1211"
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>1 &lt;= n &lt;= 30</code></li>
</ul>
</div>

================================================
FILE: 0049-group-anagrams/0049-group-anagrams.java
================================================
class Solution {
    public List<List<String>> groupAnagrams(String[] strs) {
        Set<Map<Character,Integer>> set=new HashSet<>();
        Map<Map<Character,Integer>,Integer>map=new HashMap<>();
        List<List<String>> ans=new ArrayList<>();
        for(String s:strs){
            Map<Character,Integer> curr=new HashMap<>();
            for(char c:s.toCharArray()){
                curr.put(c,curr.getOrDefault(c,0)+1);
            }
            if(set.contains(curr)){
                int idx=map.get(curr);
                ans.get(idx).add(s);
            }else{
                set.add(curr);
                ans.add(new ArrayList<>());
                ans.get(ans.size()-1).add(s);
                map.put(curr,ans.size()-1);
            }
        }
        return ans;
    }
}

================================================
FILE: 0049-group-anagrams/0049-group-anagrams.py
================================================
from collections import defaultdict

class Solution:
    def groupAnagrams(self, strs):
        letters_to_words = defaultdict(list)
        for word in strs:
            letters_to_words[tuple(sorted(word))].append(word)
        return list(letters_to_words.values())

================================================
FILE: 0049-group-anagrams/README.md
================================================
<h2><a href="https://leetcode.com/problems/group-anagrams/">49. Group Anagrams</a></h2><h3>Medium</h3><hr><div><p>Given an array of strings <code>strs</code>, group <strong>the anagrams</strong> together. You can return the answer in <strong>any order</strong>.</p>

<p>An <strong>Anagram</strong> is a word or phrase formed by rearranging the letters of a different word or phrase, typically using all the original letters exactly once.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>
<pre><strong>Input:</strong> strs = ["eat","tea","tan","ate","nat","bat"]
<strong>Output:</strong> [["bat"],["nat","tan"],["ate","eat","tea"]]
</pre><p><strong class="example">Example 2:</strong></p>
<pre><strong>Input:</strong> strs = [""]
<strong>Output:</strong> [[""]]
</pre><p><strong class="example">Example 3:</strong></p>
<pre><strong>Input:</strong> strs = ["a"]
<strong>Output:</strong> [["a"]]
</pre>
<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>1 &lt;= strs.length &lt;= 10<sup>4</sup></code></li>
	<li><code>0 &lt;= strs[i].length &lt;= 100</code></li>
	<li><code>strs[i]</code> consists of lowercase English letters.</li>
</ul>
</div>

================================================
FILE: 0055-jump-game/0055-jump-game.java
================================================
class Solution {
    public boolean canJump(int[] nums) {
        int maxReachableDistance=nums[0];
        int i=1;
        while(maxReachableDistance>=i && i<nums.length){
            maxReachableDistance=Math.max(maxReachableDistance,nums[i]+i);
            i++;
        }
        return maxReachableDistance>=nums.length-1;
        
    }
}

================================================
FILE: 0055-jump-game/0055-jump-game.py
================================================
class Solution:
    def canJump(self, nums: List[int]) -> bool:
        if len(nums) <= 1:
            return True
        j = len(nums) - 2
        i = len(nums) - 1    
        while j > -1:
            if j + nums[j] >= i:
                i = j
                j -= 1
                
            else:
                j -= 1
        #print('i', i, 'j', j)
        if i <= 0:
            return True
        else:
            return False

================================================
FILE: 0055-jump-game/NOTES.md
================================================
​

================================================
FILE: 0055-jump-game/README.md
================================================
<h2><a href="https://leetcode.com/problems/jump-game/">55. Jump Game</a></h2><h3>Medium</h3><hr><div><p>You are given an integer array <code>nums</code>. You are initially positioned at the array's <strong>first index</strong>, and each element in the array represents your maximum jump length at that position.</p>

<p>Return <code>true</code><em> if you can reach the last index, or </em><code>false</code><em> otherwise</em>.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>

<pre><strong>Input:</strong> nums = [2,3,1,1,4]
<strong>Output:</strong> true
<strong>Explanation:</strong> Jump 1 step from index 0 to 1, then 3 steps to the last index.
</pre>

<p><strong class="example">Example 2:</strong></p>

<pre><strong>Input:</strong> nums = [3,2,1,0,4]
<strong>Output:</strong> false
<strong>Explanation:</strong> You will always arrive at index 3 no matter what. Its maximum jump length is 0, which makes it impossible to reach the last index.
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>1 &lt;= nums.length &lt;= 10<sup>4</sup></code></li>
	<li><code>0 &lt;= nums[i] &lt;= 10<sup>5</sup></code></li>
</ul>
</div>

================================================
FILE: 0057-insert-interval/0057-insert-interval.java
================================================
class Solution {
    public int[][] insert(int[][] intervals, int[] newInterval) {
        List<int[]> inter = new ArrayList<>(intervals.length);

        for(int[] curr : intervals){
            if(curr[0] > newInterval[1]){
                inter.add(newInterval);
                newInterval = curr;
            }
            else if(curr[1] < newInterval[0]){
                inter.add(curr);
            }
            else{
                int st = Math.min(curr[0],newInterval[0]);
                int end = Math.max(curr[1],newInterval[1]);
                newInterval[0] = st;
                newInterval[1] = end;
            }
        }
        inter.add(newInterval);

        int[][] retu = new int[inter.size()][];
        for(int i=0;i<inter.size();i++){
            retu[i] = inter.get(i);
        }
        return retu;
    }
}

================================================
FILE: 0057-insert-interval/0057-insert-interval.py
================================================
class Solution:
    def insert(self, intervals, newInterval):
        res = []
        i = 0
        n = len(intervals)
        while i < n and intervals[i][1] < newInterval[0]:
            res.append(intervals[i])
            i += 1
        while i < n and intervals[i][0] <= newInterval[1]:
            newInterval[0] = min(intervals[i][0], newInterval[0])
            newInterval[1] = max(intervals[i][1], newInterval[1])
            i += 1
        res.append(newInterval)
        while i < n:
            res.append(intervals[i])
            i += 1
        return res

================================================
FILE: 0057-insert-interval/NOTES.md
================================================
​

================================================
FILE: 0057-insert-interval/README.md
================================================
<h2><a href="https://leetcode.com/problems/insert-interval/">57. Insert Interval</a></h2><h3>Medium</h3><hr><div><p>You are given an array of non-overlapping intervals <code>intervals</code> where <code>intervals[i] = [start<sub>i</sub>, end<sub>i</sub>]</code> represent the start and the end of the <code>i<sup>th</sup></code> interval and <code>intervals</code> is sorted in ascending order by <code>start<sub>i</sub></code>. You are also given an interval <code>newInterval = [start, end]</code> that represents the start and end of another interval.</p>

<p>Insert <code>newInterval</code> into <code>intervals</code> such that <code>intervals</code> is still sorted in ascending order by <code>start<sub>i</sub></code> and <code>intervals</code> still does not have any overlapping intervals (merge overlapping intervals if necessary).</p>

<p>Return <code>intervals</code><em> after the insertion</em>.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>

<pre><strong>Input:</strong> intervals = [[1,3],[6,9]], newInterval = [2,5]
<strong>Output:</strong> [[1,5],[6,9]]
</pre>

<p><strong class="example">Example 2:</strong></p>

<pre><strong>Input:</strong> intervals = [[1,2],[3,5],[6,7],[8,10],[12,16]], newInterval = [4,8]
<strong>Output:</strong> [[1,2],[3,10],[12,16]]
<strong>Explanation:</strong> Because the new interval [4,8] overlaps with [3,5],[6,7],[8,10].
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>0 &lt;= intervals.length &lt;= 10<sup>4</sup></code></li>
	<li><code>intervals[i].length == 2</code></li>
	<li><code>0 &lt;= start<sub>i</sub> &lt;= end<sub>i</sub> &lt;= 10<sup>5</sup></code></li>
	<li><code>intervals</code> is sorted by <code>start<sub>i</sub></code> in <strong>ascending</strong> order.</li>
	<li><code>newInterval.length == 2</code></li>
	<li><code>0 &lt;= start &lt;= end &lt;= 10<sup>5</sup></code></li>
</ul>
</div>

================================================
FILE: 0070-climbing-stairs/0070-climbing-stairs.java
================================================
class Solution {
    public int climbStairs(int n) {
        if (n < 3) return n;
        int oneStep = 1, twoStep = 2;
        for (int i = 3; i <= n; i++) {
            int count = oneStep + twoStep;
            oneStep = twoStep;
            twoStep = count;
        }
        return twoStep;
    }
}

================================================
FILE: 0070-climbing-stairs/NOTES.md
================================================
​

================================================
FILE: 0070-climbing-stairs/README.md
================================================
<h2><a href="https://leetcode.com/problems/climbing-stairs/">70. Climbing Stairs</a></h2><h3>Easy</h3><hr><div><p>You are climbing a staircase. It takes <code>n</code> steps to reach the top.</p>

<p>Each time you can either climb <code>1</code> or <code>2</code> steps. In how many distinct ways can you climb to the top?</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>

<pre><strong>Input:</strong> n = 2
<strong>Output:</strong> 2
<strong>Explanation:</strong> There are two ways to climb to the top.
1. 1 step + 1 step
2. 2 steps
</pre>

<p><strong class="example">Example 2:</strong></p>

<pre><strong>Input:</strong> n = 3
<strong>Output:</strong> 3
<strong>Explanation:</strong> There are three ways to climb to the top.
1. 1 step + 1 step + 1 step
2. 1 step + 2 steps
3. 2 steps + 1 step
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>1 &lt;= n &lt;= 45</code></li>
</ul>
</div>

================================================
FILE: 0076-minimum-window-substring/0076-minimum-window-substring.java
================================================
class Solution {
    public String minWindow(String s, String t) {
        int[] cs = new int[256];
        for (char ch : t.toCharArray()) {
            cs[ch]++;
        }
        int l = 0, r = 0, cnt = t.length();
        int start = -1, end = s.length(); // substring [start, end)
        while (r < s.length()) {
            if (cs[s.charAt(r++)]-- > 0) {
                cnt--;
            }
            while (cnt == 0) {
                if (cs[s.charAt(l++)]++ == 0) {
                    cnt++;
                }
                if (r - l + 1 < end - start) {
                    start = l - 1;
                    end = r;
                }
            }
        }
        return end - start > s.length() ? "" : s.substring(start, end);
    }
}

================================================
FILE: 0076-minimum-window-substring/NOTES.md
================================================
​

================================================
FILE: 0076-minimum-window-substring/README.md
================================================
<h2><a href="https://leetcode.com/problems/minimum-window-substring/">76. Minimum Window Substring</a></h2><h3>Hard</h3><hr><div><p>Given two strings <code>s</code> and <code>t</code> of lengths <code>m</code> and <code>n</code> respectively, return <em>the <strong>minimum window substring</strong> of </em><code>s</code><em> such that every character in </em><code>t</code><em> (<strong>including duplicates</strong>) is included in the window. If there is no such substring</em><em>, return the empty string </em><code>""</code><em>.</em></p>

<p>The testcases will be generated such that the answer is <strong>unique</strong>.</p>

<p>A <strong>substring</strong> is a contiguous sequence of characters within the string.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>

<pre><strong>Input:</strong> s = "ADOBECODEBANC", t = "ABC"
<strong>Output:</strong> "BANC"
<strong>Explanation:</strong> The minimum window substring "BANC" includes 'A', 'B', and 'C' from string t.
</pre>

<p><strong class="example">Example 2:</strong></p>

<pre><strong>Input:</strong> s = "a", t = "a"
<strong>Output:</strong> "a"
<strong>Explanation:</strong> The entire string s is the minimum window.
</pre>

<p><strong class="example">Example 3:</strong></p>

<pre><strong>Input:</strong> s = "a", t = "aa"
<strong>Output:</strong> ""
<strong>Explanation:</strong> Both 'a's from t must be included in the window.
Since the largest window of s only has one 'a', return empty string.
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>m == s.length</code></li>
	<li><code>n == t.length</code></li>
	<li><code>1 &lt;= m, n&nbsp;&lt;= 10<sup>5</sup></code></li>
	<li><code>s</code> and <code>t</code> consist of uppercase and lowercase English letters.</li>
</ul>

<p>&nbsp;</p>
<p><strong>Follow up:</strong> Could you find an algorithm that runs in <code>O(m + n)</code> time?</p>
</div>

================================================
FILE: 0079-word-search/0079-word-search.java
================================================
class Solution {
    int[][] dirs = new int[][] {{0, 1}, {1, 0}, {0, -1}, {-1, 0}};
    
    public boolean exist(char[][] board, String word) {
        int[] alphFreqForBoard = new int[26]; 
        int[] alphFreqForWord = new int[26]; 
        
        for (char cc : word.toCharArray()) {
            alphFreqForWord[cc - 'A']++; 
        }
        
        for (char[] row : board) {
            for (char c : row) {
                alphFreqForBoard[c - 'A']++; 
            }
        }
        
        for (char cc : word.toCharArray()) {
            if (alphFreqForBoard[cc - 'A'] < alphFreqForWord[cc - 'A']) {
                return false; 
            }
        }
        
        if (alphFreqForBoard[word.charAt(0) - 'A'] > alphFreqForWord[word.charAt(word.length() - 1) - 'A']) {
            word = new StringBuilder(word).reverse().toString();
        }
        
        for(int i = 0; i < board.length; i++) {
            for(int j = 0; j < board[i].length; j++) {
                if(dfs(board, word, i, j, 0)) {
                    return true;
                }
            }
        }
        
        return false;
    }
    
    private boolean dfs(char[][] board, String word, int i, int j, int ci) {
        if(ci == word.length()) {
            return true;
        }
        
        if(i < 0 || i >= board.length || j < 0 || j >= board[0].length) {
            return false;
        }
        
        char c = board[i][j];
        
        if(c != word.charAt(ci) || c == '#') {
            return false;
        }
        
        board[i][j] = '#';
        
        for(int[] dir : dirs) {
            if(dfs(board, word, i + dir[0], j + dir[1], ci + 1)) {
                board[i][j] = c; // Restore the original character
                return true;
            }
        }
        
        board[i][j] = c; // Restore the original character
        
        return false;
    }
}


================================================
FILE: 0079-word-search/NOTES.md
================================================
​

================================================
FILE: 0079-word-search/README.md
================================================
<h2><a href="https://leetcode.com/problems/word-search/">79. Word Search</a></h2><h3>Medium</h3><hr><div><p>Given an <code>m x n</code> grid of characters <code>board</code> and a string <code>word</code>, return <code>true</code> <em>if</em> <code>word</code> <em>exists in the grid</em>.</p>

<p>The word can be constructed from letters of sequentially adjacent cells, where adjacent cells are horizontally or vertically neighboring. The same letter cell may not be used more than once.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>
<img alt="" src="https://assets.leetcode.com/uploads/2020/11/04/word2.jpg" style="width: 322px; height: 242px;">
<pre><strong>Input:</strong> board = [["A","B","C","E"],["S","F","C","S"],["A","D","E","E"]], word = "ABCCED"
<strong>Output:</strong> true
</pre>

<p><strong class="example">Example 2:</strong></p>
<img alt="" src="https://assets.leetcode.com/uploads/2020/11/04/word-1.jpg" style="width: 322px; height: 242px;">
<pre><strong>Input:</strong> board = [["A","B","C","E"],["S","F","C","S"],["A","D","E","E"]], word = "SEE"
<strong>Output:</strong> true
</pre>

<p><strong class="example">Example 3:</strong></p>
<img alt="" src="https://assets.leetcode.com/uploads/2020/10/15/word3.jpg" style="width: 322px; height: 242px;">
<pre><strong>Input:</strong> board = [["A","B","C","E"],["S","F","C","S"],["A","D","E","E"]], word = "ABCB"
<strong>Output:</strong> false
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>m == board.length</code></li>
	<li><code>n = board[i].length</code></li>
	<li><code>1 &lt;= m, n &lt;= 6</code></li>
	<li><code>1 &lt;= word.length &lt;= 15</code></li>
	<li><code>board</code> and <code>word</code> consists of only lowercase and uppercase English letters.</li>
</ul>

<p>&nbsp;</p>
<p><strong>Follow up:</strong> Could you use search pruning to make your solution faster with a larger <code>board</code>?</p>
</div>

================================================
FILE: 0093-restore-ip-addresses/0093-restore-ip-addresses.java
================================================
class Solution {
    private boolean valid(String s, int start, int length) {
        return length == 1 || 
            (s.charAt(start) != '0' && 
             (length < 3 || 
              s.substring(start, start + length).compareTo("255") <= 0));
    }
    
    private void helper(String s, int startIndex, List<Integer> dots, List<String> ans) {
        final int remainingLength = s.length() - startIndex;
        final int remainingNumberOfIntegers = 4 - dots.size();
        if (remainingLength > remainingNumberOfIntegers * 3 || 
            remainingLength < remainingNumberOfIntegers) {
            return;
        }
        if (dots.size() == 3) {
            if (valid(s, startIndex, remainingLength)) {
                StringBuilder sb = new StringBuilder();
                int last = 0;
                for (Integer dot : dots) {
                    sb.append(s.substring(last, last + dot));
                    last += dot;
                    sb.append('.');
                }
                sb.append(s.substring(startIndex));
                ans.add(sb.toString());
            }
            return;
        }
        for (int curPos = 1; curPos <= 3 && curPos <= remainingLength; ++curPos) {
            // Append a dot at the current position.
            dots.add(curPos);
            // Try making all combinations with the remaining string.
            if (valid(s, startIndex, curPos)) {
                helper(s, startIndex + curPos, dots, ans);
            }
            // Backtrack, i.e. remove the dot to try placing it at the next position.
            dots.remove(dots.size() - 1);
        }
    }
    
    public List<String> restoreIpAddresses(String s) {
        List<String> ans = new ArrayList<>();
        helper(s, 0, new ArrayList<>(), ans);
        return ans;   
    }
}

================================================
FILE: 0093-restore-ip-addresses/README.md
================================================
<h2><a href="https://leetcode.com/problems/restore-ip-addresses/">93. Restore IP Addresses</a></h2><h3>Medium</h3><hr><div><p>A <strong>valid IP address</strong> consists of exactly four integers separated by single dots. Each integer is between <code>0</code> and <code>255</code> (<strong>inclusive</strong>) and cannot have leading zeros.</p>

<ul>
	<li>For example, <code>"0.1.2.201"</code> and <code>"192.168.1.1"</code> are <strong>valid</strong> IP addresses, but <code>"0.011.255.245"</code>, <code>"192.168.1.312"</code> and <code>"192.168@1.1"</code> are <strong>invalid</strong> IP addresses.</li>
</ul>

<p>Given a string <code>s</code> containing only digits, return <em>all possible valid IP addresses that can be formed by inserting dots into </em><code>s</code>. You are <strong>not</strong> allowed to reorder or remove any digits in <code>s</code>. You may return the valid IP addresses in <strong>any</strong> order.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>

<pre><strong>Input:</strong> s = "25525511135"
<strong>Output:</strong> ["255.255.11.135","255.255.111.35"]
</pre>

<p><strong class="example">Example 2:</strong></p>

<pre><strong>Input:</strong> s = "0000"
<strong>Output:</strong> ["0.0.0.0"]
</pre>

<p><strong class="example">Example 3:</strong></p>

<pre><strong>Input:</strong> s = "101023"
<strong>Output:</strong> ["1.0.10.23","1.0.102.3","10.1.0.23","10.10.2.3","101.0.2.3"]
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>1 &lt;= s.length &lt;= 20</code></li>
	<li><code>s</code> consists of digits only.</li>
</ul>
</div>

================================================
FILE: 0100-same-tree/0100-same-tree.java
================================================
class Solution {
    public boolean isSameTree(TreeNode p, TreeNode q) {
        // return recursive traversal of tree
        return inOrderTraversal(q,p);
        
    }
    
    public boolean inOrderTraversal(TreeNode node1, TreeNode node2) {
        // initialize boolean result as true
        boolean result = true;
        
        // if one of the nodes is null and the other isn't, result is false
        if( (node1 == null && node2 != null) || (node2 == null && node1 != null) ) {
            result = false;
        }
        // else determine if node1 isn't null (if so, assumes both nodes aren't null)
        else if( node1 != null ) {
            // determine if node1 shares don't value with node2
            if( node1.val != node2.val ) {
                // if so, result is false
                result = false;
            }
            // else (assume node1 and node2 share value)
            else {
                // recursively call on left nodes
                result = inOrderTraversal(node1.left, node2.left);
                
                // if result is true for recursive call
                if( result == true ) {
                    // recursively call on right nodes
                    result = inOrderTraversal(node1.right, node2.right);
                }
            }
        }
        // return result
        return result;
    }
}

================================================
FILE: 0100-same-tree/NOTES.md
================================================
​

================================================
FILE: 0100-same-tree/README.md
================================================
<h2><a href="https://leetcode.com/problems/same-tree/">100. Same Tree</a></h2><h3>Easy</h3><hr><div><p>Given the roots of two binary trees <code>p</code> and <code>q</code>, write a function to check if they are the same or not.</p>

<p>Two binary trees are considered the same if they are structurally identical, and the nodes have the same value.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>
<img alt="" src="https://assets.leetcode.com/uploads/2020/12/20/ex1.jpg" style="width: 622px; height: 182px;">
<pre><strong>Input:</strong> p = [1,2,3], q = [1,2,3]
<strong>Output:</strong> true
</pre>

<p><strong class="example">Example 2:</strong></p>
<img alt="" src="https://assets.leetcode.com/uploads/2020/12/20/ex2.jpg" style="width: 382px; height: 182px;">
<pre><strong>Input:</strong> p = [1,2], q = [1,null,2]
<strong>Output:</strong> false
</pre>

<p><strong class="example">Example 3:</strong></p>
<img alt="" src="https://assets.leetcode.com/uploads/2020/12/20/ex3.jpg" style="width: 622px; height: 182px;">
<pre><strong>Input:</strong> p = [1,2,1], q = [1,1,2]
<strong>Output:</strong> false
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li>The number of nodes in both trees is in the range <code>[0, 100]</code>.</li>
	<li><code>-10<sup>4</sup> &lt;= Node.val &lt;= 10<sup>4</sup></code></li>
</ul>
</div>

================================================
FILE: 0124-binary-tree-maximum-path-sum/0124-binary-tree-maximum-path-sum.java
================================================

class Solution {
    public int maxPathSum(TreeNode root) {
        maxSum = Integer.MIN_VALUE;
        gainFromSubtree(root);
        return maxSum;
    }

    private int maxSum;

    // post order traversal of subtree rooted at `root`
    private int gainFromSubtree(TreeNode root) {
        if (root == null) {
            return 0;
        }

        // add the path sum from left subtree. Note that if the path
        // sum is negative, we can ignore it, or count it as 0.
        // This is the reason we use `Math.max` here.
        int gainFromLeft = Math.max(gainFromSubtree(root.left), 0);

        // add the path sum from right subtree. 0 if negative
        int gainFromRight = Math.max(gainFromSubtree(root.right), 0);

        // if left or right path sum are negative, they are counted
        // as 0, so this statement takes care of all four scenarios
        maxSum = Math.max(maxSum, gainFromLeft + gainFromRight + root.val);

        // return the max sum for a path starting at the root of subtree
        return Math.max(gainFromLeft + root.val, gainFromRight + root.val);
    }
}


================================================
FILE: 0124-binary-tree-maximum-path-sum/NOTES.md
================================================
​

================================================
FILE: 0124-binary-tree-maximum-path-sum/README.md
================================================
<h2><a href="https://leetcode.com/problems/binary-tree-maximum-path-sum/">124. Binary Tree Maximum Path Sum</a></h2><h3>Hard</h3><hr><div><p>A <strong>path</strong> in a binary tree is a sequence of nodes where each pair of adjacent nodes in the sequence has an edge connecting them. A node can only appear in the sequence <strong>at most once</strong>. Note that the path does not need to pass through the root.</p>

<p>The <strong>path sum</strong> of a path is the sum of the node's values in the path.</p>

<p>Given the <code>root</code> of a binary tree, return <em>the maximum <strong>path sum</strong> of any <strong>non-empty</strong> path</em>.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>
<img alt="" src="https://assets.leetcode.com/uploads/2020/10/13/exx1.jpg" style="width: 322px; height: 182px;">
<pre><strong>Input:</strong> root = [1,2,3]
<strong>Output:</strong> 6
<strong>Explanation:</strong> The optimal path is 2 -&gt; 1 -&gt; 3 with a path sum of 2 + 1 + 3 = 6.
</pre>

<p><strong class="example">Example 2:</strong></p>
<img alt="" src="https://assets.leetcode.com/uploads/2020/10/13/exx2.jpg">
<pre><strong>Input:</strong> root = [-10,9,20,null,null,15,7]
<strong>Output:</strong> 42
<strong>Explanation:</strong> The optimal path is 15 -&gt; 20 -&gt; 7 with a path sum of 15 + 20 + 7 = 42.
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li>The number of nodes in the tree is in the range <code>[1, 3 * 10<sup>4</sup>]</code>.</li>
	<li><code>-1000 &lt;= Node.val &lt;= 1000</code></li>
</ul>
</div>

================================================
FILE: 0125-valid-palindrome/0125-valid-palindrome.java
================================================
class Solution {
    public boolean isPalindrome(String s) {
        int i=0;
        int j= s.length()-1;
        while(i<j){
            char a=s.charAt(i);
            char b=s.charAt(j);
            if(!Character.isLetterOrDigit(a)){
                i++;
            }else if(!Character.isLetterOrDigit(b)){
                j--;
            }else{
                if(Character.isUpperCase(a)){
                    a=Character.toLowerCase(a);
                }
                if(Character.isUpperCase(b)){
                    b=Character.toLowerCase(b);
                }
                if(a==b){
                    i++;
                    j--;
                }else{
                    return false;
                }
            }
        }
        return true;
    }
}

================================================
FILE: 0125-valid-palindrome/NOTES.md
================================================
​

================================================
FILE: 0125-valid-palindrome/README.md
================================================
<h2><a href="https://leetcode.com/problems/valid-palindrome/">125. Valid Palindrome</a></h2><h3>Easy</h3><hr><div><p>A phrase is a <strong>palindrome</strong> if, after converting all uppercase letters into lowercase letters and removing all non-alphanumeric characters, it reads the same forward and backward. Alphanumeric characters include letters and numbers.</p>

<p>Given a string <code>s</code>, return <code>true</code><em> if it is a <strong>palindrome</strong>, or </em><code>false</code><em> otherwise</em>.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>

<pre><strong>Input:</strong> s = "A man, a plan, a canal: Panama"
<strong>Output:</strong> true
<strong>Explanation:</strong> "amanaplanacanalpanama" is a palindrome.
</pre>

<p><strong class="example">Example 2:</strong></p>

<pre><strong>Input:</strong> s = "race a car"
<strong>Output:</strong> false
<strong>Explanation:</strong> "raceacar" is not a palindrome.
</pre>

<p><strong class="example">Example 3:</strong></p>

<pre><strong>Input:</strong> s = " "
<strong>Output:</strong> true
<strong>Explanation:</strong> s is an empty string "" after removing non-alphanumeric characters.
Since an empty string reads the same forward and backward, it is a palindrome.
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>1 &lt;= s.length &lt;= 2 * 10<sup>5</sup></code></li>
	<li><code>s</code> consists only of printable ASCII characters.</li>
</ul>
</div>

================================================
FILE: 0131-palindrome-partitioning/0131-palindrome-partitioning.java
================================================
class Solution {
     public List<List<String>> partition(String s) {
        List<List<String>> Al1 = new ArrayList<>();
        List<String> Al2 = new ArrayList<>();
        String[][] dp = new String[s.length()][s.length()]; 
        palPart(Al1,Al2,s,0,dp);
        return Al1;
    }
    
    public void palPart(List<List<String>> Al1, List<String> Al2,String s, int start,String[][] dp){
        if (start == s.length())
            Al1.add(new ArrayList<>(Al2));
        
        for (int i=start;i<s.length();i++)
        {
            if (dp[start][i] != null){
                Al2.add(dp[start][i]); 
                palPart(Al1,Al2,s,i+1,dp);
                dp[start][i] = Al2.remove(Al2.size()-1);
            }else if (isPalindrome(start,i,s)){
                Al2.add(s.substring(start,i+1)); 
                palPart(Al1,Al2,s,i+1,dp);
                dp[start][i] = Al2.remove(Al2.size()-1);
            }
        }
        
    }
    
    public boolean isPalindrome(int start, int i, String s)
    {
        while (start < i)
        {
            if (s.charAt(start++) != s.charAt(i--)) return false;
        }
        return true;
    }
}

================================================
FILE: 0131-palindrome-partitioning/NOTES.md
================================================
​

================================================
FILE: 0131-palindrome-partitioning/README.md
================================================
<h2><a href="https://leetcode.com/problems/palindrome-partitioning/">131. Palindrome Partitioning</a></h2><h3>Medium</h3><hr><div><p>Given a string <code>s</code>, partition <code>s</code> such that every <span data-keyword="substring-nonempty">substring</span> of the partition is a <span data-keyword="palindrome-string"><strong>palindrome</strong></span>. Return <em>all possible palindrome partitioning of </em><code>s</code>.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>
<pre><strong>Input:</strong> s = "aab"
<strong>Output:</strong> [["a","a","b"],["aa","b"]]
</pre><p><strong class="example">Example 2:</strong></p>
<pre><strong>Input:</strong> s = "a"
<strong>Output:</strong> [["a"]]
</pre>
<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>1 &lt;= s.length &lt;= 16</code></li>
	<li><code>s</code> contains only lowercase English letters.</li>
</ul>
</div>

================================================
FILE: 0134-gas-station/0134-gas-station.java
================================================
class Solution {
    public int canCompleteCircuit(int[] gas, int[] cost) {
        int sum = 0, n = gas.length;
        int gasInTank = 0, start = 0;
        for(int i=0;i<n;i++) {
            gasInTank += gas[i]-cost[i];
            sum += gas[i]-cost[i];
            // if we are not able to reach next station from i, 
            if(gasInTank < 0) {
                start = i+1;
                gasInTank = 0;
            }
        }
        
        return sum >= 0 ? start : -1;
    }
}

================================================
FILE: 0134-gas-station/NOTES.md
================================================
​

================================================
FILE: 0134-gas-station/README.md
================================================
<h2><a href="https://leetcode.com/problems/gas-station/">134. Gas Station</a></h2><h3>Medium</h3><hr><div><p>There are <code>n</code> gas stations along a circular route, where the amount of gas at the <code>i<sup>th</sup></code> station is <code>gas[i]</code>.</p>

<p>You have a car with an unlimited gas tank and it costs <code>cost[i]</code> of gas to travel from the <code>i<sup>th</sup></code> station to its next <code>(i + 1)<sup>th</sup></code> station. You begin the journey with an empty tank at one of the gas stations.</p>

<p>Given two integer arrays <code>gas</code> and <code>cost</code>, return <em>the starting gas station's index if you can travel around the circuit once in the clockwise direction, otherwise return</em> <code>-1</code>. If there exists a solution, it is <strong>guaranteed</strong> to be <strong>unique</strong></p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>

<pre><strong>Input:</strong> gas = [1,2,3,4,5], cost = [3,4,5,1,2]
<strong>Output:</strong> 3
<strong>Explanation:</strong>
Start at station 3 (index 3) and fill up with 4 unit of gas. Your tank = 0 + 4 = 4
Travel to station 4. Your tank = 4 - 1 + 5 = 8
Travel to station 0. Your tank = 8 - 2 + 1 = 7
Travel to station 1. Your tank = 7 - 3 + 2 = 6
Travel to station 2. Your tank = 6 - 4 + 3 = 5
Travel to station 3. The cost is 5. Your gas is just enough to travel back to station 3.
Therefore, return 3 as the starting index.
</pre>

<p><strong class="example">Example 2:</strong></p>

<pre><strong>Input:</strong> gas = [2,3,4], cost = [3,4,3]
<strong>Output:</strong> -1
<strong>Explanation:</strong>
You can't start at station 0 or 1, as there is not enough gas to travel to the next station.
Let's start at station 2 and fill up with 4 unit of gas. Your tank = 0 + 4 = 4
Travel to station 0. Your tank = 4 - 3 + 2 = 3
Travel to station 1. Your tank = 3 - 3 + 3 = 3
You cannot travel back to station 2, as it requires 4 unit of gas but you only have 3.
Therefore, you can't travel around the circuit once no matter where you start.
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>n == gas.length == cost.length</code></li>
	<li><code>1 &lt;= n &lt;= 10<sup>5</sup></code></li>
	<li><code>0 &lt;= gas[i], cost[i] &lt;= 10<sup>4</sup></code></li>
</ul>
</div>

================================================
FILE: 0144-binary-tree-preorder-traversal/0144-binary-tree-preorder-traversal.java
================================================
/**
 * Definition for a binary tree node.
 * public class TreeNode {
 *     int val;
 *     TreeNode left;
 *     TreeNode right;
 *     TreeNode() {}
 *     TreeNode(int val) { this.val = val; }
 *     TreeNode(int val, TreeNode left, TreeNode right) {
 *         this.val = val;
 *         this.left = left;
 *         this.right = right;
 *     }
 * }
 */
class Solution {
    public List<Integer> preorderTraversal(TreeNode root) {
        List<Integer> list = new ArrayList<>();
        preOrder(root,list);
        return list;
    }
    void preOrder(TreeNode root, List<Integer> list){
        if(root==null)return;
        list.add(root.val);
        preOrder(root.left,list);
        preOrder(root.right,list);
    }
}

================================================
FILE: 0144-binary-tree-preorder-traversal/NOTES.md
================================================
​

================================================
FILE: 0144-binary-tree-preorder-traversal/README.md
================================================
<h2><a href="https://leetcode.com/problems/binary-tree-preorder-traversal/">144. Binary Tree Preorder Traversal</a></h2><h3>Easy</h3><hr><div><p>Given the <code>root</code> of a binary tree, return <em>the preorder traversal of its nodes' values</em>.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>
<img alt="" src="https://assets.leetcode.com/uploads/2020/09/15/inorder_1.jpg" style="width: 125px; height: 200px;">
<pre><strong>Input:</strong> root = [1,null,2,3]
<strong>Output:</strong> [1,2,3]
</pre>

<p><strong class="example">Example 2:</strong></p>

<pre><strong>Input:</strong> root = []
<strong>Output:</strong> []
</pre>

<p><strong class="example">Example 3:</strong></p>

<pre><strong>Input:</strong> root = [1]
<strong>Output:</strong> [1]
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li>The number of nodes in the tree is in the range <code>[0, 100]</code>.</li>
	<li><code>-100 &lt;= Node.val &lt;= 100</code></li>
</ul>

<p>&nbsp;</p>
<p><strong>Follow up:</strong> Recursive solution is trivial, could you do it iteratively?</p>
</div>

================================================
FILE: 0149-max-points-on-a-line/0149-max-points-on-a-line.java
================================================
class Solution {
    public int maxPoints(int[][] points) {
        int n = points.length;
        if (n == 1) {
            return 1;
        }
        int result = 2;
        for (int i = 0; i < n; i++) {
            Map<Double, Integer> cnt = new HashMap<>();
            for (int j = 0; j < n; j++) {
                if (j != i) {
                    cnt.merge(Math.atan2(points[j][1] - points[i][1],
                    	points[j][0] - points[i][0]), 1, Integer::sum);
                }
            }
            result = Math.max(result, Collections.max(cnt.values()) + 1);
        }
        return result;
    }
}

================================================
FILE: 0149-max-points-on-a-line/NOTES.md
================================================
​

================================================
FILE: 0149-max-points-on-a-line/README.md
================================================
<h2><a href="https://leetcode.com/problems/max-points-on-a-line/">149. Max Points on a Line</a></h2><h3>Hard</h3><hr><div><p>Given an array of <code>points</code> where <code>points[i] = [x<sub>i</sub>, y<sub>i</sub>]</code> represents a point on the <strong>X-Y</strong> plane, return <em>the maximum number of points that lie on the same straight line</em>.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>
<img alt="" src="https://assets.leetcode.com/uploads/2021/02/25/plane1.jpg" style="width: 300px; height: 294px;">
<pre><strong>Input:</strong> points = [[1,1],[2,2],[3,3]]
<strong>Output:</strong> 3
</pre>

<p><strong class="example">Example 2:</strong></p>
<img alt="" src="https://assets.leetcode.com/uploads/2021/02/25/plane2.jpg" style="width: 300px; height: 294px;">
<pre><strong>Input:</strong> points = [[1,1],[3,2],[5,3],[4,1],[2,3],[1,4]]
<strong>Output:</strong> 4
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>1 &lt;= points.length &lt;= 300</code></li>
	<li><code>points[i].length == 2</code></li>
	<li><code>-10<sup>4</sup> &lt;= x<sub>i</sub>, y<sub>i</sub> &lt;= 10<sup>4</sup></code></li>
	<li>All the <code>points</code> are <strong>unique</strong>.</li>
</ul>
</div>

================================================
FILE: 0150-evaluate-reverse-polish-notation/0150-evaluate-reverse-polish-notation.java
================================================
class Solution {
    public int evalRPN(String[] tokens) {
                  int[] nxtPos = new int[1];

          return eval(tokens, tokens.length - 1, nxtPos);
    }

    private int eval(String[] tokens, int pos, int[] nxtPos) {

        char ac = tokens[pos].charAt(0);

        if (tokens[pos].length() == 1 && (ac == '+' || ac == '-' || ac == '*' || ac == '/')) {

            // get operands
            int a = eval(tokens, pos - 1, nxtPos);
            int b = eval(tokens, nxtPos[0], nxtPos);

            // perform operation
            if (ac == '+') {
                
                return b + a;
            } else if (ac == '-') {

                return b - a;
            } else if (ac == '*') {

                return b * a;
            } else {

                return b / a;
            }
        } else {

            nxtPos[0] = pos - 1;
            return Integer.parseInt(tokens[pos]);
        }
    }
}

================================================
FILE: 0150-evaluate-reverse-polish-notation/NOTES.md
================================================
​

================================================
FILE: 0150-evaluate-reverse-polish-notation/README.md
================================================
<h2><a href="https://leetcode.com/problems/evaluate-reverse-polish-notation/">150. Evaluate Reverse Polish Notation</a></h2><h3>Medium</h3><hr><div><p>Evaluate the value of an arithmetic expression in <a href="http://en.wikipedia.org/wiki/Reverse_Polish_notation" target="_blank">Reverse Polish Notation</a>.</p>

<p>Valid operators are <code>+</code>, <code>-</code>, <code>*</code>, and <code>/</code>. Each operand may be an integer or another expression.</p>

<p><strong>Note</strong> that division between two integers should truncate toward zero.</p>

<p>It is guaranteed that the given RPN expression is always valid. That means the expression would always evaluate to a result, and there will not be any division by zero operation.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>

<pre><strong>Input:</strong> tokens = ["2","1","+","3","*"]
<strong>Output:</strong> 9
<strong>Explanation:</strong> ((2 + 1) * 3) = 9
</pre>

<p><strong class="example">Example 2:</strong></p>

<pre><strong>Input:</strong> tokens = ["4","13","5","/","+"]
<strong>Output:</strong> 6
<strong>Explanation:</strong> (4 + (13 / 5)) = 6
</pre>

<p><strong class="example">Example 3:</strong></p>

<pre><strong>Input:</strong> tokens = ["10","6","9","3","+","-11","*","/","*","17","+","5","+"]
<strong>Output:</strong> 22
<strong>Explanation:</strong> ((10 * (6 / ((9 + 3) * -11))) + 17) + 5
= ((10 * (6 / (12 * -11))) + 17) + 5
= ((10 * (6 / -132)) + 17) + 5
= ((10 * 0) + 17) + 5
= (0 + 17) + 5
= 17 + 5
= 22
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>1 &lt;= tokens.length &lt;= 10<sup>4</sup></code></li>
	<li><code>tokens[i]</code> is either an operator: <code>"+"</code>, <code>"-"</code>, <code>"*"</code>, or <code>"/"</code>, or an integer in the range <code>[-200, 200]</code>.</li>
</ul>
</div>

================================================
FILE: 0151-reverse-words-in-a-string/0151-reverse-words-in-a-string.java
================================================
class Solution {
    public String reverseWords(String s) {
        List<StringBuilder> arr=new ArrayList<>();
        StringBuilder sb=new StringBuilder();
        boolean word=false;
        for(int i=0;i<s.length();i++){
            char ch=s.charAt(i);
            if(Character.isLetterOrDigit(ch)){
                sb.append(ch);
                word=true;
            }else{
                if(word){
                    word=false;   
                    arr.add(sb);
                    sb=new StringBuilder();
                }
            }
        }
        if(sb.length()>0)arr.add(sb);
        sb=new StringBuilder();
        for(int i=arr.size()-1;i>=0;i--){
            sb.append(arr.get(i));
            if(i!=0){
                sb.append(" ");
            }
        }
        return sb.toString();
    }
}

================================================
FILE: 0151-reverse-words-in-a-string/NOTES.md
================================================
​

================================================
FILE: 0151-reverse-words-in-a-string/README.md
================================================
<h2><a href="https://leetcode.com/problems/reverse-words-in-a-string/">151. Reverse Words in a String</a></h2><h3>Medium</h3><hr><div><p>Given an input string <code>s</code>, reverse the order of the <strong>words</strong>.</p>

<p>A <strong>word</strong> is defined as a sequence of non-space characters. The <strong>words</strong> in <code>s</code> will be separated by at least one space.</p>

<p>Return <em>a string of the words in reverse order concatenated by a single space.</em></p>

<p><b>Note</b> that <code>s</code> may contain leading or trailing spaces or multiple spaces between two words. The returned string should only have a single space separating the words. Do not include any extra spaces.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>

<pre><strong>Input:</strong> s = "the sky is blue"
<strong>Output:</strong> "blue is sky the"
</pre>

<p><strong class="example">Example 2:</strong></p>

<pre><strong>Input:</strong> s = "  hello world  "
<strong>Output:</strong> "world hello"
<strong>Explanation:</strong> Your reversed string should not contain leading or trailing spaces.
</pre>

<p><strong class="example">Example 3:</strong></p>

<pre><strong>Input:</strong> s = "a good   example"
<strong>Output:</strong> "example good a"
<strong>Explanation:</strong> You need to reduce multiple spaces between two words to a single space in the reversed string.
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>1 &lt;= s.length &lt;= 10<sup>4</sup></code></li>
	<li><code>s</code> contains English letters (upper-case and lower-case), digits, and spaces <code>' '</code>.</li>
	<li>There is <strong>at least one</strong> word in <code>s</code>.</li>
</ul>

<p>&nbsp;</p>
<p><b data-stringify-type="bold">Follow-up:&nbsp;</b>If the string data type is mutable in your language, can&nbsp;you solve it&nbsp;<b data-stringify-type="bold">in-place</b>&nbsp;with&nbsp;<code data-stringify-type="code">O(1)</code>&nbsp;extra space?</p>
</div>

================================================
FILE: 0198-house-robber/0198-house-robber.java
================================================
class Solution {
    public int rob(int[] nums) {
        
        int n = nums.length;
        
        if(n == 1) return nums[0];
        
        int dp2=nums[0], dp1=Math.max(nums[0],nums[1]),dp=dp1;
        
        for(int i = 2; i < n; i++){
            dp = Math.max(dp1, dp2 + nums[i]);
            dp2 = dp1;
            dp1 = dp;
        }
        return dp;

    }
}

================================================
FILE: 0198-house-robber/README.md
================================================
<h2><a href="https://leetcode.com/problems/house-robber/">198. House Robber</a></h2><h3>Medium</h3><hr><div><p>You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of them is that adjacent houses have security systems connected and <b>it will automatically contact the police if two adjacent houses were broken into on the same night</b>.</p>

<p>Given an integer array <code>nums</code> representing the amount of money of each house, return <em>the maximum amount of money you can rob tonight <b>without alerting the police</b></em>.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>

<pre><strong>Input:</strong> nums = [1,2,3,1]
<strong>Output:</strong> 4
<strong>Explanation:</strong> Rob house 1 (money = 1) and then rob house 3 (money = 3).
Total amount you can rob = 1 + 3 = 4.
</pre>

<p><strong class="example">Example 2:</strong></p>

<pre><strong>Input:</strong> nums = [2,7,9,3,1]
<strong>Output:</strong> 12
<strong>Explanation:</strong> Rob house 1 (money = 2), rob house 3 (money = 9) and rob house 5 (money = 1).
Total amount you can rob = 2 + 9 + 1 = 12.
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>1 &lt;= nums.length &lt;= 100</code></li>
	<li><code>0 &lt;= nums[i] &lt;= 400</code></li>
</ul>
</div>

================================================
FILE: 0212-word-search-ii/0212-word-search-ii.java
================================================
class Solution {
    private static final char HASH_TAG = '#';
    private Tree root = new Tree();
    
    public List<String> findWords(char[][] board, String[] words) {
        for (String word : words) {
            Tree temp = root;
            // Test case 60/63 
            for (int i = word.length() - 1; i >= 0; i--) {
                int idx = word.charAt(i) - 'a';
                if (temp.val[idx] == null) {
                    temp.val[idx] = new Tree();
                    temp.val[idx].parent = temp;
                    temp.val[idx].idx = idx;
                }
                temp = temp.val[idx];
            }
            temp.word = word;
        }    
        return searchWord(board);
    }
    
    private List<String> searchWord(char[][] board) {
        List<String> res = new ArrayList<>();
        
        for (int i = 0; i < board.length; i++)
            for (int j = 0; j < board[0].length; j++) {
                Tree temp = root;
                checkWord(res, i, j, board, temp);
            }
        
        return res;
    }
    
    private void checkWord(List<String> res, int y, int x, char[][] board, Tree temp) {
        
        if (x >= board[0].length || x < 0
            || y >= board.length || y < 0)
            return;
        
        char ch = board[y][x];
        if (ch== HASH_TAG || temp.val[ch - 'a'] == null)
            return;
        
        temp = temp.val[ch - 'a'];
        
        if (temp.word != null) {
            res.add(temp.word);
            temp.word = null; // Test case 17/63: When there is more than one answer
            Tree ptr = temp;
            while (ptr.parent != null 
                    && ptr.isEmpty()) {
                int idx = ptr.idx;
                ptr = ptr.parent;
                ptr.val[idx] = null;
            }
        }
        
        board[y][x] = HASH_TAG;

        checkWord(res, y, x + 1, board, temp);
        checkWord(res, y, x - 1, board, temp);
        checkWord(res, y + 1, x, board, temp);
        checkWord(res, y - 1, x, board, temp);
        
        board[y][x] = ch;
    }
    
    class Tree {
        Tree parent;
        Tree[] val = new Tree[26];
        String word;
        int idx;

        public boolean isEmpty() {
            for (int i = 0; i < 26; i++) 
                if (val[i] != null)
                    return false;

            return true;
        }
    }
}

================================================
FILE: 0212-word-search-ii/NOTES.md
================================================
​

================================================
FILE: 0212-word-search-ii/README.md
================================================
<h2><a href="https://leetcode.com/problems/word-search-ii/">212. Word Search II</a></h2><h3>Hard</h3><hr><div><p>Given an <code>m x n</code> <code>board</code>&nbsp;of characters and a list of strings <code>words</code>, return <em>all words on the board</em>.</p>

<p>Each word must be constructed from letters of sequentially adjacent cells, where <strong>adjacent cells</strong> are horizontally or vertically neighboring. The same letter cell may not be used more than once in a word.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>
<img alt="" src="https://assets.leetcode.com/uploads/2020/11/07/search1.jpg" style="width: 322px; height: 322px;">
<pre><strong>Input:</strong> board = [["o","a","a","n"],["e","t","a","e"],["i","h","k","r"],["i","f","l","v"]], words = ["oath","pea","eat","rain"]
<strong>Output:</strong> ["eat","oath"]
</pre>

<p><strong class="example">Example 2:</strong></p>
<img alt="" src="https://assets.leetcode.com/uploads/2020/11/07/search2.jpg" style="width: 162px; height: 162px;">
<pre><strong>Input:</strong> board = [["a","b"],["c","d"]], words = ["abcb"]
<strong>Output:</strong> []
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>m == board.length</code></li>
	<li><code>n == board[i].length</code></li>
	<li><code>1 &lt;= m, n &lt;= 12</code></li>
	<li><code>board[i][j]</code> is a lowercase English letter.</li>
	<li><code>1 &lt;= words.length &lt;= 3 * 10<sup>4</sup></code></li>
	<li><code>1 &lt;= words[i].length &lt;= 10</code></li>
	<li><code>words[i]</code> consists of lowercase English letters.</li>
	<li>All the strings of <code>words</code> are unique.</li>
</ul>
</div>

================================================
FILE: 0219-contains-duplicate-ii/0219-contains-duplicate-ii.java
================================================
class Solution {
    public boolean containsNearbyDuplicate(int[] nums, int k) {
        Map<Integer, Integer> list = new HashMap();
        for(int i=0; i<nums.length; i++)
        {
            if(list.containsKey(nums[i]))
            {
                if(i-list.get(nums[i])<=k)
                {
                    return true;
                }
            }
            list.put(nums[i], i);
        }
        return false;
    }
}

================================================
FILE: 0219-contains-duplicate-ii/NOTES.md
================================================
​

================================================
FILE: 0219-contains-duplicate-ii/README.md
================================================
<h2><a href="https://leetcode.com/problems/contains-duplicate-ii/">219. Contains Duplicate II</a></h2><h3>Easy</h3><hr><div><p>Given an integer array <code>nums</code> and an integer <code>k</code>, return <code>true</code> if there are two <strong>distinct indices</strong> <code>i</code> and <code>j</code> in the array such that <code>nums[i] == nums[j]</code> and <code>abs(i - j) &lt;= k</code>.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>

<pre><strong>Input:</strong> nums = [1,2,3,1], k = 3
<strong>Output:</strong> true
</pre>

<p><strong class="example">Example 2:</strong></p>

<pre><strong>Input:</strong> nums = [1,0,1,1], k = 1
<strong>Output:</strong> true
</pre>

<p><strong class="example">Example 3:</strong></p>

<pre><strong>Input:</strong> nums = [1,2,3,1,2,3], k = 2
<strong>Output:</strong> false
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>1 &lt;= nums.length &lt;= 10<sup>5</sup></code></li>
	<li><code>-10<sup>9</sup> &lt;= nums[i] &lt;= 10<sup>9</sup></code></li>
	<li><code>0 &lt;= k &lt;= 10<sup>5</sup></code></li>
</ul>
</div>

================================================
FILE: 0222-count-complete-tree-nodes/0222-count-complete-tree-nodes.java
================================================
class Solution {
    public int countNodes(TreeNode root) {
        if(root ==  null){
            return 0;
        }
        int leftDep=1;
        TreeNode leftNode = root.left;
        while(leftNode != null){
            leftDep++;
            leftNode = leftNode.left;
        }
        int rightDep = 1;
        TreeNode rightNode = root.right;
        while(rightNode != null){
            rightDep++;
            rightNode = rightNode.right;
        }
        if(leftDep == rightDep){
            return (int)Math.pow(2,leftDep)-1;
        }
        return countNodes(root.left)+countNodes(root.right)+1;
    }
}

================================================
FILE: 0222-count-complete-tree-nodes/NOTES.md
================================================
​

================================================
FILE: 0222-count-complete-tree-nodes/README.md
================================================
<h2><a href="https://leetcode.com/problems/count-complete-tree-nodes/">222. Count Complete Tree Nodes</a></h2><h3>Medium</h3><hr><div><p>Given the <code>root</code> of a <strong>complete</strong> binary tree, return the number of the nodes in the tree.</p>

<p>According to <strong><a href="http://en.wikipedia.org/wiki/Binary_tree#Types_of_binary_trees" target="_blank">Wikipedia</a></strong>, every level, except possibly the last, is completely filled in a complete binary tree, and all nodes in the last level are as far left as possible. It can have between <code>1</code> and <code>2<sup>h</sup></code> nodes inclusive at the last level <code>h</code>.</p>

<p>Design an algorithm that runs in less than&nbsp;<code data-stringify-type="code">O(n)</code>&nbsp;time complexity.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>
<img alt="" src="https://assets.leetcode.com/uploads/2021/01/14/complete.jpg" style="width: 372px; height: 302px;">
<pre><strong>Input:</strong> root = [1,2,3,4,5,6]
<strong>Output:</strong> 6
</pre>

<p><strong class="example">Example 2:</strong></p>

<pre><strong>Input:</strong> root = []
<strong>Output:</strong> 0
</pre>

<p><strong class="example">Example 3:</strong></p>

<pre><strong>Input:</strong> root = [1]
<strong>Output:</strong> 1
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li>The number of nodes in the tree is in the range <code>[0, 5 * 10<sup>4</sup>]</code>.</li>
	<li><code>0 &lt;= Node.val &lt;= 5 * 10<sup>4</sup></code></li>
	<li>The tree is guaranteed to be <strong>complete</strong>.</li>
</ul>
</div>

================================================
FILE: 0223-rectangle-area/0223-rectangle-area.java
================================================
class Solution {
    public int computeArea(int ax1, int ay1, int ax2, int ay2, int bx1, int by1, int bx2, int by2) {
        int areaOfA = (ay2 - ay1) * (ax2 - ax1);
        int areaOfB = (by2 - by1) * (bx2 - bx1);

        // calculate x overlap
        int left = Math.max(ax1, bx1);
        int right = Math.min(ax2, bx2);
        int xOverlap = right - left;

        // calculate y overlap
        int top = Math.min(ay2, by2);
        int bottom = Math.max(ay1, by1);
        int yOverlap = top - bottom;

        int areaOfOverlap = 0;
        // if the rectangles overlap each other, then calculate
        // the area of the overlap
        if (xOverlap > 0 && yOverlap > 0) {
            areaOfOverlap = xOverlap * yOverlap;
        }

        // areaOfOverlap is counted twice when in the summation of
        // areaOfA and areaOfB, so we need to subtract it from the
        // total, to get the toal area covered by both the rectangles
        int totalArea = areaOfA + areaOfB - areaOfOverlap;

        return totalArea;
    }
}

================================================
FILE: 0223-rectangle-area/NOTES.md
================================================
​

================================================
FILE: 0223-rectangle-area/README.md
================================================
<h2><a href="https://leetcode.com/problems/rectangle-area/">223. Rectangle Area</a></h2><h3>Medium</h3><hr><div><p>Given the coordinates of two <strong>rectilinear</strong> rectangles in a 2D plane, return <em>the total area covered by the two rectangles</em>.</p>

<p>The first rectangle is defined by its <strong>bottom-left</strong> corner <code>(ax1, ay1)</code> and its <strong>top-right</strong> corner <code>(ax2, ay2)</code>.</p>

<p>The second rectangle is defined by its <strong>bottom-left</strong> corner <code>(bx1, by1)</code> and its <strong>top-right</strong> corner <code>(bx2, by2)</code>.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>
<img alt="Rectangle Area" src="https://assets.leetcode.com/uploads/2021/05/08/rectangle-plane.png" style="width: 700px; height: 365px;">
<pre><strong>Input:</strong> ax1 = -3, ay1 = 0, ax2 = 3, ay2 = 4, bx1 = 0, by1 = -1, bx2 = 9, by2 = 2
<strong>Output:</strong> 45
</pre>

<p><strong class="example">Example 2:</strong></p>

<pre><strong>Input:</strong> ax1 = -2, ay1 = -2, ax2 = 2, ay2 = 2, bx1 = -2, by1 = -2, bx2 = 2, by2 = 2
<strong>Output:</strong> 16
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>-10<sup>4</sup> &lt;= ax1 &lt;= ax2 &lt;= 10<sup>4</sup></code></li>
	<li><code>-10<sup>4</sup> &lt;= ay1 &lt;= ay2 &lt;= 10<sup>4</sup></code></li>
	<li><code>-10<sup>4</sup> &lt;= bx1 &lt;= bx2 &lt;= 10<sup>4</sup></code></li>
	<li><code>-10<sup>4</sup> &lt;= by1 &lt;= by2 &lt;= 10<sup>4</sup></code></li>
</ul>
</div>

================================================
FILE: 0224-basic-calculator/0224-basic-calculator.java
================================================
class Solution {
    int idx; // this index traverse the string in one pass, between different level of recursion
    public int calculate(String s) {
        idx = 0; // Initialization should be here
        return calc(s);
    }
    
    private int calc(String s) {
        int res = 0, num = 0, sign = 1;
        while (idx < s.length()) {
            char c = s.charAt(idx++);
            if (c >= '0' && c <= '9') num = num * 10 + c - '0';
            else if (c == '(') num = calc(s); // ( is start of a new sub-problem, Let recursion solve the sub-problem
            else if (c == ')') return res + sign * num;
            else if (c == '+' || c == '-') { // only when we meet a new sign, we know a while number has been read
                res += sign * num;
                num = 0;
                sign = c == '-' ? -1 : 1;
            }
        }
        return res + sign * num; // last number is not processed yet
    }
}

================================================
FILE: 0224-basic-calculator/NOTES.md
================================================
​

================================================
FILE: 0224-basic-calculator/README.md
================================================
<h2><a href="https://leetcode.com/problems/basic-calculator/">224. Basic Calculator</a></h2><h3>Hard</h3><hr><div><p>Given a string <code>s</code> representing a valid expression, implement a basic calculator to evaluate it, and return <em>the result of the evaluation</em>.</p>

<p><strong>Note:</strong> You are <strong>not</strong> allowed to use any built-in function which evaluates strings as mathematical expressions, such as <code>eval()</code>.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>

<pre><strong>Input:</strong> s = "1 + 1"
<strong>Output:</strong> 2
</pre>

<p><strong class="example">Example 2:</strong></p>

<pre><strong>Input:</strong> s = " 2-1 + 2 "
<strong>Output:</strong> 3
</pre>

<p><strong class="example">Example 3:</strong></p>

<pre><strong>Input:</strong> s = "(1+(4+5+2)-3)+(6+8)"
<strong>Output:</strong> 23
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>1 &lt;= s.length &lt;= 3 * 10<sup>5</sup></code></li>
	<li><code>s</code> consists of digits, <code>'+'</code>, <code>'-'</code>, <code>'('</code>, <code>')'</code>, and <code>' '</code>.</li>
	<li><code>s</code> represents a valid expression.</li>
	<li><code>'+'</code> is <strong>not</strong> used as a unary operation (i.e., <code>"+1"</code> and <code>"+(2 + 3)"</code> is invalid).</li>
	<li><code>'-'</code> could be used as a unary operation (i.e., <code>"-1"</code> and <code>"-(2 + 3)"</code> is valid).</li>
	<li>There will be no two consecutive operators in the input.</li>
	<li>Every number and running calculation will fit in a signed 32-bit integer.</li>
</ul>
</div>

================================================
FILE: 0232-implement-queue-using-stacks/0232-implement-queue-using-stacks.java
================================================
class MyQueue {
    private Stack<Integer> s1 = new Stack<>();
    private Stack<Integer> s2 = new Stack<>();

    /** Initialize your data structure here. */
    public MyQueue() {
        
    }
    
    /** Push element x to the back of queue. */
    public void push(int x) {
        s1.push(x);
    }
    
    /** Removes the element from in front of queue and returns that element. */
    public int pop() {
        if (s2.isEmpty()) {
            while (!s1.isEmpty())
                s2.push(s1.pop());
        }
        return s2.pop();
    }
    
    /** Get the front element. */
    public int peek() {
        if (s2.isEmpty()) {
            while (!s1.isEmpty())
                s2.push(s1.pop());
        }
        return s2.peek();
    }
    
    /** Returns whether the queue is empty. */
    public boolean empty() {
        return s1.isEmpty() && s2.isEmpty();
    }
}

/**
 * Your MyQueue object will be instantiated and called as such:
 * MyQueue obj = new MyQueue();
 * obj.push(x);
 * int param_2 = obj.pop();
 * int param_3 = obj.peek();
 * boolean param_4 = obj.empty();
 */

================================================
FILE: 0232-implement-queue-using-stacks/NOTES.md
================================================
​

================================================
FILE: 0232-implement-queue-using-stacks/README.md
================================================
<h2><a href="https://leetcode.com/problems/implement-queue-using-stacks/">232. Implement Queue using Stacks</a></h2><h3>Easy</h3><hr><div><p>Implement a first in first out (FIFO) queue using only two stacks. The implemented queue should support all the functions of a normal queue (<code>push</code>, <code>peek</code>, <code>pop</code>, and <code>empty</code>).</p>

<p>Implement the <code>MyQueue</code> class:</p>

<ul>
	<li><code>void push(int x)</code> Pushes element x to the back of the queue.</li>
	<li><code>int pop()</code> Removes the element from the front of the queue and returns it.</li>
	<li><code>int peek()</code> Returns the element at the front of the queue.</li>
	<li><code>boolean empty()</code> Returns <code>true</code> if the queue is empty, <code>false</code> otherwise.</li>
</ul>

<p><strong>Notes:</strong></p>

<ul>
	<li>You must use <strong>only</strong> standard operations of a stack, which means only <code>push to top</code>, <code>peek/pop from top</code>, <code>size</code>, and <code>is empty</code> operations are valid.</li>
	<li>Depending on your language, the stack may not be supported natively. You may simulate a stack using a list or deque (double-ended queue) as long as you use only a stack's standard operations.</li>
</ul>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>

<pre><strong>Input</strong>
["MyQueue", "push", "push", "peek", "pop", "empty"]
[[], [1], [2], [], [], []]
<strong>Output</strong>
[null, null, null, 1, 1, false]

<strong>Explanation</strong>
MyQueue myQueue = new MyQueue();
myQueue.push(1); // queue is: [1]
myQueue.push(2); // queue is: [1, 2] (leftmost is front of the queue)
myQueue.peek(); // return 1
myQueue.pop(); // return 1, queue is [2]
myQueue.empty(); // return false
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>1 &lt;= x &lt;= 9</code></li>
	<li>At most <code>100</code>&nbsp;calls will be made to <code>push</code>, <code>pop</code>, <code>peek</code>, and <code>empty</code>.</li>
	<li>All the calls to <code>pop</code> and <code>peek</code> are valid.</li>
</ul>

<p>&nbsp;</p>
<p><strong>Follow-up:</strong> Can you implement the queue such that each operation is <strong><a href="https://en.wikipedia.org/wiki/Amortized_analysis" target="_blank">amortized</a></strong> <code>O(1)</code> time complexity? In other words, performing <code>n</code> operations will take overall <code>O(n)</code> time even if one of those operations may take longer.</p>
</div>

================================================
FILE: 0236-lowest-common-ancestor-of-a-binary-tree/0236-lowest-common-ancestor-of-a-binary-tree.java
================================================
class Solution {
    public TreeNode lowestCommonAncestor(TreeNode root, TreeNode p, TreeNode q) {
        if (root == null || root == p || root == q) return root;
        TreeNode left = lowestCommonAncestor(root.left, p, q);
        TreeNode right = lowestCommonAncestor(root.right, p, q);
        if (left != null && right != null) return root;
        return left != null ? left : right;
    }
}

================================================
FILE: 0236-lowest-common-ancestor-of-a-binary-tree/NOTES.md
================================================
​

================================================
FILE: 0236-lowest-common-ancestor-of-a-binary-tree/README.md
================================================
<h2><a href="https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree/">236. Lowest Common Ancestor of a Binary Tree</a></h2><h3>Medium</h3><hr><div><p>Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree.</p>

<p>According to the <a href="https://en.wikipedia.org/wiki/Lowest_common_ancestor" target="_blank">definition of LCA on Wikipedia</a>: “The lowest common ancestor is defined between two nodes <code>p</code> and <code>q</code> as the lowest node in <code>T</code> that has both <code>p</code> and <code>q</code> as descendants (where we allow <b>a node to be a descendant of itself</b>).”</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>
<img alt="" src="https://assets.leetcode.com/uploads/2018/12/14/binarytree.png" style="width: 200px; height: 190px;">
<pre><strong>Input:</strong> root = [3,5,1,6,2,0,8,null,null,7,4], p = 5, q = 1
<strong>Output:</strong> 3
<strong>Explanation:</strong> The LCA of nodes 5 and 1 is 3.
</pre>

<p><strong class="example">Example 2:</strong></p>
<img alt="" src="https://assets.leetcode.com/uploads/2018/12/14/binarytree.png" style="width: 200px; height: 190px;">
<pre><strong>Input:</strong> root = [3,5,1,6,2,0,8,null,null,7,4], p = 5, q = 4
<strong>Output:</strong> 5
<strong>Explanation:</strong> The LCA of nodes 5 and 4 is 5, since a node can be a descendant of itself according to the LCA definition.
</pre>

<p><strong class="example">Example 3:</strong></p>

<pre><strong>Input:</strong> root = [1,2], p = 1, q = 2
<strong>Output:</strong> 1
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li>The number of nodes in the tree is in the range <code>[2, 10<sup>5</sup>]</code>.</li>
	<li><code>-10<sup>9</sup> &lt;= Node.val &lt;= 10<sup>9</sup></code></li>
	<li>All <code>Node.val</code> are <strong>unique</strong>.</li>
	<li><code>p != q</code></li>
	<li><code>p</code> and <code>q</code> will exist in the tree.</li>
</ul>
</div>

================================================
FILE: 0237-delete-node-in-a-linked-list/0237-delete-node-in-a-linked-list.java
================================================
class Solution {
    public void deleteNode(ListNode node) {
        // Since we know input node is not last node, so nextNode will not be null
        ListNode nextNode = node.next;
        // Step 2
        node.val = nextNode.val;
        // Step 3
        node.next = nextNode.next;
        nextNode.next = null;
    }
}

================================================
FILE: 0237-delete-node-in-a-linked-list/NOTES.md
================================================
​

================================================
FILE: 0237-delete-node-in-a-linked-list/README.md
================================================
<h2><a href="https://leetcode.com/problems/delete-node-in-a-linked-list/">237. Delete Node in a Linked List</a></h2><h3>Medium</h3><hr><div><p>There is a singly-linked list <code>head</code> and we want to delete a node <code>node</code> in it.</p>

<p>You are given the node to be deleted <code>node</code>. You will <strong>not be given access</strong> to the first node of <code>head</code>.</p>

<p>All the values of the linked list are <strong>unique</strong>, and it is guaranteed that the given node <code>node</code> is not the last node in the linked list.</p>

<p>Delete the given node. Note that by deleting the node, we do not mean removing it from memory. We mean:</p>

<ul>
	<li>The value of the given node should not exist in the linked list.</li>
	<li>The number of nodes in the linked list should decrease by one.</li>
	<li>All the values before <code>node</code> should be in the same order.</li>
	<li>All the values after <code>node</code> should be in the same order.</li>
</ul>

<p><strong>Custom testing:</strong></p>

<ul>
	<li>For the input, you should provide the entire linked list <code>head</code> and the node to be given <code>node</code>. <code>node</code> should not be the last node of the list and should be an actual node in the list.</li>
	<li>We will build the linked list and pass the node to your function.</li>
	<li>The output will be the entire list after calling your function.</li>
</ul>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>
<img alt="" src="https://assets.leetcode.com/uploads/2020/09/01/node1.jpg" style="width: 400px; height: 286px;">
<pre><strong>Input:</strong> head = [4,5,1,9], node = 5
<strong>Output:</strong> [4,1,9]
<strong>Explanation: </strong>You are given the second node with value 5, the linked list should become 4 -&gt; 1 -&gt; 9 after calling your function.
</pre>

<p><strong class="example">Example 2:</strong></p>
<img alt="" src="https://assets.leetcode.com/uploads/2020/09/01/node2.jpg" style="width: 400px; height: 315px;">
<pre><strong>Input:</strong> head = [4,5,1,9], node = 1
<strong>Output:</strong> [4,5,9]
<strong>Explanation: </strong>You are given the third node with value 1, the linked list should become 4 -&gt; 5 -&gt; 9 after calling your function.
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li>The number of the nodes in the given list is in the range <code>[2, 1000]</code>.</li>
	<li><code>-1000 &lt;= Node.val &lt;= 1000</code></li>
	<li>The value of each node in the list is <strong>unique</strong>.</li>
	<li>The <code>node</code> to be deleted is <strong>in the list</strong> and is <strong>not a tail</strong> node.</li>
</ul>
</div>

================================================
FILE: 0242-valid-anagram/0242-valid-anagram.cpp
================================================
class Solution {
public:
    bool isAnagram(string s, string t) {
    sort(s.begin(),s.end());
    sort(t.begin(),t.end());
    if(s==t)
    return true;
    else
    return false;
    }
};


================================================
FILE: 0242-valid-anagram/0242-valid-anagram.java
================================================
class Solution {
    public boolean isAnagram(String a, String b) {
        int[] arr=new int[128]; //O(1)
        if(a.length()!=b.length()){
            return false;
        }
        // abca
        // caba
        for(int i=0;i<a.length();i++){
            char ch1=a.charAt(i);
            char ch2=b.charAt(i);
            arr[ch1]++;
            arr[ch2]--;
        }//O(n)
        for(int i=0;i<arr.length;i++){
            if(arr[i]!=0){
                return false;
            }
        }
        return true;
    }
}

================================================
FILE: 0242-valid-anagram/NOTES.md
================================================
​

================================================
FILE: 0242-valid-anagram/README.md
================================================
<h2><a href="https://leetcode.com/problems/valid-anagram/">242. Valid Anagram</a></h2><h3>Easy</h3><hr><div><p>Given two strings <code>s</code> and <code>t</code>, return <code>true</code> <em>if</em> <code>t</code> <em>is an anagram of</em> <code>s</code><em>, and</em> <code>false</code> <em>otherwise</em>.</p>

<p>An <strong>Anagram</strong> is a word or phrase formed by rearranging the letters of a different word or phrase, typically using all the original letters exactly once.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>
<pre><strong>Input:</strong> s = "anagram", t = "nagaram"
<strong>Output:</strong> true
</pre><p><strong class="example">Example 2:</strong></p>
<pre><strong>Input:</strong> s = "rat", t = "car"
<strong>Output:</strong> false
</pre>
<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>1 &lt;= s.length, t.length &lt;= 5 * 10<sup>4</sup></code></li>
	<li><code>s</code> and <code>t</code> consist of lowercase English letters.</li>
</ul>

<p>&nbsp;</p>
<p><strong>Follow up:</strong> What if the inputs contain Unicode characters? How would you adapt your solution to such a case?</p>
</div>

================================================
FILE: 0263-ugly-number/0263-ugly-number.java
================================================
class Solution {
    public boolean isUgly(int n) {
        while(n!=0){
            if(n==1 || n==2 || n==3 || n==5){
                return true;
            }
            if(n%2==0){
                n/=2;
            }
            else if(n%3==0){
                n/=3;
            }
            else if(n%5==0){
                n/=5;
            }else{
                return false;
            }
        }
        return false;
    }
}

================================================
FILE: 0263-ugly-number/NOTES.md
================================================
​

================================================
FILE: 0263-ugly-number/README.md
================================================
<h2><a href="https://leetcode.com/problems/ugly-number/">263. Ugly Number</a></h2><h3>Easy</h3><hr><div><p>An <strong>ugly number</strong> is a positive integer whose prime factors are limited to <code>2</code>, <code>3</code>, and <code>5</code>.</p>

<p>Given an integer <code>n</code>, return <code>true</code> <em>if</em> <code>n</code> <em>is an <strong>ugly number</strong></em>.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>

<pre><strong>Input:</strong> n = 6
<strong>Output:</strong> true
<strong>Explanation:</strong> 6 = 2 × 3
</pre>

<p><strong class="example">Example 2:</strong></p>

<pre><strong>Input:</strong> n = 1
<strong>Output:</strong> true
<strong>Explanation:</strong> 1 has no prime factors, therefore all of its prime factors are limited to 2, 3, and 5.
</pre>

<p><strong class="example">Example 3:</strong></p>

<pre><strong>Input:</strong> n = 14
<strong>Output:</strong> false
<strong>Explanation:</strong> 14 is not ugly since it includes the prime factor 7.
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>-2<sup>31</sup> &lt;= n &lt;= 2<sup>31</sup> - 1</code></li>
</ul>
</div>

================================================
FILE: 0279-perfect-squares/0279-perfect-squares.java
================================================
class Solution {
    public int numSquares(int n) {
	int sqrt = (int) Math.sqrt(n);

	if (sqrt * sqrt == n) // Perfect square
		return 1;

	while (n % 4 == 0) // 4^a (8b + 7)
		n = n / 4;

	if (n % 8 == 7)
		return 4;

	for (int i = 1; i * i <= n; i++) { // Sum of two perfect squares
		int square = i * i;
		int base = (int) Math.sqrt(n - square);

		if (base * base == n - square)
			return 2;
	}

	return 3;
}
}

================================================
FILE: 0279-perfect-squares/NOTES.md
================================================
​

================================================
FILE: 0279-perfect-squares/README.md
================================================
<h2><a href="https://leetcode.com/problems/perfect-squares/">279. Perfect Squares</a></h2><h3>Medium</h3><hr><div><p>Given an integer <code>n</code>, return <em>the least number of perfect square numbers that sum to</em> <code>n</code>.</p>

<p>A <strong>perfect square</strong> is an integer that is the square of an integer; in other words, it is the product of some integer with itself. For example, <code>1</code>, <code>4</code>, <code>9</code>, and <code>16</code> are perfect squares while <code>3</code> and <code>11</code> are not.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>

<pre><strong>Input:</strong> n = 12
<strong>Output:</strong> 3
<strong>Explanation:</strong> 12 = 4 + 4 + 4.
</pre>

<p><strong class="example">Example 2:</strong></p>

<pre><strong>Input:</strong> n = 13
<strong>Output:</strong> 2
<strong>Explanation:</strong> 13 = 4 + 9.
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>1 &lt;= n &lt;= 10<sup>4</sup></code></li>
</ul>
</div>

================================================
FILE: 0290-word-pattern/0290-word-pattern.java
================================================
class Solution {
    public boolean wordPattern(String pattern, String s) {
        String[] words = s.split(" ");
        Map<Character,String> wordMap = new HashMap<>();
        Map<String, Character> charMap = new HashMap<>();
        if(pattern.length()!=words.length){
            return false;
        }
        for(int i= 0;i<pattern.length();i++){
            if(wordMap.containsKey(pattern.charAt(i)) && words[i].equals(wordMap.get(pattern.charAt(i)))){
                continue;
            } else if(!wordMap.containsKey(pattern.charAt(i))){
                if(wordMap.containsValue(words[i])){
                    return false;
                }
                wordMap.put(pattern.charAt(i), words[i]);
            } else if(wordMap.containsKey(pattern.charAt(i)) && !words[i].equals(wordMap.get(pattern.charAt(i)))){
                return false;
            }
        }
        return true;
    }
}

================================================
FILE: 0290-word-pattern/README.md
================================================
<h2><a href="https://leetcode.com/problems/word-pattern/">290. Word Pattern</a></h2><h3>Easy</h3><hr><div><p>Given a <code>pattern</code> and a string <code>s</code>, find if <code>s</code>&nbsp;follows the same pattern.</p>

<p>Here <b>follow</b> means a full match, such that there is a bijection between a letter in <code>pattern</code> and a <b>non-empty</b> word in <code>s</code>.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>

<pre><strong>Input:</strong> pattern = "abba", s = "dog cat cat dog"
<strong>Output:</strong> true
</pre>

<p><strong class="example">Example 2:</strong></p>

<pre><strong>Input:</strong> pattern = "abba", s = "dog cat cat fish"
<strong>Output:</strong> false
</pre>

<p><strong class="example">Example 3:</strong></p>

<pre><strong>Input:</strong> pattern = "aaaa", s = "dog cat cat dog"
<strong>Output:</strong> false
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>1 &lt;= pattern.length &lt;= 300</code></li>
	<li><code>pattern</code> contains only lower-case English letters.</li>
	<li><code>1 &lt;= s.length &lt;= 3000</code></li>
	<li><code>s</code> contains only lowercase English letters and spaces <code>' '</code>.</li>
	<li><code>s</code> <strong>does not contain</strong> any leading or trailing spaces.</li>
	<li>All the words in <code>s</code> are separated by a <strong>single space</strong>.</li>
</ul>
</div>

================================================
FILE: 0295-find-median-from-data-stream/0295-find-median-from-data-stream.java
================================================
class MedianFinder {
    
    ArrayList<Integer> list;

    public MedianFinder() {
        list = new ArrayList<>();
    }
    
    public void addNum(int num) {
        int i;
        if(list.size() > 0){
            for (i = 0; (i < list.size()  && list.get(i) < num); i++);
            if(i == -1){
                i = 0;
            }
            list.add(i , num);
        }else{
            list.add(num);
        }
    }
    
    public double findMedian() {
        // System.out.println(list);
        int index = list.size()/2;
        if(list.size() % 2 == 0){
            return (double) (list.get(index) + list.get(index - 1))/2;
        }else{
            return list.get(index);
        }
        
    }
}

================================================
FILE: 0295-find-median-from-data-stream/NOTES.md
================================================
​

================================================
FILE: 0295-find-median-from-data-stream/README.md
================================================
<h2><a href="https://leetcode.com/problems/find-median-from-data-stream/">295. Find Median from Data Stream</a></h2><h3>Hard</h3><hr><div><p>The <strong>median</strong> is the middle value in an ordered integer list. If the size of the list is even, there is no middle value, and the median is the mean of the two middle values.</p>

<ul>
	<li>For example, for <code>arr = [2,3,4]</code>, the median is <code>3</code>.</li>
	<li>For example, for <code>arr = [2,3]</code>, the median is <code>(2 + 3) / 2 = 2.5</code>.</li>
</ul>

<p>Implement the MedianFinder class:</p>

<ul>
	<li><code>MedianFinder()</code> initializes the <code>MedianFinder</code> object.</li>
	<li><code>void addNum(int num)</code> adds the integer <code>num</code> from the data stream to the data structure.</li>
	<li><code>double findMedian()</code> returns the median of all elements so far. Answers within <code>10<sup>-5</sup></code> of the actual answer will be accepted.</li>
</ul>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>

<pre><strong>Input</strong>
["MedianFinder", "addNum", "addNum", "findMedian", "addNum", "findMedian"]
[[], [1], [2], [], [3], []]
<strong>Output</strong>
[null, null, null, 1.5, null, 2.0]

<strong>Explanation</strong>
MedianFinder medianFinder = new MedianFinder();
medianFinder.addNum(1);    // arr = [1]
medianFinder.addNum(2);    // arr = [1, 2]
medianFinder.findMedian(); // return 1.5 (i.e., (1 + 2) / 2)
medianFinder.addNum(3);    // arr[1, 2, 3]
medianFinder.findMedian(); // return 2.0
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>-10<sup>5</sup> &lt;= num &lt;= 10<sup>5</sup></code></li>
	<li>There will be at least one element in the data structure before calling <code>findMedian</code>.</li>
	<li>At most <code>5 * 10<sup>4</sup></code> calls will be made to <code>addNum</code> and <code>findMedian</code>.</li>
</ul>

<p>&nbsp;</p>
<p><strong>Follow up:</strong></p>

<ul>
	<li>If all integer numbers from the stream are in the range <code>[0, 100]</code>, how would you optimize your solution?</li>
	<li>If <code>99%</code> of all integer numbers from the stream are in the range <code>[0, 100]</code>, how would you optimize your solution?</li>
</ul>
</div>

================================================
FILE: 0309-best-time-to-buy-and-sell-stock-with-cooldown/0309-best-time-to-buy-and-sell-stock-with-cooldown.java
================================================
class Solution {
    public int maxProfit(int[] prices) {
        if (prices == null || prices.length <= 1) {
            return 0;
        }
        int len = prices.length;
        int[] hold = new int[len];
        int[] unHold = new int[len];
        hold[0] = -prices[0];
        hold[1] = Math.max(-prices[0], -prices[1]);
        unHold[0] = 0;
        unHold[1] = Math.max(0, prices[1] - prices[0]);
        for (int i = 2; i < len; i++) {
            hold[i] = Math.max(hold[i - 1], unHold[i - 2] - prices[i]);        
            unHold[i] = Math.max(unHold[i - 1], hold[i - 1] + prices[i]);
        }
        return unHold[len - 1];
    }
}

================================================
FILE: 0309-best-time-to-buy-and-sell-stock-with-cooldown/NOTES.md
================================================
​

================================================
FILE: 0309-best-time-to-buy-and-sell-stock-with-cooldown/README.md
================================================
<h2><a href="https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-cooldown/">309. Best Time to Buy and Sell Stock with Cooldown</a></h2><h3>Medium</h3><hr><div><p>You are given an array <code>prices</code> where <code>prices[i]</code> is the price of a given stock on the <code>i<sup>th</sup></code> day.</p>

<p>Find the maximum profit you can achieve. You may complete as many transactions as you like (i.e., buy one and sell one share of the stock multiple times) with the following restrictions:</p>

<ul>
	<li>After you sell your stock, you cannot buy stock on the next day (i.e., cooldown one day).</li>
</ul>

<p><strong>Note:</strong> You may not engage in multiple transactions simultaneously (i.e., you must sell the stock before you buy again).</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>

<pre><strong>Input:</strong> prices = [1,2,3,0,2]
<strong>Output:</strong> 3
<strong>Explanation:</strong> transactions = [buy, sell, cooldown, buy, sell]
</pre>

<p><strong class="example">Example 2:</strong></p>

<pre><strong>Input:</strong> prices = [1]
<strong>Output:</strong> 0
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>1 &lt;= prices.length &lt;= 5000</code></li>
	<li><code>0 &lt;= prices[i] &lt;= 1000</code></li>
</ul>
</div>

================================================
FILE: 0328-odd-even-linked-list/0328-odd-even-linked-list.java
================================================
/**
 * Definition for singly-linked list.
 * public class ListNode {
 *     int val;
 *     ListNode next;
 *     ListNode() {}
 *     ListNode(int val) { this.val = val; }
 *     ListNode(int val, ListNode next) { this.val = val; this.next = next; }
 * }
 */
class Solution {
    public ListNode oddEvenList(ListNode head) {
        if(head==null || head.next==null)return head;
        ListNode oddHead=head;
        ListNode evenHead=head.next;
        ListNode odd=head;
        ListNode even=head.next;
        while(odd!=null && even!=null && even.next!=null){
            odd.next=odd.next.next;
            even.next=even.next.next;
            odd=odd.next;
            even=even.next;
        }
        if(odd==null)even.next=oddHead;
        else odd.next=evenHead;
        return oddHead;
    }
}

================================================
FILE: 0328-odd-even-linked-list/NOTES.md
================================================
​

================================================
FILE: 0328-odd-even-linked-list/README.md
================================================
<h2><a href="https://leetcode.com/problems/odd-even-linked-list/">328. Odd Even Linked List</a></h2><h3>Medium</h3><hr><div><p>Given the <code>head</code> of a singly linked list, group all the nodes with odd indices together followed by the nodes with even indices, and return <em>the reordered list</em>.</p>

<p>The <strong>first</strong> node is considered <strong>odd</strong>, and the <strong>second</strong> node is <strong>even</strong>, and so on.</p>

<p>Note that the relative order inside both the even and odd groups should remain as it was in the input.</p>

<p>You must solve the problem&nbsp;in <code>O(1)</code>&nbsp;extra space complexity and <code>O(n)</code> time complexity.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>
<img alt="" src="https://assets.leetcode.com/uploads/2021/03/10/oddeven-linked-list.jpg" style="width: 300px; height: 123px;">
<pre><strong>Input:</strong> head = [1,2,3,4,5]
<strong>Output:</strong> [1,3,5,2,4]
</pre>

<p><strong class="example">Example 2:</strong></p>
<img alt="" src="https://assets.leetcode.com/uploads/2021/03/10/oddeven2-linked-list.jpg" style="width: 500px; height: 142px;">
<pre><strong>Input:</strong> head = [2,1,3,5,6,4,7]
<strong>Output:</strong> [2,3,6,7,1,5,4]
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li>The number of nodes in the linked list is in the range <code>[0, 10<sup>4</sup>]</code>.</li>
	<li><code>-10<sup>6</sup> &lt;= Node.val &lt;= 10<sup>6</sup></code></li>
</ul>
</div>

================================================
FILE: 0334-increasing-triplet-subsequence/0334-increasing-triplet-subsequence.java
================================================
class Solution {
    public boolean increasingTriplet(int[] nums) {
        int first_num = Integer.MAX_VALUE;
        int second_num = Integer.MAX_VALUE;
        for(int num:nums)
        {
            if(num<=first_num)
            {
                first_num = num;
            }
            else if(num<=second_num)
            {
                second_num = num;
            }else
            {
                return true;
            }
        }
        return false;
    }
}

================================================
FILE: 0334-increasing-triplet-subsequence/NOTES.md
================================================
​

================================================
FILE: 0334-increasing-triplet-subsequence/README.md
================================================
<h2><a href="https://leetcode.com/problems/increasing-triplet-subsequence/">334. Increasing Triplet Subsequence</a></h2><h3>Medium</h3><hr><div><p>Given an integer array <code>nums</code>, return <code>true</code><em> if there exists a triple of indices </em><code>(i, j, k)</code><em> such that </em><code>i &lt; j &lt; k</code><em> and </em><code>nums[i] &lt; nums[j] &lt; nums[k]</code>. If no such indices exists, return <code>false</code>.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>

<pre><strong>Input:</strong> nums = [1,2,3,4,5]
<strong>Output:</strong> true
<strong>Explanation:</strong> Any triplet where i &lt; j &lt; k is valid.
</pre>

<p><strong class="example">Example 2:</strong></p>

<pre><strong>Input:</strong> nums = [5,4,3,2,1]
<strong>Output:</strong> false
<strong>Explanation:</strong> No triplet exists.
</pre>

<p><strong class="example">Example 3:</strong></p>

<pre><strong>Input:</strong> nums = [2,1,5,0,4,6]
<strong>Output:</strong> true
<strong>Explanation:</strong> The triplet (3, 4, 5) is valid because nums[3] == 0 &lt; nums[4] == 4 &lt; nums[5] == 6.
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>1 &lt;= nums.length &lt;= 5 * 10<sup>5</sup></code></li>
	<li><code>-2<sup>31</sup> &lt;= nums[i] &lt;= 2<sup>31</sup> - 1</code></li>
</ul>

<p>&nbsp;</p>
<strong>Follow up:</strong> Could you implement a solution that runs in <code>O(n)</code> time complexity and <code>O(1)</code> space complexity?</div>

================================================
FILE: 0345-reverse-vowels-of-a-string/0345-reverse-vowels-of-a-string.java
================================================
class Solution {
    public String reverseVowels(String s) {
        int i=0;
        int j=s.length()-1;
        char[]arr=s.toCharArray();
        while(i<j){
            while(i<j && !vowel(arr[i]))i++;
            while(j>i && !vowel(arr[j]))j--;
            if(i>j)break;
            char temp=arr[i];
            arr[i]=arr[j];
            arr[j]=temp;
            i++;
            j--;
        }
        return new String(arr);
    }
    boolean vowel(char c){
        return switch (c) {
            case 'a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U' -> true;
            default -> false;
        };
        
    }
}

================================================
FILE: 0345-reverse-vowels-of-a-string/NOTES.md
================================================
​

================================================
FILE: 0345-reverse-vowels-of-a-string/README.md
================================================
<h2><a href="https://leetcode.com/problems/reverse-vowels-of-a-string/">345. Reverse Vowels of a String</a></h2><h3>Easy</h3><hr><div><p>Given a string <code>s</code>, reverse only all the vowels in the string and return it.</p>

<p>The vowels are <code>'a'</code>, <code>'e'</code>, <code>'i'</code>, <code>'o'</code>, and <code>'u'</code>, and they can appear in both lower and upper cases, more than once.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>
<pre><strong>Input:</strong> s = "hello"
<strong>Output:</strong> "holle"
</pre><p><strong class="example">Example 2:</strong></p>
<pre><strong>Input:</strong> s = "leetcode"
<strong>Output:</strong> "leotcede"
</pre>
<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>1 &lt;= s.length &lt;= 3 * 10<sup>5</sup></code></li>
	<li><code>s</code> consist of <strong>printable ASCII</strong> characters.</li>
</ul>
</div>

================================================
FILE: 0374-guess-number-higher-or-lower/0374-guess-number-higher-or-lower.java
================================================
/* The guess API is defined in the parent class GuessGame.
   @param num, your guess
   @return -1 if my number is lower, 1 if my number is higher, otherwise return 0
      int guess(int num); */

public class Solution extends GuessGame {
    public int guessNumber(int n) {
        int low = 1;
        int high = n;
        while (low <= high) {
            int mid1 = low + (high - low) / 3;
            int mid2 = high - (high - low) / 3;
            int res1 = guess(mid1);
            int res2 = guess(mid2);
            if (res1 == 0)
                return mid1;
            if (res2 == 0)
                return mid2;
            else if (res1 < 0)
                high = mid1 - 1;
            else if (res2 > 0)
                low = mid2 + 1;
            else {
                low = mid1 + 1;
                high = mid2 - 1;
            }
        }
        return -1;
    }
}

================================================
FILE: 0374-guess-number-higher-or-lower/NOTES.md
================================================
​

================================================
FILE: 0374-guess-number-higher-or-lower/README.md
================================================
<h2><a href="https://leetcode.com/problems/guess-number-higher-or-lower/">374. Guess Number Higher or Lower</a></h2><h3>Easy</h3><hr><div><p>We are playing the Guess Game. The game is as follows:</p>

<p>I pick a number from <code>1</code> to <code>n</code>. You have to guess which number I picked.</p>

<p>Every time you guess wrong, I will tell you whether the number I picked is higher or lower than your guess.</p>

<p>You call a pre-defined API <code>int guess(int num)</code>, which returns three possible results:</p>

<ul>
	<li><code>-1</code>: Your guess is higher than the number I picked (i.e. <code>num &gt; pick</code>).</li>
	<li><code>1</code>: Your guess is lower than the number I picked (i.e. <code>num &lt; pick</code>).</li>
	<li><code>0</code>: your guess is equal to the number I picked (i.e. <code>num == pick</code>).</li>
</ul>

<p>Return <em>the number that I picked</em>.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>

<pre><strong>Input:</strong> n = 10, pick = 6
<strong>Output:</strong> 6
</pre>

<p><strong class="example">Example 2:</strong></p>

<pre><strong>Input:</strong> n = 1, pick = 1
<strong>Output:</strong> 1
</pre>

<p><strong class="example">Example 3:</strong></p>

<pre><strong>Input:</strong> n = 2, pick = 1
<strong>Output:</strong> 1
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>1 &lt;= n &lt;= 2<sup>31</sup> - 1</code></li>
	<li><code>1 &lt;= pick &lt;= n</code></li>
</ul>
</div>

================================================
FILE: 0380-insert-delete-getrandom-o1/0380-insert-delete-getrandom-o1.java
================================================
class RandomizedSet {
    List<Integer> list;
    HashMap<Integer,Integer> map;
    
    public RandomizedSet() {
        list=new ArrayList<>();
        map=new HashMap<>();
    }
    
    public boolean insert(int val) {
        if(!map.containsKey(val)){
            list.add(val);
            map.put(val,list.size()-1);
            return true;
        }
        return false;
    }
    
    // Swap value to be removed with last value. Remove now the value at last 
    // index & update map with new index and remove the value to be removed.
    public boolean remove(int val) {
        if(map.containsKey(val)){
            int index=map.get(val);
            swap(index);
            list.remove(list.size()-1);
            map.remove(val);
            return true;
        }
        return false;
    }
    
    // User defined.
    private void swap(int index) {
        int lastIndex=list.size()-1;
        int lastVal=list.get(lastIndex);
        
        int temp=list.get(index);
        list.set(index,lastVal);
        
        map.put(lastVal,index);
    }
    
    public int getRandom() {
        return list.get(new Random().nextInt(list.size()));
    }
}

================================================
FILE: 0380-insert-delete-getrandom-o1/NOTES.md
================================================
​

================================================
FILE: 0380-insert-delete-getrandom-o1/README.md
================================================
<h2><a href="https://leetcode.com/problems/insert-delete-getrandom-o1/">380. Insert Delete GetRandom O(1)</a></h2><h3>Medium</h3><hr><div><p>Implement the <code>RandomizedSet</code> class:</p>

<ul>
	<li><code>RandomizedSet()</code> Initializes the <code>RandomizedSet</code> object.</li>
	<li><code>bool insert(int val)</code> Inserts an item <code>val</code> into the set if not present. Returns <code>true</code> if the item was not present, <code>false</code> otherwise.</li>
	<li><code>bool remove(int val)</code> Removes an item <code>val</code> from the set if present. Returns <code>true</code> if the item was present, <code>false</code> otherwise.</li>
	<li><code>int getRandom()</code> Returns a random element from the current set of elements (it's guaranteed that at least one element exists when this method is called). Each element must have the <b>same probability</b> of being returned.</li>
</ul>

<p>You must implement the functions of the class such that each function works in&nbsp;<strong>average</strong>&nbsp;<code>O(1)</code>&nbsp;time complexity.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>

<pre><strong>Input</strong>
["RandomizedSet", "insert", "remove", "insert", "getRandom", "remove", "insert", "getRandom"]
[[], [1], [2], [2], [], [1], [2], []]
<strong>Output</strong>
[null, true, false, true, 2, true, false, 2]

<strong>Explanation</strong>
RandomizedSet randomizedSet = new RandomizedSet();
randomizedSet.insert(1); // Inserts 1 to the set. Returns true as 1 was inserted successfully.
randomizedSet.remove(2); // Returns false as 2 does not exist in the set.
randomizedSet.insert(2); // Inserts 2 to the set, returns true. Set now contains [1,2].
randomizedSet.getRandom(); // getRandom() should return either 1 or 2 randomly.
randomizedSet.remove(1); // Removes 1 from the set, returns true. Set now contains [2].
randomizedSet.insert(2); // 2 was already in the set, so return false.
randomizedSet.getRandom(); // Since 2 is the only number in the set, getRandom() will always return 2.
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>-2<sup>31</sup> &lt;= val &lt;= 2<sup>31</sup> - 1</code></li>
	<li>At most <code>2 *&nbsp;</code><code>10<sup>5</sup></code> calls will be made to <code>insert</code>, <code>remove</code>, and <code>getRandom</code>.</li>
	<li>There will be <strong>at least one</strong> element in the data structure when <code>getRandom</code> is called.</li>
</ul>
</div>

================================================
FILE: 0409-longest-palindrome/0409-longest-palindrome.java
================================================
class Solution {
    public int longestPalindrome(String s) {
        int[]freq=new int[123];
        for(char c:s.toCharArray()){
            freq[c]++;
        }
        int ans=0;
        boolean hasOdd=false;
        for(int i:freq){
            if((i&1)==1){
                hasOdd=true;
                ans+=i-1;
            }else{
                ans+=i;
            }
        }
        return hasOdd?ans+1:ans;
    }
}

================================================
FILE: 0409-longest-palindrome/NOTES.md
================================================
​

================================================
FILE: 0409-longest-palindrome/README.md
================================================
<h2><a href="https://leetcode.com/problems/longest-palindrome/">409. Longest Palindrome</a></h2><h3>Easy</h3><hr><div><p>Given a string <code>s</code> which consists of lowercase or uppercase letters, return <em>the length of the <strong>longest palindrome</strong></em>&nbsp;that can be built with those letters.</p>

<p>Letters are <strong>case sensitive</strong>, for example,&nbsp;<code>"Aa"</code> is not considered a palindrome here.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>

<pre><strong>Input:</strong> s = "abccccdd"
<strong>Output:</strong> 7
<strong>Explanation:</strong> One longest palindrome that can be built is "dccaccd", whose length is 7.
</pre>

<p><strong class="example">Example 2:</strong></p>

<pre><strong>Input:</strong> s = "a"
<strong>Output:</strong> 1
<strong>Explanation:</strong> The longest palindrome that can be built is "a", whose length is 1.
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>1 &lt;= s.length &lt;= 2000</code></li>
	<li><code>s</code> consists of lowercase <strong>and/or</strong> uppercase English&nbsp;letters only.</li>
</ul>
</div>

================================================
FILE: 0446-arithmetic-slices-ii-subsequence/0446-arithmetic-slices-ii-subsequence.java
================================================

class Solution {
    public int numberOfArithmeticSlices(int[] A) {
        int n = A.length;
        long ans = 0;
        Map<Integer, Integer>[] cnt = new Map[n];
        for (int i = 0; i < n; i++) {
            cnt[i] = new HashMap<>(i);
            for (int j = 0; j < i; j++) {
                long delta = (long)A[i] - (long)A[j];
                if (delta < Integer.MIN_VALUE || delta > Integer.MAX_VALUE) {
                    continue;
                }
                int diff = (int)delta;
                int sum = cnt[j].getOrDefault(diff, 0);
                int origin = cnt[i].getOrDefault(diff, 0);
                cnt[i].put(diff, origin + sum + 1);
                ans += sum;
            }
        }
        return (int)ans;        
    }
}

================================================
FILE: 0446-arithmetic-slices-ii-subsequence/NOTES.md
================================================
​

================================================
FILE: 0446-arithmetic-slices-ii-subsequence/README.md
================================================
<h2><a href="https://leetcode.com/problems/arithmetic-slices-ii-subsequence/">446. Arithmetic Slices II - Subsequence</a></h2><h3>Hard</h3><hr><div><p>Given an integer array <code>nums</code>, return <em>the number of all the <strong>arithmetic subsequences</strong> of</em> <code>nums</code>.</p>

<p>A sequence of numbers is called arithmetic if it consists of <strong>at least three elements</strong> and if the difference between any two consecutive elements is the same.</p>

<ul>
	<li>For example, <code>[1, 3, 5, 7, 9]</code>, <code>[7, 7, 7, 7]</code>, and <code>[3, -1, -5, -9]</code> are arithmetic sequences.</li>
	<li>For example, <code>[1, 1, 2, 5, 7]</code> is not an arithmetic sequence.</li>
</ul>

<p>A <strong>subsequence</strong> of an array is a sequence that can be formed by removing some elements (possibly none) of the array.</p>

<ul>
	<li>For example, <code>[2,5,10]</code> is a subsequence of <code>[1,2,1,<strong><u>2</u></strong>,4,1,<u><strong>5</strong></u>,<u><strong>10</strong></u>]</code>.</li>
</ul>

<p>The test cases are generated so that the answer fits in <strong>32-bit</strong> integer.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>

<pre><strong>Input:</strong> nums = [2,4,6,8,10]
<strong>Output:</strong> 7
<strong>Explanation:</strong> All arithmetic subsequence slices are:
[2,4,6]
[4,6,8]
[6,8,10]
[2,4,6,8]
[4,6,8,10]
[2,4,6,8,10]
[2,6,10]
</pre>

<p><strong class="example">Example 2:</strong></p>

<pre><strong>Input:</strong> nums = [7,7,7,7,7]
<strong>Output:</strong> 16
<strong>Explanation:</strong> Any subsequence of this array is arithmetic.
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>1&nbsp; &lt;= nums.length &lt;= 1000</code></li>
	<li><code>-2<sup>31</sup> &lt;= nums[i] &lt;= 2<sup>31</sup> - 1</code></li>
</ul>
</div>

================================================
FILE: 0451-sort-characters-by-frequency/0451-sort-characters-by-frequency.java
================================================
class Solution {
    public String frequencySort(String s) {
        int[] a = new int[750];
        
        for(int i=0;i<s.length();i++)
            a[s.charAt(i)-48]++;
        
        StringBuffer sb = new StringBuffer();
        while(sb.length()!=s.length())
        {
            int max_freq=0;
            for(int i=0;i<a.length;i++)
            {
                if(a[i]>a[max_freq])
                    max_freq=i;
            }
            sb.append(String.valueOf((char)(max_freq+48)).repeat(a[max_freq]));
            a[max_freq]=0; 
        }
        return sb.toString();
    }
}

================================================
FILE: 0451-sort-characters-by-frequency/NOTES.md
================================================
​

================================================
FILE: 0451-sort-characters-by-frequency/README.md
================================================
<h2><a href="https://leetcode.com/problems/sort-characters-by-frequency/">451. Sort Characters By Frequency</a></h2><h3>Medium</h3><hr><div><p>Given a string <code>s</code>, sort it in <strong>decreasing order</strong> based on the <strong>frequency</strong> of the characters. The <strong>frequency</strong> of a character is the number of times it appears in the string.</p>

<p>Return <em>the sorted string</em>. If there are multiple answers, return <em>any of them</em>.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>

<pre><strong>Input:</strong> s = "tree"
<strong>Output:</strong> "eert"
<strong>Explanation:</strong> 'e' appears twice while 'r' and 't' both appear once.
So 'e' must appear before both 'r' and 't'. Therefore "eetr" is also a valid answer.
</pre>

<p><strong class="example">Example 2:</strong></p>

<pre><strong>Input:</strong> s = "cccaaa"
<strong>Output:</strong> "aaaccc"
<strong>Explanation:</strong> Both 'c' and 'a' appear three times, so both "cccaaa" and "aaaccc" are valid answers.
Note that "cacaca" is incorrect, as the same characters must be together.
</pre>

<p><strong class="example">Example 3:</strong></p>

<pre><strong>Input:</strong> s = "Aabb"
<strong>Output:</strong> "bbAa"
<strong>Explanation:</strong> "bbaA" is also a valid answer, but "Aabb" is incorrect.
Note that 'A' and 'a' are treated as two different characters.
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>1 &lt;= s.length &lt;= 5 * 10<sup>5</sup></code></li>
	<li><code>s</code> consists of uppercase and lowercase English letters and digits.</li>
</ul>
</div>

================================================
FILE: 0452-minimum-number-of-arrows-to-burst-balloons/0452-minimum-number-of-arrows-to-burst-balloons.java
================================================
class Solution {
    public int findMinArrowShots(int[][] points) {
        
        // This Problem is similar to Non Overlapping Interval Problem of Greedy Approach
        // Link for detiled discussion : http://www.leetcode-solution.com/2019/06/01/0452-minimum-number-of-arrows-to-burst-balloons.html
        
        // Base case
        if(points.length == 0)
            return 0;
        
        // Sort the point accroding to their end points i.e., a[1] - b[1]
        Arrays.sort(points, (a,b) -> a[1] - b[1]);
        
        // Position arrow at end (Extreme Right) as it has maximum chance of hittng there
        int arrPos = points[0][1];
        int count = 1; // Minimun 1 arrow is required to shoot any points
        
        for(int i = 1; i < points.length; i++ ) // start with 1 as 0th index end will be check for start of 1st 
        {
            int left  = points[i][0];
            int right = points[i][1];
            
            
            //check whether the arrowFired can burst other balloons.
            //if not fire arrow at the next point end value
            if (!(arrPos >= left && arrPos <= right)) 
            {
                
                count++; // increase the arrowsFired by 1.
                arrPos = points[i][1];  // next point end value.
                
            }
          /*  if(arrPos >= points[i][0]) // Since Current arrow position than start pos of array that means we can 
            {                          // continue, but as soon as it not true we break as our current arrow pos
                continue;              // cant handle beyond that point . so update its pos and count++
            }
            count++ ;                 // As we are done with current pos 
            arrPos = points[i][1];    // Update as we already exhausted our option with previous position
        */
        
        }
        
        return count;
    }
}


================================================
FILE: 0452-minimum-number-of-arrows-to-burst-balloons/NOTES.md
================================================
​

================================================
FILE: 0452-minimum-number-of-arrows-to-burst-balloons/README.md
================================================
<h2><a href="https://leetcode.com/problems/minimum-number-of-arrows-to-burst-balloons/">452. Minimum Number of Arrows to Burst Balloons</a></h2><h3>Medium</h3><hr><div><p>There are some spherical balloons taped onto a flat wall that represents the XY-plane. The balloons are represented as a 2D integer array <code>points</code> where <code>points[i] = [x<sub>start</sub>, x<sub>end</sub>]</code> denotes a balloon whose <strong>horizontal diameter</strong> stretches between <code>x<sub>start</sub></code> and <code>x<sub>end</sub></code>. You do not know the exact y-coordinates of the balloons.</p>

<p>Arrows can be shot up <strong>directly vertically</strong> (in the positive y-direction) from different points along the x-axis. A balloon with <code>x<sub>start</sub></code> and <code>x<sub>end</sub></code> is <strong>burst</strong> by an arrow shot at <code>x</code> if <code>x<sub>start</sub> &lt;= x &lt;= x<sub>end</sub></code>. There is <strong>no limit</strong> to the number of arrows that can be shot. A shot arrow keeps traveling up infinitely, bursting any balloons in its path.</p>

<p>Given the array <code>points</code>, return <em>the <strong>minimum</strong> number of arrows that must be shot to burst all balloons</em>.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>

<pre><strong>Input:</strong> points = [[10,16],[2,8],[1,6],[7,12]]
<strong>Output:</strong> 2
<strong>Explanation:</strong> The balloons can be burst by 2 arrows:
- Shoot an arrow at x = 6, bursting the balloons [2,8] and [1,6].
- Shoot an arrow at x = 11, bursting the balloons [10,16] and [7,12].
</pre>

<p><strong class="example">Example 2:</strong></p>

<pre><strong>Input:</strong> points = [[1,2],[3,4],[5,6],[7,8]]
<strong>Output:</strong> 4
<strong>Explanation:</strong> One arrow needs to be shot for each balloon for a total of 4 arrows.
</pre>

<p><strong class="example">Example 3:</strong></p>

<pre><strong>Input:</strong> points = [[1,2],[2,3],[3,4],[4,5]]
<strong>Output:</strong> 2
<strong>Explanation:</strong> The balloons can be burst by 2 arrows:
- Shoot an arrow at x = 2, bursting the balloons [1,2] and [2,3].
- Shoot an arrow at x = 4, bursting the balloons [3,4] and [4,5].
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>1 &lt;= points.length &lt;= 10<sup>5</sup></code></li>
	<li><code>points[i].length == 2</code></li>
	<li><code>-2<sup>31</sup> &lt;= x<sub>start</sub> &lt; x<sub>end</sub> &lt;= 2<sup>31</sup> - 1</code></li>
</ul>
</div>

================================================
FILE: 0491-non-decreasing-subsequences/0491-non-decreasing-subsequences.java
================================================
class Solution {
    private void backtrack(int[] nums, int index, List<Integer> sequence,
            Set<List<Integer>> result) {
        // if we have checked all elements
        if (index == nums.length) {
            if (sequence.size() >= 2) {
                result.add(new ArrayList<>(sequence));
            }
            return;
        }
        // if the sequence remains increasing after appending nums[index]
        if (sequence.isEmpty() ||
                sequence.get(sequence.size() - 1) <= nums[index]) {
            // append nums[index] to the sequence
            sequence.add(nums[index]);
            // call recursively
            backtrack(nums, index + 1, sequence, result);
            // delete nums[index] from the end of the sequence
            sequence.remove(sequence.size() - 1);
        }
        // call recursively not appending an element
        backtrack(nums, index + 1, sequence, result);
    }

    public List<List<Integer>> findSubsequences(int[] nums) {
        Set<List<Integer>> result = new HashSet<List<Integer>>();
        List<Integer> sequence = new ArrayList<Integer>();
        backtrack(nums, 0, sequence, result);
        return new ArrayList(result);
    }
}

================================================
FILE: 0491-non-decreasing-subsequences/NOTES.md
================================================
​

================================================
FILE: 0491-non-decreasing-subsequences/README.md
================================================
<h2><a href="https://leetcode.com/problems/non-decreasing-subsequences/">491. Non-decreasing Subsequences</a></h2><h3>Medium</h3><hr><div><p>Given an integer array <code>nums</code>, return <em>all the different possible non-decreasing subsequences of the given array with at least two elements</em>. You may return the answer in <strong>any order</strong>.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>

<pre><strong>Input:</strong> nums = [4,6,7,7]
<strong>Output:</strong> [[4,6],[4,6,7],[4,6,7,7],[4,7],[4,7,7],[6,7],[6,7,7],[7,7]]
</pre>

<p><strong class="example">Example 2:</strong></p>

<pre><strong>Input:</strong> nums = [4,4,3,2,1]
<strong>Output:</strong> [[4,4]]
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>1 &lt;= nums.length &lt;= 15</code></li>
	<li><code>-100 &lt;= nums[i] &lt;= 100</code></li>
</ul>
</div>

================================================
FILE: 0520-detect-capital/0520-detect-capital.java
================================================
class Solution {
    public boolean detectCapitalUse(String word) {
        int n = word.length();
        if (n == 1) {
            return true;
        }

        // case 1: All capital
        if (Character.isUpperCase(word.charAt(0)) && Character.isUpperCase(word.charAt(1))) {
            for (int i = 2; i < n; i++) {
                if (Character.isLowerCase(word.charAt(i))) {
                    return false;
                }
            }
        // case 2 and case 3
        } else {
            for (int i = 1; i < n; i++) {
                if (Character.isUpperCase(word.charAt(i))) {
                    return false;
                }
            }
        }

        // if pass one of the cases
        return true;
    }
}

================================================
FILE: 0520-detect-capital/NOTES.md
================================================
​

================================================
FILE: 0523-continuous-subarray-sum/0523-continuous-subarray-sum.java
================================================
class Solution 
{
    public boolean checkSubarraySum(int[] nums, int k) 
    {
        int prefixSum = 0;
        
        HashMap<Integer, Integer> map = new HashMap<>();
        
        map.put(0, -1);

        for (int i = 0; i < nums.length; i++)
        {
            prefixSum += nums[i];
            
            // this is the twist
            if (k != 0)
            {
                prefixSum = prefixSum % k;  //whose elements sum up to a multiple of k
            }
            
            // this is general
            if (map.containsKey(prefixSum))
            {
                //  if nums has a continuous subarray of size at least two elements
                if (i - map.get(prefixSum) > 1)  
                {
                    return true;
                }
            }
            else
            {
                map.put(prefixSum, i);  // adding the index
            }
        }
        return false;
    }
}

================================================
FILE: 0523-continuous-subarray-sum/NOTES.md
================================================
​

================================================
FILE: 0523-continuous-subarray-sum/README.md
================================================
<h2><a href="https://leetcode.com/problems/continuous-subarray-sum/">523. Continuous Subarray Sum</a></h2><h3>Medium</h3><hr><div><p>Given an integer array <code>nums</code> and an integer <code>k</code>, return <code>true</code> <em>if </em><code>nums</code><em> has a continuous subarray of size <strong>at least two</strong> whose elements sum up to a multiple of</em> <code>k</code><em>, or </em><code>false</code><em> otherwise</em>.</p>

<p>An integer <code>x</code> is a multiple of <code>k</code> if there exists an integer <code>n</code> such that <code>x = n * k</code>. <code>0</code> is <strong>always</strong> a multiple of <code>k</code>.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>

<pre><strong>Input:</strong> nums = [23,<u>2,4</u>,6,7], k = 6
<strong>Output:</strong> true
<strong>Explanation:</strong> [2, 4] is a continuous subarray of size 2 whose elements sum up to 6.
</pre>

<p><strong class="example">Example 2:</strong></p>

<pre><strong>Input:</strong> nums = [<u>23,2,6,4,7</u>], k = 6
<strong>Output:</strong> true
<strong>Explanation:</strong> [23, 2, 6, 4, 7] is an continuous subarray of size 5 whose elements sum up to 42.
42 is a multiple of 6 because 42 = 7 * 6 and 7 is an integer.
</pre>

<p><strong class="example">Example 3:</strong></p>

<pre><strong>Input:</strong> nums = [23,2,6,4,7], k = 13
<strong>Output:</strong> false
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>1 &lt;= nums.length &lt;= 10<sup>5</sup></code></li>
	<li><code>0 &lt;= nums[i] &lt;= 10<sup>9</sup></code></li>
	<li><code>0 &lt;= sum(nums[i]) &lt;= 2<sup>31</sup> - 1</code></li>
	<li><code>1 &lt;= k &lt;= 2<sup>31</sup> - 1</code></li>
</ul>
</div>

================================================
FILE: 0587-erect-the-fence/0587-erect-the-fence.java
================================================
public class Solution {
    public int orientation(int[] p, int[] q, int[] r) {
        return (q[1] - p[1]) * (r[0] - q[0]) - (q[0] - p[0]) * (r[1] - q[1]);
    }
    public int[][] outerTrees(int[][] points) {
        Arrays.sort(points, new Comparator<int[]> () {
            public int compare(int[] p, int[] q) {
                return q[0] - p[0] == 0 ? q[1] - p[1] : q[0] - p[0];
            }
        });
        Stack<int[]> hull = new Stack<>();
        for (int i = 0; i < points.length; i++) {
            while (hull.size() >= 2 && orientation(hull.get(hull.size() - 2), hull.get(hull.size() - 1), points[i]) > 0)
                hull.pop();
            hull.push(points[i]);
        }
        hull.pop();
        for (int i = points.length - 1; i >= 0; i--) {
            while (hull.size() >= 2 && orientation(hull.get(hull.size() - 2), hull.get(hull.size() - 1), points[i]) > 0)
                hull.pop();
            hull.push(points[i]);
        }
        // remove redundant elements from the stack
        HashSet<int[]> ret = new HashSet<>(hull);
        return ret.toArray(new int[ret.size()][]);
    }
}

================================================
FILE: 0587-erect-the-fence/README.md
================================================
<h2><a href="https://leetcode.com/problems/erect-the-fence/">587. Erect the Fence</a></h2><h3>Hard</h3><hr><div><p>You are given an array <code>trees</code> where <code>trees[i] = [x<sub>i</sub>, y<sub>i</sub>]</code> represents the location of a tree in the garden.</p>

<p>You are asked to fence the entire garden using the minimum length of rope as it is expensive. The garden is well fenced only if <strong>all the trees are enclosed</strong>.</p>

<p>Return <em>the coordinates of trees that are exactly located on the fence perimeter</em>.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>
<img alt="" src="https://assets.leetcode.com/uploads/2021/04/24/erect2-plane.jpg" style="width: 509px; height: 500px;">
<pre><strong>Input:</strong> points = [[1,1],[2,2],[2,0],[2,4],[3,3],[4,2]]
<strong>Output:</strong> [[1,1],[2,0],[3,3],[2,4],[4,2]]
</pre>

<p><strong class="example">Example 2:</strong></p>
<img alt="" src="https://assets.leetcode.com/uploads/2021/04/24/erect1-plane.jpg" style="width: 509px; height: 500px;">
<pre><strong>Input:</strong> points = [[1,2],[2,2],[4,2]]
<strong>Output:</strong> [[4,2],[2,2],[1,2]]
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>1 &lt;= points.length &lt;= 3000</code></li>
	<li><code>points[i].length == 2</code></li>
	<li><code>0 &lt;= x<sub>i</sub>, y<sub>i</sub> &lt;= 100</code></li>
	<li>All the given points are <strong>unique</strong>.</li>
</ul>
</div>

================================================
FILE: 0645-set-mismatch/0645-set-mismatch.java
================================================
class Solution {
    public int[] findErrorNums(int[] nums) {
        /** Assume m is the missing and d is the duplicate element
         diff= m-d;
         squareDiff= m^2-d^2;
         sum=m+d= squareDiff/diff
         =>sum    = (m+d)(m-d)/(m-d);
         now m=(sum+diff)2;
         and d= (sum-diff)2;
        **/
        int diff=0;
        int sqaureDiff=0;
        for(int i=0;i<nums.length;i++){
            /** 
            The order doesnot matter. keep adding the 1 to n and simultaneously subracting  corresponding array element.
            Use i+1 to get 1 to n  since i is the index number which is zero based.
            **/
            diff+=(i+1)-nums[i];
            /** squareDiff is also calculated in the same way as diff is calculated. **/
            sqaureDiff+= (i+1)*(i+1)-nums[i]*nums[i];
        } 
       int sum=sqaureDiff/diff;
      return new int[]{(sum-diff)/2,(sum+diff)/2};
    }
}

================================================
FILE: 0645-set-mismatch/NOTES.md
================================================
x-repeat
y-missing
​
(sum-realSum)=(x-y)
(sqrSum-realSqrSum)=(x+y)(x-y)
​
​
(x-y)=(sum-realSum)
(x+y)=(sqrSum-realSqrSum)/(sum-realSum)
---------------------
x=((sum-realSum)+(sqrSum-realSqrSum)/(sum-realSum))/2
​
​

================================================
FILE: 0645-set-mismatch/README.md
================================================
<h2><a href="https://leetcode.com/problems/set-mismatch/">645. Set Mismatch</a></h2><h3>Easy</h3><hr><div><p>You have a set of integers <code>s</code>, which originally contains all the numbers from <code>1</code> to <code>n</code>. Unfortunately, due to some error, one of the numbers in <code>s</code> got duplicated to another number in the set, which results in <strong>repetition of one</strong> number and <strong>loss of another</strong> number.</p>

<p>You are given an integer array <code>nums</code> representing the data status of this set after the error.</p>

<p>Find the number that occurs twice and the number that is missing and return <em>them in the form of an array</em>.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>
<pre><strong>Input:</strong> nums = [1,2,2,4]
<strong>Output:</strong> [2,3]
</pre><p><strong class="example">Example 2:</strong></p>
<pre><strong>Input:</strong> nums = [1,1]
<strong>Output:</strong> [1,2]
</pre>
<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>2 &lt;= nums.length &lt;= 10<sup>4</sup></code></li>
	<li><code>1 &lt;= nums[i] &lt;= 10<sup>4</sup></code></li>
</ul>
</div>

================================================
FILE: 0692-top-k-frequent-words/0692-top-k-frequent-words.java
================================================
class Solution {
    public List<String> topKFrequent(String[] words, int k) {
        Map<String,Integer> map = new HashMap<>();
        for(String w : words){
            int c = map.getOrDefault(w,0);
            c++;
            map.put(w,c);
        }
        Queue<Map.Entry<String,Integer>> pq = new PriorityQueue<>((a,b)->(a.getValue() == b.getValue() ? a.getKey().compareTo(b.getKey()) : (a.getValue()-b.getValue())*-1));

        for(Map.Entry<String,Integer> e : map.entrySet()){
            pq.offer(e);
        }
        List<String> result = new ArrayList<>();
        while(k > 0){
            k--;
            result.add(pq.poll().getKey());
        }
        return result;

    }
}

================================================
FILE: 0692-top-k-frequent-words/NOTES.md
================================================
​

================================================
FILE: 0692-top-k-frequent-words/README.md
================================================
<h2><a href="https://leetcode.com/problems/top-k-frequent-words/">692. Top K Frequent Words</a></h2><h3>Medium</h3><hr><div><p>Given an array of strings <code>words</code> and an integer <code>k</code>, return <em>the </em><code>k</code><em> most frequent strings</em>.</p>

<p>Return the answer <strong>sorted</strong> by <strong>the frequency</strong> from highest to lowest. Sort the words with the same frequency by their <strong>lexicographical order</strong>.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>

<pre><strong>Input:</strong> words = ["i","love","leetcode","i","love","coding"], k = 2
<strong>Output:</strong> ["i","love"]
<strong>Explanation:</strong> "i" and "love" are the two most frequent words.
Note that "i" comes before "love" due to a lower alphabetical order.
</pre>

<p><strong class="example">Example 2:</strong></p>

<pre><strong>Input:</strong> words = ["the","day","is","sunny","the","the","the","sunny","is","is"], k = 4
<strong>Output:</strong> ["the","is","sunny","day"]
<strong>Explanation:</strong> "the", "is", "sunny" and "day" are the four most frequent words, with the number of occurrence being 4, 3, 2 and 1 respectively.
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>1 &lt;= words.length &lt;= 500</code></li>
	<li><code>1 &lt;= words[i].length &lt;= 10</code></li>
	<li><code>words[i]</code> consists of lowercase English letters.</li>
	<li><code>k</code> is in the range <code>[1, The number of <strong>unique</strong> words[i]]</code></li>
</ul>

<p>&nbsp;</p>
<p><strong>Follow-up:</strong> Could you solve it in <code>O(n log(k))</code> time and <code>O(n)</code> extra space?</p>
</div>

================================================
FILE: 0739-daily-temperatures/0739-daily-temperatures.java
================================================
class Solution {
    public int[] dailyTemperatures(int[] a) {
        Deque<Integer> s=new ArrayDeque<>();
        int[]ans=new int[a.length];
        for(int i=a.length-1;i>=0;i--){
            while(!s.isEmpty() && a[s.peek()]<=a[i]){
                s.pop();
            }
            if(s.isEmpty()){
                ans[i]=0;
            }else{
                ans[i]=s.peek()-i;
            }
            s.push(i);
        }
        return ans;
    }
}

================================================
FILE: 0739-daily-temperatures/README.md
================================================
<h2><a href="https://leetcode.com/problems/daily-temperatures/">739. Daily Temperatures</a></h2><h3>Medium</h3><hr><div><p>Given an array of integers <code>temperatures</code> represents the daily temperatures, return <em>an array</em> <code>answer</code> <em>such that</em> <code>answer[i]</code> <em>is the number of days you have to wait after the</em> <code>i<sup>th</sup></code> <em>day to get a warmer temperature</em>. If there is no future day for which this is possible, keep <code>answer[i] == 0</code> instead.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>
<pre><strong>Input:</strong> temperatures = [73,74,75,71,69,72,76,73]
<strong>Output:</strong> [1,1,4,2,1,1,0,0]
</pre><p><strong class="example">Example 2:</strong></p>
<pre><strong>Input:</strong> temperatures = [30,40,50,60]
<strong>Output:</strong> [1,1,1,0]
</pre><p><strong class="example">Example 3:</strong></p>
<pre><strong>Input:</strong> temperatures = [30,60,90]
<strong>Output:</strong> [1,1,0]
</pre>
<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>1 &lt;=&nbsp;temperatures.length &lt;= 10<sup>5</sup></code></li>
	<li><code>30 &lt;=&nbsp;temperatures[i] &lt;= 100</code></li>
</ul>
</div>

================================================
FILE: 0766-toeplitz-matrix/0766-toeplitz-matrix.java
================================================
class Solution {
    public boolean isToeplitzMatrix(int[][] matrix) {
        for(int i=0;i<matrix.length-1;i++){
            int[]mat1=matrix[i];
            int[]mat2=matrix[i+1];
            for(int j=0;j<mat1.length-1;j++){
                if(mat1[j]!=mat2[j+1])return false;
            }
        }
        return true;
    }
}

================================================
FILE: 0766-toeplitz-matrix/README.md
================================================
<h2><a href="https://leetcode.com/problems/toeplitz-matrix/">766. Toeplitz Matrix</a></h2><h3>Easy</h3><hr><div><p>Given an <code>m x n</code> <code>matrix</code>, return&nbsp;<em><code>true</code>&nbsp;if the matrix is Toeplitz. Otherwise, return <code>false</code>.</em></p>

<p>A matrix is <strong>Toeplitz</strong> if every diagonal from top-left to bottom-right has the same elements.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>
<img alt="" src="https://assets.leetcode.com/uploads/2020/11/04/ex1.jpg" style="width: 322px; height: 242px;">
<pre><strong>Input:</strong> matrix = [[1,2,3,4],[5,1,2,3],[9,5,1,2]]
<strong>Output:</strong> true
<strong>Explanation:</strong>
In the above grid, the&nbsp;diagonals are:
"[9]", "[5, 5]", "[1, 1, 1]", "[2, 2, 2]", "[3, 3]", "[4]".
In each diagonal all elements are the same, so the answer is True.
</pre>

<p><strong class="example">Example 2:</strong></p>
<img alt="" src="https://assets.leetcode.com/uploads/2020/11/04/ex2.jpg" style="width: 162px; height: 162px;">
<pre><strong>Input:</strong> matrix = [[1,2],[2,2]]
<strong>Output:</strong> false
<strong>Explanation:</strong>
The diagonal "[1, 2]" has different elements.
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>m == matrix.length</code></li>
	<li><code>n == matrix[i].length</code></li>
	<li><code>1 &lt;= m, n &lt;= 20</code></li>
	<li><code>0 &lt;= matrix[i][j] &lt;= 99</code></li>
</ul>

<p>&nbsp;</p>
<p><strong>Follow up:</strong></p>

<ul>
	<li>What if the <code>matrix</code> is stored on disk, and the memory is limited such that you can only load at most one row of the matrix into the memory at once?</li>
	<li>What if the <code>matrix</code> is so large that you can only load up a partial row into the memory at once?</li>
</ul>
</div>

================================================
FILE: 0787-cheapest-flights-within-k-stops/0787-cheapest-flights-within-k-stops.java
================================================
class Solution {
    public int findCheapestPrice(int n, int[][] flights, int src, int dst, int k) {
        Map<Integer, List<int[]>> adj = new HashMap<>();
        for (int[] i : flights)
            adj.computeIfAbsent(i[0], value -> new ArrayList<>()).add(new int[] { i[1], i[2] });

        int[] dist = new int[n];
        Arrays.fill(dist, Integer.MAX_VALUE);

        Queue<int[]> q = new LinkedList<>();
        q.offer(new int[] { src, 0 });
        int stops = 0;

        while (stops <= k && !q.isEmpty()) {
            int sz = q.size();
            // Iterate on current level.
            while (sz-- > 0) {
                int[] temp = q.poll();
                int node = temp[0];
                int distance = temp[1];

                if (!adj.containsKey(node))
                    continue;
                // Loop over neighbors of popped node.
                for (int[] e : adj.get(node)) {
                    int neighbour = e[0];
                    int price = e[1];
                    if (price + distance >= dist[neighbour])
                        continue;
                    dist[neighbour] = price + distance;
                    q.offer(new int[] { neighbour, dist[neighbour] });
                }
            }
            stops++;
        }
        return dist[dst] == Integer.MAX_VALUE ? -1 : dist[dst];
    }
}

================================================
FILE: 0787-cheapest-flights-within-k-stops/NOTES.md
================================================
​

================================================
FILE: 0787-cheapest-flights-within-k-stops/README.md
================================================
<h2><a href="https://leetcode.com/problems/cheapest-flights-within-k-stops/">787. Cheapest Flights Within K Stops</a></h2><h3>Medium</h3><hr><div><p>There are <code>n</code> cities connected by some number of flights. You are given an array <code>flights</code> where <code>flights[i] = [from<sub>i</sub>, to<sub>i</sub>, price<sub>i</sub>]</code> indicates that there is a flight from city <code>from<sub>i</sub></code> to city <code>to<sub>i</sub></code> with cost <code>price<sub>i</sub></code>.</p>

<p>You are also given three integers <code>src</code>, <code>dst</code>, and <code>k</code>, return <em><strong>the cheapest price</strong> from </em><code>src</code><em> to </em><code>dst</code><em> with at most </em><code>k</code><em> stops. </em>If there is no such route, return<em> </em><code>-1</code>.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>
<img alt="" src="https://assets.leetcode.com/uploads/2022/03/18/cheapest-flights-within-k-stops-3drawio.png" style="width: 332px; height: 392px;">
<pre><strong>Input:</strong> n = 4, flights = [[0,1,100],[1,2,100],[2,0,100],[1,3,600],[2,3,200]], src = 0, dst = 3, k = 1
<strong>Output:</strong> 700
<strong>Explanation:</strong>
The graph is shown above.
The optimal path with at most 1 stop from city 0 to 3 is marked in red and has cost 100 + 600 = 700.
Note that the path through cities [0,1,2,3] is cheaper but is invalid because it uses 2 stops.
</pre>

<p><strong class="example">Example 2:</strong></p>
<img alt="" src="https://assets.leetcode.com/uploads/2022/03/18/cheapest-flights-within-k-stops-1drawio.png" style="width: 332px; height: 242px;">
<pre><strong>Input:</strong> n = 3, flights = [[0,1,100],[1,2,100],[0,2,500]], src = 0, dst = 2, k = 1
<strong>Output:</strong> 200
<strong>Explanation:</strong>
The graph is shown above.
The optimal path with at most 1 stop from city 0 to 2 is marked in red and has cost 100 + 100 = 200.
</pre>

<p><strong class="example">Example 3:</strong></p>
<img alt="" src="https://assets.leetcode.com/uploads/2022/03/18/cheapest-flights-within-k-stops-2drawio.png" style="width: 332px; height: 242px;">
<pre><strong>Input:</strong> n = 3, flights = [[0,1,100],[1,2,100],[0,2,500]], src = 0, dst = 2, k = 0
<strong>Output:</strong> 500
<strong>Explanation:</strong>
The graph is shown above.
The optimal path with no stops from city 0 to 2 is marked in red and has cost 500.
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>1 &lt;= n &lt;= 100</code></li>
	<li><code>0 &lt;= flights.length &lt;= (n * (n - 1) / 2)</code></li>
	<li><code>flights[i].length == 3</code></li>
	<li><code>0 &lt;= from<sub>i</sub>, to<sub>i</sub> &lt; n</code></li>
	<li><code>from<sub>i</sub> != to<sub>i</sub></code></li>
	<li><code>1 &lt;= price<sub>i</sub> &lt;= 10<sup>4</sup></code></li>
	<li>There will not be any multiple flights between two cities.</li>
	<li><code>0 &lt;= src, dst, k &lt; n</code></li>
	<li><code>src != dst</code></li>
</ul>
</div>

================================================
FILE: 0790-domino-and-tromino-tiling/0790-domino-and-tromino-tiling.java
================================================
class Solution {
    public int numTilings(int n) {
        int dp[] = new int[n+4];
        
        int mod = (int)(Math.pow(10,9)+7);
        dp[1] = 1;
        dp[2] = 2;
        dp[3] = 5;
        
        for(int i=4;i<=n;i++){
            dp[i] = ((2*dp[i-1])%mod)+dp[i-3];
            dp[i] %= mod;
        }
        
        return dp[n];
    }
}

================================================
FILE: 0790-domino-and-tromino-tiling/NOTES.md
================================================
​

================================================
FILE: 0790-domino-and-tromino-tiling/README.md
================================================
<h2><a href="https://leetcode.com/problems/domino-and-tromino-tiling/">790. Domino and Tromino Tiling</a></h2><h3>Medium</h3><hr><div><p>You have two types of tiles: a <code>2 x 1</code> domino shape and a tromino shape. You may rotate these shapes.</p>
<img alt="" src="https://assets.leetcode.com/uploads/2021/07/15/lc-domino.jpg" style="width: 362px; height: 195px;">
<p>Given an integer n, return <em>the number of ways to tile an</em> <code>2 x n</code> <em>board</em>. Since the answer may be very large, return it <strong>modulo</strong> <code>10<sup>9</sup> + 7</code>.</p>

<p>In a tiling, every square must be covered by a tile. Two tilings are different if and only if there are two 4-directionally adjacent cells on the board such that exactly one of the tilings has both squares occupied by a tile.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>
<img alt="" src="https://assets.leetcode.com/uploads/2021/07/15/lc-domino1.jpg" style="width: 500px; height: 226px;">
<pre><strong>Input:</strong> n = 3
<strong>Output:</strong> 5
<strong>Explanation:</strong> The five different ways are show above.
</pre>

<p><strong class="example">Example 2:</strong></p>

<pre><strong>Input:</strong> n = 1
<strong>Output:</strong> 1
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>1 &lt;= n &lt;= 1000</code></li>
</ul>
</div>

================================================
FILE: 0797-all-paths-from-source-to-target/0797-all-paths-from-source-to-target.java
================================================
class Solution {
    public List<List<Integer>> allPathsSourceTarget(int[][] graph) {
        
        List<List<Integer>> ans = new ArrayList<>();
        List<Integer> temp = new ArrayList<>();
        temp.add(0);
        dfs(graph,ans,temp,0);
        return ans;
    }
    
   public void dfs(int[][] graph, List<List<Integer>> ans, List<Integer> temp, int start){
       
        if(start == graph.length-1){
            ans.add(new ArrayList<>(temp));
            return;
        }
        
        for(int i : graph[start]){
            temp.add(i);
            dfs(graph,ans,temp,i);
            temp.remove(temp.size()-1);  
        }
        
    }
}

================================================
FILE: 0797-all-paths-from-source-to-target/NOTES.md
================================================
​

================================================
FILE: 0797-all-paths-from-source-to-target/README.md
================================================
<h2><a href="https://leetcode.com/problems/all-paths-from-source-to-target/">797. All Paths From Source to Target</a></h2><h3>Medium</h3><hr><div><p>Given a directed acyclic graph (<strong>DAG</strong>) of <code>n</code> nodes labeled from <code>0</code> to <code>n - 1</code>, find all possible paths from node <code>0</code> to node <code>n - 1</code> and return them in <strong>any order</strong>.</p>

<p>The graph is given as follows: <code>graph[i]</code> is a list of all nodes you can visit from node <code>i</code> (i.e., there is a directed edge from node <code>i</code> to node <code>graph[i][j]</code>).</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>
<img alt="" src="https://assets.leetcode.com/uploads/2020/09/28/all_1.jpg" style="width: 242px; height: 242px;">
<pre><strong>Input:</strong> graph = [[1,2],[3],[3],[]]
<strong>Output:</strong> [[0,1,3],[0,2,3]]
<strong>Explanation:</strong> There are two paths: 0 -&gt; 1 -&gt; 3 and 0 -&gt; 2 -&gt; 3.
</pre>

<p><strong class="example">Example 2:</strong></p>
<img alt="" src="https://assets.leetcode.com/uploads/2020/09/28/all_2.jpg" style="width: 423px; height: 301px;">
<pre><strong>Input:</strong> graph = [[4,3,1],[3,2,4],[3],[4],[]]
<strong>Output:</strong> [[0,4],[0,3,4],[0,1,3,4],[0,1,2,3,4],[0,1,4]]
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>n == graph.length</code></li>
	<li><code>2 &lt;= n &lt;= 15</code></li>
	<li><code>0 &lt;= graph[i][j] &lt; n</code></li>
	<li><code>graph[i][j] != i</code> (i.e., there will be no self-loops).</li>
	<li>All the elements of <code>graph[i]</code> are <strong>unique</strong>.</li>
	<li>The input graph is <strong>guaranteed</strong> to be a <strong>DAG</strong>.</li>
</ul>
</div>

================================================
FILE: 0834-sum-of-distances-in-tree/0834-sum-of-distances-in-tree.java
================================================
class Solution {
    public int[] sumOfDistancesInTree(int n, int[][] edges) {
        final int[] parents = buildParents(n, edges);
        final int[] counts = new int[n];
        final int[] childrenCount = new int[n];
        final int[] distanceToChildren = new int[n];
        for (int p : parents) {
        	if (p >= 0) counts[p]++;
        }
        int start = 0, end = 0;
        for (int i = 0; i < parents.length; i++) {
        	if (counts[i] == 0) {
        		q[end++] = i;
        	}
        }
        while (start < end) {
        	final int node = q[start++];
        	final int parent = parents[node];
        	if (parent < 0) break;
        	final int c = childrenCount[node] + 1;
        	childrenCount[parent] += c;
        	distanceToChildren[parent] += distanceToChildren[node] + c;
        	if (--counts[parent] == 0) {
        		q[end++] = parent;
        	}
        }
//        System.out.println("Parents: " + Arrays.toString(parents));
//        System.out.println("ChildrenCount: " + Arrays.toString(childrenCount));
//        System.out.println("distanceToChildren: " + Arrays.toString(distanceToChildren));
        final int root = q[end - 1];
        final int[] r = new int[n];
        r[root] = distanceToChildren[root];
        for (int i = end - 2; i >= 0; i--) {
        	final int node = q[i];
        	final int parent = parents[node];
        	final int minus = childrenCount[node] + 1;
        	r[node] = r[parent] + n - 2 * minus;
        }
        return r;
    }
	
	static final int[] q = new int[30001];
	
	static int[] buildParents(int n, int[][] edges) {
		final int[][] next = buildNext(n, edges);
        final int[] parents = new int[n];
        Arrays.fill(parents, -1);
        int start = 0, end = 0;
        q[end++] = 0;
        while (start < end) {
        	final int parent = q[start++];
        	for (int c : next[parent]) {
        		if (parents[c] < 0) {
        			parents[c] = parent;
        			q[end++] = c;
        		}
        	}
        }
        parents[0] = -1;
        return parents;
	}
	
	static int[][] buildNext(final int n, final int[][] edges) {
		final int[] counts = new int[n];
		for (final int[] e : edges) {
			counts[e[0]]++;
			counts[e[1]]++;
		}
		final int[][] res = new int[n][];
		for (int i = 0; i < n; i++) {
			res[i] = new int[counts[i]];
		}
		for (final int[] e : edges) {
			final int l = e[0];
			final int r = e[1];
			res[l][--counts[l]] = r;
			res[r][--counts[r]] = l;
		}
		return res;
	}
}

================================================
FILE: 0834-sum-of-distances-in-tree/NOTES.md
================================================
​

================================================
FILE: 0834-sum-of-distances-in-tree/README.md
================================================
<h2><a href="https://leetcode.com/problems/sum-of-distances-in-tree/">834. Sum of Distances in Tree</a></h2><h3>Hard</h3><hr><div><p>There is an undirected connected tree with <code>n</code> nodes labeled from <code>0</code> to <code>n - 1</code> and <code>n - 1</code> edges.</p>

<p>You are given the integer <code>n</code> and the array <code>edges</code> where <code>edges[i] = [a<sub>i</sub>, b<sub>i</sub>]</code> indicates that there is an edge between nodes <code>a<sub>i</sub></code> and <code>b<sub>i</sub></code> in the tree.</p>

<p>Return an array <code>answer</code> of length <code>n</code> where <code>answer[i]</code> is the sum of the distances between the <code>i<sup>th</sup></code> node in the tree and all other nodes.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>
<img alt="" src="https://assets.leetcode.com/uploads/2021/07/23/lc-sumdist1.jpg" style="width: 304px; height: 224px;">
<pre><strong>Input:</strong> n = 6, edges = [[0,1],[0,2],[2,3],[2,4],[2,5]]
<strong>Output:</strong> [8,12,6,10,10,10]
<strong>Explanation:</strong> The tree is shown above.
We can see that dist(0,1) + dist(0,2) + dist(0,3) + dist(0,4) + dist(0,5)
equals 1 + 1 + 2 + 2 + 2 = 8.
Hence, answer[0] = 8, and so on.
</pre>

<p><strong class="example">Example 2:</strong></p>
<img alt="" src="https://assets.leetcode.com/uploads/2021/07/23/lc-sumdist2.jpg" style="width: 64px; height: 65px;">
<pre><strong>Input:</strong> n = 1, edges = []
<strong>Output:</strong> [0]
</pre>

<p><strong class="example">Example 3:</strong></p>
<img alt="" src="https://assets.leetcode.com/uploads/2021/07/23/lc-sumdist3.jpg" style="width: 144px; height: 145px;">
<pre><strong>Input:</strong> n = 2, edges = [[1,0]]
<strong>Output:</strong> [1,1]
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>1 &lt;= n &lt;= 3 * 10<sup>4</sup></code></li>
	<li><code>edges.length == n - 1</code></li>
	<li><code>edges[i].length == 2</code></li>
	<li><code>0 &lt;= a<sub>i</sub>, b<sub>i</sub> &lt; n</code></li>
	<li><code>a<sub>i</sub> != b<sub>i</sub></code></li>
	<li>The given input represents a valid tree.</li>
</ul>
</div>

================================================
FILE: 0835-image-overlap/0835-image-overlap.java
================================================
class Solution {

    protected int convolute(int[][] A, int[][] kernel, int xShift, int yShift) {
        int result = 0;
        for (int row = 0; row < A.length; ++row)
            for (int col = 0; col < A.length; ++col)
                result += A[row][col] * kernel[row + yShift][col + xShift];
        return result;
    }

    public int largestOverlap(int[][] A, int[][] B) {

        int N = A.length;
        int[][] B_padded = new int[3 * N - 2][3 * N - 2];
        for (int row = 0; row < N; ++row)
            for (int col = 0; col < N; ++col)
                B_padded[row + N - 1][col + N - 1] = B[row][col];

        int maxOverlaps = 0;
        for (int xShift = 0; xShift < 2 * N - 1; ++xShift)
            for (int yShift = 0; yShift < 2 * N - 1; ++yShift) {
                maxOverlaps = Math.max(maxOverlaps,
                    convolute(A, B_padded, xShift, yShift));
            }

        return maxOverlaps;
    }
}

================================================
FILE: 0835-image-overlap/NOTES.md
================================================
​

================================================
FILE: 0835-image-overlap/README.md
================================================
<h2><a href="https://leetcode.com/problems/image-overlap/">835. Image Overlap</a></h2><h3>Medium</h3><hr><div><p>You are given two images, <code>img1</code> and <code>img2</code>, represented as binary, square matrices of size <code>n x n</code>. A binary matrix has only <code>0</code>s and <code>1</code>s as values.</p>

<p>We <strong>translate</strong> one image however we choose by sliding all the <code>1</code> bits left, right, up, and/or down any number of units. We then place it on top of the other image. We can then calculate the <strong>overlap</strong> by counting the number of positions that have a <code>1</code> in <strong>both</strong> images.</p>

<p>Note also that a translation does <strong>not</strong> include any kind of rotation. Any <code>1</code> bits that are translated outside of the matrix borders are erased.</p>

<p>Return <em>the largest possible overlap</em>.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>
<img alt="" src="https://assets.leetcode.com/uploads/2020/09/09/overlap1.jpg" style="width: 450px; height: 231px;">
<pre><strong>Input:</strong> img1 = [[1,1,0],[0,1,0],[0,1,0]], img2 = [[0,0,0],[0,1,1],[0,0,1]]
<strong>Output:</strong> 3
<strong>Explanation:</strong> We translate img1 to right by 1 unit and down by 1 unit.
<img alt="" src="https://assets.leetcode.com/uploads/2020/09/09/overlap_step1.jpg" style="width: 450px; height: 105px;">
The number of positions that have a 1 in both images is 3 (shown in red).
<img alt="" src="https://assets.leetcode.com/uploads/2020/09/09/overlap_step2.jpg" style="width: 450px; height: 231px;">
</pre>

<p><strong class="example">Example 2:</strong></p>

<pre><strong>Input:</strong> img1 = [[1]], img2 = [[1]]
<strong>Output:</strong> 1
</pre>

<p><strong class="example">Example 3:</strong></p>

<pre><strong>Input:</strong> img1 = [[0]], img2 = [[0]]
<strong>Output:</strong> 0
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>n == img1.length == img1[i].length</code></li>
	<li><code>n == img2.length == img2[i].length</code></li>
	<li><code>1 &lt;= n &lt;= 30</code></li>
	<li><code>img1[i][j]</code> is either <code>0</code> or <code>1</code>.</li>
	<li><code>img2[i][j]</code> is either <code>0</code> or <code>1</code>.</li>
</ul>
</div>

================================================
FILE: 0841-keys-and-rooms/0841-keys-and-rooms.java
================================================
class Solution {
    public boolean canVisitAllRooms(List<List<Integer>> rooms) {
        boolean[] visited = new boolean[rooms.size()];
        int count = 0;
        count = dfs(rooms,0, visited, count);
        return count == rooms.size();
    }

    public int dfs(List<List<Integer>> rooms, int currRoom, boolean[] visited, int count) {
        if (visited[currRoom] == true) {
            return count;
        }
        visited[currRoom] = true;
        ++count;
        for (Integer roomKey: rooms.get(currRoom)) {
            count = dfs(rooms, roomKey, visited, count);
        }
        return count;
    }
}

================================================
FILE: 0841-keys-and-rooms/NOTES.md
================================================
​

================================================
FILE: 0841-keys-and-rooms/README.md
================================================
<h2><a href="https://leetcode.com/problems/keys-and-rooms/">841. Keys and Rooms</a></h2><h3>Medium</h3><hr><div><p>There are <code>n</code> rooms labeled from <code>0</code> to <code>n - 1</code>&nbsp;and all the rooms are locked except for room <code>0</code>. Your goal is to visit all the rooms. However, you cannot enter a locked room without having its key.</p>

<p>When you visit a room, you may find a set of <strong>distinct keys</strong> in it. Each key has a number on it, denoting which room it unlocks, and you can take all of them with you to unlock the other rooms.</p>

<p>Given an array <code>rooms</code> where <code>rooms[i]</code> is the set of keys that you can obtain if you visited room <code>i</code>, return <code>true</code> <em>if you can visit <strong>all</strong> the rooms, or</em> <code>false</code> <em>otherwise</em>.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>

<pre><strong>Input:</strong> rooms = [[1],[2],[3],[]]
<strong>Output:</strong> true
<strong>Explanation:</strong> 
We visit room 0 and pick up key 1.
We then visit room 1 and pick up key 2.
We then visit room 2 and pick up key 3.
We then visit room 3.
Since we were able to visit every room, we return true.
</pre>

<p><strong class="example">Example 2:</strong></p>

<pre><strong>Input:</strong> rooms = [[1,3],[3,0,1],[2],[0]]
<strong>Output:</strong> false
<strong>Explanation:</strong> We can not enter room number 2 since the only key that unlocks it is in that room.
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>n == rooms.length</code></li>
	<li><code>2 &lt;= n &lt;= 1000</code></li>
	<li><code>0 &lt;= rooms[i].length &lt;= 1000</code></li>
	<li><code>1 &lt;= sum(rooms[i].length) &lt;= 3000</code></li>
	<li><code>0 &lt;= rooms[i][j] &lt; n</code></li>
	<li>All the values of <code>rooms[i]</code> are <strong>unique</strong>.</li>
</ul>
</div>

================================================
FILE: 0872-leaf-similar-trees/0872-leaf-similar-trees.java
================================================
/**
 * Definition for a binary tree node.
 * public class TreeNode {
 *     int val;
 *     TreeNode left;
 *     TreeNode right;
 *     TreeNode() {}
 *     TreeNode(int val) { this.val = val; }
 *     TreeNode(int val, TreeNode left, TreeNode right) {
 *         this.val = val;
 *         this.left = left;
 *         this.right = right;
 *     }
 * }
 */
class Solution {
    public boolean leafSimilar(TreeNode root1, TreeNode root2) {
        // Collect the leaf values from each tree
    List<Integer> leafValues1 = getLeafValues(root1, new ArrayList<>());
    List<Integer> leafValues2 = getLeafValues(root2, new ArrayList<>());
    
    // Compare the leaf value lists
    return leafValues1.equals(leafValues2);
    }
    List<Integer> getLeafValues(TreeNode node, List<Integer> values) {
        // If the node is null, return
        if (node == null) {
            return values;
        }
        
        // If the node is a leaf node, add its value to the list
        if (node.left == null && node.right == null) {
            values.add(node.val);
        }
        
        // Recursively traverse the left and right subtrees
        getLeafValues(node.left, values);
        getLeafValues(node.right, values);
        
        return values;
    }
}

================================================
FILE: 0872-leaf-similar-trees/NOTES.md
================================================
​

================================================
FILE: 0872-leaf-similar-trees/README.md
================================================
<h2><a href="https://leetcode.com/problems/leaf-similar-trees/">872. Leaf-Similar Trees</a></h2><h3>Easy</h3><hr><div><p>Consider all the leaves of a binary tree, from&nbsp;left to right order, the values of those&nbsp;leaves form a <strong>leaf value sequence</strong><em>.</em></p>

<p><img alt="" src="https://s3-lc-upload.s3.amazonaws.com/uploads/2018/07/16/tree.png" style="width: 400px; height: 336px;"></p>

<p>For example, in the given tree above, the leaf value sequence is <code>(6, 7, 4, 9, 8)</code>.</p>

<p>Two binary trees are considered <em>leaf-similar</em>&nbsp;if their leaf value sequence is the same.</p>

<p>Return <code>true</code> if and only if the two given trees with head nodes <code>root1</code> and <code>root2</code> are leaf-similar.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>
<img alt="" src="https://assets.leetcode.com/uploads/2020/09/03/leaf-similar-1.jpg" style="width: 600px; height: 237px;">
<pre><strong>Input:</strong> root1 = [3,5,1,6,2,9,8,null,null,7,4], root2 = [3,5,1,6,7,4,2,null,null,null,null,null,null,9,8]
<strong>Output:</strong> true
</pre>

<p><strong class="example">Example 2:</strong></p>
<img alt="" src="https://assets.leetcode.com/uploads/2020/09/03/leaf-similar-2.jpg" style="width: 300px; height: 110px;">
<pre><strong>Input:</strong> root1 = [1,2,3], root2 = [1,3,2]
<strong>Output:</strong> false
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li>The number of nodes in each tree will be in the range <code>[1, 200]</code>.</li>
	<li>Both of the given trees will have values in the range <code>[0, 200]</code>.</li>
</ul>
</div>

================================================
FILE: 0876-middle-of-the-linked-list/0876-middle-of-the-linked-list.java
================================================
class Solution {
    public ListNode middleNode(ListNode head) {
        ListNode slow = head, fast = head;
        while (fast != null && fast.next != null) {
            slow = slow.next;
            fast = fast.next.next;
        }
        return slow;
    }
}

================================================
FILE: 0876-middle-of-the-linked-list/NOTES.md
================================================
​

================================================
FILE: 0876-middle-of-the-linked-list/README.md
================================================
<h2><a href="https://leetcode.com/problems/middle-of-the-linked-list/">876. Middle of the Linked List</a></h2><h3>Easy</h3><hr><div><p>Given the <code>head</code> of a singly linked list, return <em>the middle node of the linked list</em>.</p>

<p>If there are two middle nodes, return <strong>the second middle</strong> node.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>
<img alt="" src="https://assets.leetcode.com/uploads/2021/07/23/lc-midlist1.jpg" style="width: 544px; height: 65px;">
<pre><strong>Input:</strong> head = [1,2,3,4,5]
<strong>Output:</strong> [3,4,5]
<strong>Explanation:</strong> The middle node of the list is node 3.
</pre>

<p><strong class="example">Example 2:</strong></p>
<img alt="" src="https://assets.leetcode.com/uploads/2021/07/23/lc-midlist2.jpg" style="width: 664px; height: 65px;">
<pre><strong>Input:</strong> head = [1,2,3,4,5,6]
<strong>Output:</strong> [4,5,6]
<strong>Explanation:</strong> Since the list has two middle nodes with values 3 and 4, we return the second one.
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li>The number of nodes in the list is in the range <code>[1, 100]</code>.</li>
	<li><code>1 &lt;= Node.val &lt;= 100</code></li>
</ul>
</div>

================================================
FILE: 0886-possible-bipartition/0886-possible-bipartition.java
================================================
class Solution {
    public boolean possibleBipartition(int n, int[][] dislikes) {
        int[] colour = new int[n+1];
        ArrayList<Integer>[] dislikeMap = new ArrayList[n+1];
        
        for(int i = 1; i <= n; i++)
            dislikeMap[i] = new ArrayList<Integer>();
        
        for(int[] d: dislikes) {
            dislikeMap[d[0]].add(d[1]);
            dislikeMap[d[1]].add(d[0]);
        }
        
        
        Queue<Integer> queue = new LinkedList<>();
        for(int i = 1; i <= n; i++) {
            if(colour[i] == 0) {
                colour[i] = 1;
                queue = new LinkedList<>();
                queue.offer(i);
                
                while(!queue.isEmpty()) {
                    int curr = queue.poll();
                    
                    for(int neighbour: dislikeMap[curr]) {
                        if(colour[neighbour] == 0) {
                            colour[neighbour] = colour[curr] == 1?-1:1;
                            queue.offer(neighbour);
                        }
                        else {
                            if(colour[neighbour] == colour[curr])
                                return false;
                        }
                    }
                }
            }
        }
        return true;
    }
}

================================================
FILE: 0886-possible-bipartition/NOTES.md
================================================
​

================================================
FILE: 0886-possible-bipartition/README.md
================================================
<h2><a href="https://leetcode.com/problems/possible-bipartition/">886. Possible Bipartition</a></h2><h3>Medium</h3><hr><div><p>We want to split a group of <code>n</code> people (labeled from <code>1</code> to <code>n</code>) into two groups of <strong>any size</strong>. Each person may dislike some other people, and they should not go into the same group.</p>

<p>Given the integer <code>n</code> and the array <code>dislikes</code> where <code>dislikes[i] = [a<sub>i</sub>, b<sub>i</sub>]</code> indicates that the person labeled <code>a<sub>i</sub></code> does not like the person labeled <code>b<sub>i</sub></code>, return <code>true</code> <em>if it is possible to split everyone into two groups in this way</em>.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>

<pre><strong>Input:</strong> n = 4, dislikes = [[1,2],[1,3],[2,4]]
<strong>Output:</strong> true
<strong>Explanation:</strong> group1 [1,4] and group2 [2,3].
</pre>

<p><strong class="example">Example 2:</strong></p>

<pre><strong>Input:</strong> n = 3, dislikes = [[1,2],[1,3],[2,3]]
<strong>Output:</strong> false
</pre>

<p><strong class="example">Example 3:</strong></p>

<pre><strong>Input:</strong> n = 5, dislikes = [[1,2],[2,3],[3,4],[4,5],[1,5]]
<strong>Output:</strong> false
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>1 &lt;= n &lt;= 2000</code></li>
	<li><code>0 &lt;= dislikes.length &lt;= 10<sup>4</sup></code></li>
	<li><code>dislikes[i].length == 2</code></li>
	<li><code>1 &lt;= dislikes[i][j] &lt;= n</code></li>
	<li><code>a<sub>i</sub> &lt; b<sub>i</sub></code></li>
	<li>All the pairs of <code>dislikes</code> are <strong>unique</strong>.</li>
</ul>
</div>

================================================
FILE: 0899-orderly-queue/0899-orderly-queue.java
================================================
class Solution {
    public String orderlyQueue(String s, int k) {
        if (k == 1) {
            String ans = s;
            for (int i = 0; i < s.length(); ++i) {
                String temp = s.substring(i) + s.substring(0, i);
                if (temp.compareTo(ans) < 0) {
                    ans = temp;
                }
            }
            return ans;
        } else {
            char[] chars = s.toCharArray();
            Arrays.sort(chars);
            return new String(chars);
        }
    }
}

================================================
FILE: 0899-orderly-queue/NOTES.md
================================================
​

================================================
FILE: 0899-orderly-queue/README.md
================================================
<h2><a href="https://leetcode.com/problems/orderly-queue/">899. Orderly Queue</a></h2><h3>Hard</h3><hr><div><p>You are given a string <code>s</code> and an integer <code>k</code>. You can choose one of the first <code>k</code> letters of <code>s</code> and append it at the end of the string..</p>

<p>Return <em>the lexicographically smallest string you could have after applying the mentioned step any number of moves</em>.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>

<pre><strong>Input:</strong> s = "cba", k = 1
<strong>Output:</strong> "acb"
<strong>Explanation:</strong> 
In the first move, we move the 1<sup>st</sup> character 'c' to the end, obtaining the string "bac".
In the second move, we move the 1<sup>st</sup> character 'b' to the end, obtaining the final result "acb".
</pre>

<p><strong class="example">Example 2:</strong></p>

<pre><strong>Input:</strong> s = "baaca", k = 3
<strong>Output:</strong> "aaabc"
<strong>Explanation:</strong> 
In the first move, we move the 1<sup>st</sup> character 'b' to the end, obtaining the string "aacab".
In the second move, we move the 3<sup>rd</sup> character 'c' to the end, obtaining the final result "aaabc".
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>1 &lt;= k &lt;= s.length &lt;= 1000</code></li>
	<li><code>s</code> consist of lowercase English letters.</li>
</ul>
</div>

================================================
FILE: 0901-online-stock-span/0901-online-stock-span.java
================================================
class StockSpanner {
    Stack<int[]> stack = new Stack<>();
    
    public int next(int price) {
        int ans = 1;
        while (!stack.isEmpty() && stack.peek()[0] <= price) {
            ans += stack.pop()[1];
        }
        
        stack.push(new int[] {price, ans});
        return ans;
    }
}

/**
 * Your StockSpanner object will be instantiated and called as such:
 * StockSpanner obj = new StockSpanner();
 * int param_1 = obj.next(price);
 */

================================================
FILE: 0901-online-stock-span/NOTES.md
================================================
​

================================================
FILE: 0901-online-stock-span/README.md
================================================
<h2><a href="https://leetcode.com/problems/online-stock-span/">901. Online Stock Span</a></h2><h3>Medium</h3><hr><div><p>Design an algorithm that collects daily price quotes for some stock and returns <strong>the span</strong> of that stock's price for the current day.</p>

<p>The <strong>span</strong> of the stock's price today is defined as the maximum number of consecutive days (starting from today and going backward) for which the stock price was less than or equal to today's price.</p>

<ul>
	<li>For example, if the price of a stock over the next <code>7</code> days were <code>[100,80,60,70,60,75,85]</code>, then the stock spans would be <code>[1,1,1,2,1,4,6]</code>.</li>
</ul>

<p>Implement the <code>StockSpanner</code> class:</p>

<ul>
	<li><code>StockSpanner()</code> Initializes the object of the class.</li>
	<li><code>int next(int price)</code> Returns the <strong>span</strong> of the stock's price given that today's price is <code>price</code>.</li>
</ul>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>

<pre><strong>Input</strong>
["StockSpanner", "next", "next", "next", "next", "next", "next", "next"]
[[], [100], [80], [60], [70], [60], [75], [85]]
<strong>Output</strong>
[null, 1, 1, 1, 2, 1, 4, 6]

<strong>Explanation</strong>
StockSpanner stockSpanner = new StockSpanner();
stockSpanner.next(100); // return 1
stockSpanner.next(80);  // return 1
stockSpanner.next(60);  // return 1
stockSpanner.next(70);  // return 2
stockSpanner.next(60);  // return 1
stockSpanner.next(75);  // return 4, because the last 4 prices (including today's price of 75) were less than or equal to today's price.
stockSpanner.next(85);  // return 6
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>1 &lt;= price &lt;= 10<sup>5</sup></code></li>
	<li>At most <code>10<sup>4</sup></code> calls will be made to <code>next</code>.</li>
</ul>
</div>

================================================
FILE: 0907-sum-of-subarray-minimums/0907-sum-of-subarray-minimums.java
================================================

class Solution {
    public int sumSubarrayMins(int[] arr) {
        int MOD = 1000000007;

        Stack<Integer> stack = new Stack<>();
        long sumOfMinimums = 0;

        // building monotonically increasing stack
        for (int i = 0; i <= arr.length; i++) {

            // when i reaches the array length, it is an indication that
            // all the elements have been processed, and the remaining
            // elements in the stack should now be popped out.

            while (!stack.empty() && (i == arr.length || arr[stack.peek()] >= arr[i])) {

                // Notice the sign ">=", This ensures that no contribution
                // is counted twice. rightBoundary takes equal or smaller 
                // elements into account while leftBoundary takes only the
                // strictly smaller elements into account

                int mid = stack.pop();
                int leftBoundary = stack.empty() ? -1 : stack.peek();
                int rightBoundary = i;

                // count of subarrays where mid is the minimum element
                long count = (mid - leftBoundary) * (rightBoundary - mid) % MOD;

                sumOfMinimums += (count * arr[mid]) % MOD;
                sumOfMinimums %= MOD;
            }
            stack.push(i);
        }

        return (int) (sumOfMinimums);
    }
}


================================================
FILE: 0907-sum-of-subarray-minimums/NOTES.md
================================================
​

================================================
FILE: 0907-sum-of-subarray-minimums/README.md
================================================
<h2><a href="https://leetcode.com/problems/sum-of-subarray-minimums/">907. Sum of Subarray Minimums</a></h2><h3>Medium</h3><hr><div><p>Given an array of integers arr, find the sum of <code>min(b)</code>, where <code>b</code> ranges over every (contiguous) subarray of <code>arr</code>. Since the answer may be large, return the answer <strong>modulo</strong> <code>10<sup>9</sup> + 7</code>.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>

<pre><strong>Input:</strong> arr = [3,1,2,4]
<strong>Output:</strong> 17
<strong>Explanation:</strong> 
Subarrays are [3], [1], [2], [4], [3,1], [1,2], [2,4], [3,1,2], [1,2,4], [3,1,2,4]. 
Minimums are 3, 1, 2, 4, 1, 1, 2, 1, 1, 1.
Sum is 17.
</pre>

<p><strong class="example">Example 2:</strong></p>

<pre><strong>Input:</strong> arr = [11,81,94,43,3]
<strong>Output:</strong> 444
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>1 &lt;= arr.length &lt;= 3 * 10<sup>4</sup></code></li>
	<li><code>1 &lt;= arr[i] &lt;= 3 * 10<sup>4</sup></code></li>
</ul>
</div>

================================================
FILE: 0909-snakes-and-ladders/0909-snakes-and-ladders.java
================================================
class Solution {
    public int snakesAndLadders(int[][] board) {
        int n = board.length;
        Pair<Integer, Integer>[] cells = new Pair[n * n + 1];
        int label = 1;
        Integer[] columns = new Integer[n];
        for (int i = 0; i < n; i++) {
            columns[i] = i;
        }
        for (int row = n - 1; row >= 0; row--) {
            for (int column : columns) {
                cells[label++] = new Pair<>(row, column);
            }
            Collections.reverse(Arrays.asList(columns));
        }
        int[] dist = new int[n * n + 1];
        Arrays.fill(dist, -1);
        Queue<Integer> q = new LinkedList<Integer>();
        dist[1] = 0;
        q.add(1);
        while (!q.isEmpty()) {
            int curr = q.remove();
            for (int next = curr + 1; next <= Math.min(curr + 6, n * n); next++) {
                int row = cells[next].getKey(), column = cells[next].getValue();
                int destination = board[row][column] != -1 ? board[row][column] : next;
                if (dist[destination] == -1) {
                    dist[destination] = dist[curr] + 1;
                    q.add(destination);
                }
            }
        }
        return dist[n * n];
    }
}

================================================
FILE: 0909-snakes-and-ladders/NOTES.md
================================================
​

================================================
FILE: 0909-snakes-and-ladders/README.md
================================================
<h2><a href="https://leetcode.com/problems/snakes-and-ladders/">909. Snakes and Ladders</a></h2><h3>Medium</h3><hr><div><p>You are given an <code>n x n</code> integer matrix <code>board</code> where the cells are labeled from <code>1</code> to <code>n<sup>2</sup></code> in a <a href="https://en.wikipedia.org/wiki/Boustrophedon" target="_blank"><strong>Boustrophedon style</strong></a> starting from the bottom left of the board (i.e. <code>board[n - 1][0]</code>) and alternating direction each row.</p>

<p>You start on square <code>1</code> of the board. In each move, starting from square <code>curr</code>, do the following:</p>

<ul>
	<li>Choose a destination square <code>next</code> with a label in the range <code>[curr + 1, min(curr + 6, n<sup>2</sup>)]</code>.

	<ul>
		<li>This choice simulates the result of a standard <strong>6-sided die roll</strong>: i.e., there are always at most 6 destinations, regardless of the size of the board.</li>
	</ul>
	</li>
	<li>If <code>next</code> has a snake or ladder, you <strong>must</strong> move to the destination of that snake or ladder. Otherwise, you move to <code>next</code>.</li>
	<li>The game ends when you reach the
Download .txt
gitextract_b94qtoqo/

├── .github/
│   ├── ISSUE_TEMPLATE/
│   │   └── custom.md
│   └── pull_request_template.md
├── 0012-integer-to-roman/
│   ├── 0012-integer-to-roman.java
│   ├── 0012-integer-to-roman.py
│   ├── NOTES.md
│   └── README.md
├── 0026-remove-duplicates-from-sorted-array/
│   ├── 0026-remove-duplicates-from-sorted-array.java
│   ├── 0026-remove-duplicates-from-sorted-array.py
│   ├── NOTES.md
│   └── README.md
├── 0036-valid-sudoku/
│   ├── 0036-valid-sudoku.java
│   ├── 0036-valid-sudoku.py
│   ├── NOTES.md
│   └── README.md
├── 0037-sudoku-solver/
│   ├── 0037-sudoku-solver.java
│   ├── NOTES.md
│   └── README.md
├── 0038-count-and-say/
│   ├── 0038-count-and-say.java
│   ├── 0038-count-and-say.py
│   └── README.md
├── 0049-group-anagrams/
│   ├── 0049-group-anagrams.java
│   ├── 0049-group-anagrams.py
│   └── README.md
├── 0055-jump-game/
│   ├── 0055-jump-game.java
│   ├── 0055-jump-game.py
│   ├── NOTES.md
│   └── README.md
├── 0057-insert-interval/
│   ├── 0057-insert-interval.java
│   ├── 0057-insert-interval.py
│   ├── NOTES.md
│   └── README.md
├── 0070-climbing-stairs/
│   ├── 0070-climbing-stairs.java
│   ├── NOTES.md
│   └── README.md
├── 0076-minimum-window-substring/
│   ├── 0076-minimum-window-substring.java
│   ├── NOTES.md
│   └── README.md
├── 0079-word-search/
│   ├── 0079-word-search.java
│   ├── NOTES.md
│   └── README.md
├── 0093-restore-ip-addresses/
│   ├── 0093-restore-ip-addresses.java
│   └── README.md
├── 0100-same-tree/
│   ├── 0100-same-tree.java
│   ├── NOTES.md
│   └── README.md
├── 0124-binary-tree-maximum-path-sum/
│   ├── 0124-binary-tree-maximum-path-sum.java
│   ├── NOTES.md
│   └── README.md
├── 0125-valid-palindrome/
│   ├── 0125-valid-palindrome.java
│   ├── NOTES.md
│   └── README.md
├── 0131-palindrome-partitioning/
│   ├── 0131-palindrome-partitioning.java
│   ├── NOTES.md
│   └── README.md
├── 0134-gas-station/
│   ├── 0134-gas-station.java
│   ├── NOTES.md
│   └── README.md
├── 0144-binary-tree-preorder-traversal/
│   ├── 0144-binary-tree-preorder-traversal.java
│   ├── NOTES.md
│   └── README.md
├── 0149-max-points-on-a-line/
│   ├── 0149-max-points-on-a-line.java
│   ├── NOTES.md
│   └── README.md
├── 0150-evaluate-reverse-polish-notation/
│   ├── 0150-evaluate-reverse-polish-notation.java
│   ├── NOTES.md
│   └── README.md
├── 0151-reverse-words-in-a-string/
│   ├── 0151-reverse-words-in-a-string.java
│   ├── NOTES.md
│   └── README.md
├── 0198-house-robber/
│   ├── 0198-house-robber.java
│   └── README.md
├── 0212-word-search-ii/
│   ├── 0212-word-search-ii.java
│   ├── NOTES.md
│   └── README.md
├── 0219-contains-duplicate-ii/
│   ├── 0219-contains-duplicate-ii.java
│   ├── NOTES.md
│   └── README.md
├── 0222-count-complete-tree-nodes/
│   ├── 0222-count-complete-tree-nodes.java
│   ├── NOTES.md
│   └── README.md
├── 0223-rectangle-area/
│   ├── 0223-rectangle-area.java
│   ├── NOTES.md
│   └── README.md
├── 0224-basic-calculator/
│   ├── 0224-basic-calculator.java
│   ├── NOTES.md
│   └── README.md
├── 0232-implement-queue-using-stacks/
│   ├── 0232-implement-queue-using-stacks.java
│   ├── NOTES.md
│   └── README.md
├── 0236-lowest-common-ancestor-of-a-binary-tree/
│   ├── 0236-lowest-common-ancestor-of-a-binary-tree.java
│   ├── NOTES.md
│   └── README.md
├── 0237-delete-node-in-a-linked-list/
│   ├── 0237-delete-node-in-a-linked-list.java
│   ├── NOTES.md
│   └── README.md
├── 0242-valid-anagram/
│   ├── 0242-valid-anagram.cpp
│   ├── 0242-valid-anagram.java
│   ├── NOTES.md
│   └── README.md
├── 0263-ugly-number/
│   ├── 0263-ugly-number.java
│   ├── NOTES.md
│   └── README.md
├── 0279-perfect-squares/
│   ├── 0279-perfect-squares.java
│   ├── NOTES.md
│   └── README.md
├── 0290-word-pattern/
│   ├── 0290-word-pattern.java
│   └── README.md
├── 0295-find-median-from-data-stream/
│   ├── 0295-find-median-from-data-stream.java
│   ├── NOTES.md
│   └── README.md
├── 0309-best-time-to-buy-and-sell-stock-with-cooldown/
│   ├── 0309-best-time-to-buy-and-sell-stock-with-cooldown.java
│   ├── NOTES.md
│   └── README.md
├── 0328-odd-even-linked-list/
│   ├── 0328-odd-even-linked-list.java
│   ├── NOTES.md
│   └── README.md
├── 0334-increasing-triplet-subsequence/
│   ├── 0334-increasing-triplet-subsequence.java
│   ├── NOTES.md
│   └── README.md
├── 0345-reverse-vowels-of-a-string/
│   ├── 0345-reverse-vowels-of-a-string.java
│   ├── NOTES.md
│   └── README.md
├── 0374-guess-number-higher-or-lower/
│   ├── 0374-guess-number-higher-or-lower.java
│   ├── NOTES.md
│   └── README.md
├── 0380-insert-delete-getrandom-o1/
│   ├── 0380-insert-delete-getrandom-o1.java
│   ├── NOTES.md
│   └── README.md
├── 0409-longest-palindrome/
│   ├── 0409-longest-palindrome.java
│   ├── NOTES.md
│   └── README.md
├── 0446-arithmetic-slices-ii-subsequence/
│   ├── 0446-arithmetic-slices-ii-subsequence.java
│   ├── NOTES.md
│   └── README.md
├── 0451-sort-characters-by-frequency/
│   ├── 0451-sort-characters-by-frequency.java
│   ├── NOTES.md
│   └── README.md
├── 0452-minimum-number-of-arrows-to-burst-balloons/
│   ├── 0452-minimum-number-of-arrows-to-burst-balloons.java
│   ├── NOTES.md
│   └── README.md
├── 0491-non-decreasing-subsequences/
│   ├── 0491-non-decreasing-subsequences.java
│   ├── NOTES.md
│   └── README.md
├── 0520-detect-capital/
│   ├── 0520-detect-capital.java
│   └── NOTES.md
├── 0523-continuous-subarray-sum/
│   ├── 0523-continuous-subarray-sum.java
│   ├── NOTES.md
│   └── README.md
├── 0587-erect-the-fence/
│   ├── 0587-erect-the-fence.java
│   └── README.md
├── 0645-set-mismatch/
│   ├── 0645-set-mismatch.java
│   ├── NOTES.md
│   └── README.md
├── 0692-top-k-frequent-words/
│   ├── 0692-top-k-frequent-words.java
│   ├── NOTES.md
│   └── README.md
├── 0739-daily-temperatures/
│   ├── 0739-daily-temperatures.java
│   └── README.md
├── 0766-toeplitz-matrix/
│   ├── 0766-toeplitz-matrix.java
│   └── README.md
├── 0787-cheapest-flights-within-k-stops/
│   ├── 0787-cheapest-flights-within-k-stops.java
│   ├── NOTES.md
│   └── README.md
├── 0790-domino-and-tromino-tiling/
│   ├── 0790-domino-and-tromino-tiling.java
│   ├── NOTES.md
│   └── README.md
├── 0797-all-paths-from-source-to-target/
│   ├── 0797-all-paths-from-source-to-target.java
│   ├── NOTES.md
│   └── README.md
├── 0834-sum-of-distances-in-tree/
│   ├── 0834-sum-of-distances-in-tree.java
│   ├── NOTES.md
│   └── README.md
├── 0835-image-overlap/
│   ├── 0835-image-overlap.java
│   ├── NOTES.md
│   └── README.md
├── 0841-keys-and-rooms/
│   ├── 0841-keys-and-rooms.java
│   ├── NOTES.md
│   └── README.md
├── 0872-leaf-similar-trees/
│   ├── 0872-leaf-similar-trees.java
│   ├── NOTES.md
│   └── README.md
├── 0876-middle-of-the-linked-list/
│   ├── 0876-middle-of-the-linked-list.java
│   ├── NOTES.md
│   └── README.md
├── 0886-possible-bipartition/
│   ├── 0886-possible-bipartition.java
│   ├── NOTES.md
│   └── README.md
├── 0899-orderly-queue/
│   ├── 0899-orderly-queue.java
│   ├── NOTES.md
│   └── README.md
├── 0901-online-stock-span/
│   ├── 0901-online-stock-span.java
│   ├── NOTES.md
│   └── README.md
├── 0907-sum-of-subarray-minimums/
│   ├── 0907-sum-of-subarray-minimums.java
│   ├── NOTES.md
│   └── README.md
├── 0909-snakes-and-ladders/
│   ├── 0909-snakes-and-ladders.java
│   ├── NOTES.md
│   └── README.md
├── 0918-maximum-sum-circular-subarray/
│   ├── 0918-maximum-sum-circular-subarray.java
│   └── README.md
├── 0926-flip-string-to-monotone-increasing/
│   ├── 0926-flip-string-to-monotone-increasing.java
│   └── NOTES.md
├── 0938-range-sum-of-bst/
│   ├── 0938-range-sum-of-bst.java
│   ├── NOTES.md
│   └── README.md
├── 0944-delete-columns-to-make-sorted/
│   ├── 0944-delete-columns-to-make-sorted.java
│   ├── NOTES.md
│   └── README.md
├── 0947-most-stones-removed-with-same-row-or-column/
│   ├── 0947-most-stones-removed-with-same-row-or-column.java
│   ├── NOTES.md
│   └── README.md
├── 0974-subarray-sums-divisible-by-k/
│   ├── 0974-subarray-sums-divisible-by-k.java
│   ├── NOTES.md
│   └── README.md
├── 0976-largest-perimeter-triangle/
│   ├── 0976-largest-perimeter-triangle.java
│   ├── NOTES.md
│   └── README.md
├── 0980-unique-paths-iii/
│   ├── 0980-unique-paths-iii.java
│   ├── NOTES.md
│   └── README.md
├── 0997-find-the-town-judge/
│   ├── 0997-find-the-town-judge.java
│   ├── NOTES.md
│   └── README.md
├── 1007-minimum-domino-rotations-for-equal-row/
│   ├── 1007-minimum-domino-rotations-for-equal-row.java
│   ├── NOTES.md
│   └── README.md
├── 102-binary-tree-level-order-traversal/
│   ├── 102-binary-tree-level-order-traversal.java
│   ├── 102-binary-tree-level-order-traversal.py
│   ├── NOTES.md
│   └── README.md
├── 1020-number-of-enclaves/
│   └── 1020-number-of-enclaves.cpp
├── 1020. Number of Enclaves.java
├── 1026-maximum-difference-between-node-and-ancestor/
│   ├── 1026-maximum-difference-between-node-and-ancestor.java
│   ├── NOTES.md
│   └── README.md
├── 1029-two-city-scheduling/
│   ├── 1029-two-city-scheduling.java
│   ├── NOTES.md
│   └── README.md
├── 1046-last-stone-weight/
│   ├── 1046-last-stone-weight.java
│   ├── NOTES.md
│   └── README.md
├── 1047-remove-all-adjacent-duplicates-in-string/
│   ├── 1047-remove-all-adjacent-duplicates-in-string.java
│   ├── NOTES.md
│   └── README.md
├── 1048-longest-string-chain/
│   ├── 1048-longest-string-chain.java
│   ├── NOTES.md
│   └── README.md
├── 105-construct-binary-tree-from-preorder-and-inorder-traversal/
│   ├── 105-construct-binary-tree-from-preorder-and-inorder-traversal.java
│   ├── NOTES.md
│   └── README.md
├── 1061-lexicographically-smallest-equivalent-string/
│   ├── 1061-lexicographically-smallest-equivalent-string.java
│   ├── NOTES.md
│   └── README.md
├── 1074-number-of-submatrices-that-sum-to-target/
│   ├── 1074-number-of-submatrices-that-sum-to-target.java
│   └── NOTES.md
├── 108-convert-sorted-array-to-binary-search-tree/
│   ├── 108-convert-sorted-array-to-binary-search-tree.java
│   ├── NOTES.md
│   └── README.md
├── 1081-smallest-subsequence-of-distinct-characters/
│   ├── 1081-smallest-subsequence-of-distinct-characters.java
│   ├── NOTES.md
│   └── README.md
├── 1091-shortest-path-in-binary-matrix/
│   ├── 1091-shortest-path-in-binary-matrix.java
│   ├── NOTES.md
│   └── README.md
├── 11-container-with-most-water/
│   ├── 11-container-with-most-water.java
│   ├── Container_With_Most_Water.cpp
│   ├── NOTES.md
│   └── README.md
├── 112-path-sum/
│   ├── 112-path-sum.java
│   ├── NOTES.md
│   └── README.md
├── 113 Path Sum II med s24.cpp
├── 113-Path-Sum-II.cpp
├── 113-path-sum-ii/
│   ├── 113-path-sum-ii.java
│   ├── 113. Path Sum II.cpp
│   ├── NOTES.md
│   └── README.md
├── 114-flatten-binary-tree-to-linked-list/
│   ├── 114-flatten-binary-tree-to-linked-list.java
│   ├── NOTES.md
│   ├── README.md
│   └── SolutionCode.cpp
├── 1143-longest-common-subsequence/
│   ├── 1143-longest-common-subsequence.java
│   └── README.md
├── 1155-number-of-dice-rolls-with-target-sum/
│   ├── 1155-number-of-dice-rolls-with-target-sum.java
│   ├── NOTES.md
│   └── README.md
├── 117-populating-next-right-pointers-in-each-node-ii/
│   ├── 117-populating-next-right-pointers-in-each-node-ii.java
│   ├── NOTES.md
│   └── README.md
├── 118-pascals-triangle/
│   ├── 118-pascals-triangle.java
│   ├── NOTES.md
│   └── README.md
├── 1192-critical-connections-in-a-network/
│   ├── 1192-critical-connections-in-a-network.java
│   └── README.md
├── 12-integer-to-roman/
│   ├── 12-Leetcode-Integer-to-roman.cpp
│   ├── 12-integer-to-roman.java
│   ├── NOTES.md
│   └── README.md
├── 120-triangle/
│   ├── 120-triangle.java
│   ├── NOTES.md
│   └── README.md
├── 1207-unique-number-of-occurrences/
│   ├── 1207-unique-number-of-occurrences.java
│   ├── NOTES.md
│   └── README.md
├── 1209-remove-all-adjacent-duplicates-in-string-ii/
│   ├── 1209-remove-all-adjacent-duplicates-in-string-ii.java
│   ├── NOTES.md
│   └── README.md
├── 1220-count-vowels-permutation/
│   ├── 1220-count-vowels-permutation.java
│   ├── NOTES.md
│   └── README.md
├── 1235-maximum-profit-in-job-scheduling/
│   ├── 1235-maximum-profit-in-job-scheduling.java
│   ├── NOTES.md
│   └── README.md
├── 1239-maximum-length-of-a-concatenated-string-with-unique-characters/
│   ├── 1239-maximum-length-of-a-concatenated-string-with-unique-characters.java
│   ├── NOTES.md
│   └── README.md
├── 126-word-ladder-ii/
│   ├── 126-word-ladder-ii.java
│   ├── NOTES.md
│   └── README.md
├── 1260-shift-2d-grid/
│   ├── 1260-shift-2d-grid.java
│   ├── NOTES.md
│   └── README.md
├── 1268-search-suggestions-system/
│   ├── 1268-search-suggestions-system.java
│   ├── NOTES.md
│   └── README.md
├── 128-longest-consecutive-sequence/
│   ├── 128-longest-consecutive-sequence.java
│   ├── NOTES.md
│   └── README.md
├── 1293-shortest-path-in-a-grid-with-obstacles-elimination/
│   ├── 1293-shortest-path-in-a-grid-with-obstacles-elimination.java
│   ├── NOTES.md
│   └── README.md
├── 13-roman-to-integer/
│   ├── 13-roman-to-integer.cpp
│   ├── 13-roman-to-integer.java
│   ├── NOTES.md
│   └── README.md
├── 1302-deepest-leaves-sum/
│   ├── 1302-deepest-leaves-sum.java
│   ├── NOTES.md
│   └── README.md
├── 1323-maximum-69-number/
│   ├── 1323-maximum-69-number.java
│   ├── NOTES.md
│   └── README.md
├── 1328-break-a-palindrome/
│   ├── 1328-break-a-palindrome.java
│   ├── NOTES.md
│   └── README.md
├── 1329-sort-the-matrix-diagonally/
│   ├── 1329-sort-the-matrix-diagonally.cpp
│   ├── 1329-sort-the-matrix-diagonally.java
│   ├── NOTES.md
│   ├── README.md
│   └── SolutionCode.cpp
├── 1332-remove-palindromic-subsequences/
│   ├── 1332-remove-palindromic-subsequences.java
│   └── README.md
├── 1335-minimum-difficulty-of-a-job-schedule/
│   ├── 1335-minimum-difficulty-of-a-job-schedule.java
│   ├── NOTES.md
│   └── README.md
├── 1337-the-k-weakest-rows-in-a-matrix/
│   ├── 1337-the-k-weakest-rows-in-a-matrix.java
│   ├── NOTES.md
│   └── README.md
├── 1338-reduce-array-size-to-the-half/
│   ├── 1338-reduce-array-size-to-the-half.cpp
│   ├── 1338-reduce-array-size-to-the-half.java
│   └── README.md
├── 1339-maximum-product-of-splitted-binary-tree/
│   ├── 1339-maximum-product-of-splitted-binary-tree.java
│   ├── NOTES.md
│   └── README.md
├── 1342-number-of-steps-to-reduce-a-number-to-zero/
│   ├── 1342-number-of-steps-to-reduce-a-number-to-zero.java
│   ├── NOTES.md
│   └── README.md
├── 135-candy/
│   ├── 135-candy.java
│   ├── NOTES.md
│   └── README.md
├── 1354-construct-target-array-with-multiple-sums/
│   ├── 1354-construct-target-array-with-multiple-sums.java
│   ├── 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.java
│   └── README.md
├── 1381. Design a Stack With Increment Operation/
│   └── 1381-Design-a-Stack-With-Increment-Operation.cpp
├── 1383 Maximum Performance of a Team lc hard.cpp
├── 1383-maximum-performance-of-a-team/
│   ├── 1383-maximum-performance-of-a-team.java
│   └── README.md
├── 1396-design-underground-system/
│   ├── 1396-design-underground-system.java
│   ├── NOTES.md
│   └── README.md
├── 14. Longest Common Prefix.py
├── 1423-maximum-points-you-can-obtain-from-cards/
│   ├── 1423-maximum-points-you-can-obtain-from-cards.java
│   ├── NOTES.md
│   └── README.md
├── 143-Reorder List.java
├── 1443-minimum-time-to-collect-all-apples-in-a-tree/
│   ├── 1443-minimum-time-to-collect-all-apples-in-a-tree.java
│   └── README.md
├── 1448-count-good-nodes-in-binary-tree/
│   ├── 1448-count-good-nodes-in-binary-tree.java
│   ├── NOTES.md
│   └── README.md
├── 1457 Pseudo-Palindromic Paths in a Binary Tree lc.cpp
├── 1457-pseudo-palindromic-paths-in-a-binary-tree/
│   ├── 1457-pseudo-palindromic-paths-in-a-binary-tree.java
│   └── 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.java
│   ├── 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.java
│   ├── NOTES.md
│   └── README.md
├── 1473-paint-house-iii/
│   ├── 1473-paint-house-iii.java
│   ├── NOTES.md
│   └── README.md
├── 1480-running-sum-of-1d-array/
│   ├── 1480-running-sum-of-1d-array.java
│   ├── NOTES.md
│   └── README.md
├── 15. 3Sum/
│   └── SolutionCode.cpp
├── 151. Reverse Words in a String.java
├── 1519-number-of-nodes-in-the-sub-tree-with-the-same-label/
│   ├── 1519-number-of-nodes-in-the-sub-tree-with-the-same-label.java
│   ├── NOTES.md
│   └── README.md
├── 1531-string-compression-ii/
│   ├── 1531-string-compression-ii.java
│   ├── NOTES.md
│   └── README.md
├── 1544-make-the-string-great/
│   ├── 1544-make-the-string-great.java
│   ├── NOTES.md
│   └── README.md
├── 1578-minimum-time-to-make-rope-colorful/
│   ├── 1578-minimum-time-to-make-rope-colorful.java
│   ├── NOTES.md
│   └── README.md
├── 1584-min-cost-to-connect-all-points/
│   ├── 1584-min-cost-to-connect-all-points.java
│   ├── NOTES.md
│   └── README.md
├── 16-3sum-closest/
│   ├── 16-3sum-closest.java
│   ├── NOTES.md
│   └── README.md
├── 16. 3Sum Closest - leetcode/
│   └── SolutionCode.cpp
├── 160-intersection-of-two-linked-lists/
│   ├── 160-intersection-of-two-linked-lists.java
│   ├── NOTES.md
│   └── README.md
├── 1631-path-with-minimum-effort/
│   ├── 1631-path-with-minimum-effort.java
│   ├── NOTES.md
│   └── README.md
├── 1641-count-sorted-vowel-strings/
│   ├── 1641-count-sorted-vowel-strings.java
│   ├── NOTES.md
│   └── README.md
├── 1642-furthest-building-you-can-reach/
│   ├── 1642-furthest-building-you-can-reach.java
│   ├── NOTES.md
│   └── README.md
├── 1647-minimum-deletions-to-make-character-frequencies-unique/
│   ├── 1647-minimum-deletions-to-make-character-frequencies-unique.java
│   ├── NOTES.md
│   └── README.md
├── 1657-determine-if-two-strings-are-close/
│   ├── 1657-determine-if-two-strings-are-close.java
│   ├── NOTES.md
│   └── README.md
├── 1658-minimum-operations-to-reduce-x-to-zero/
│   ├── 1658-minimum-operations-to-reduce-x-to-zero.java
│   ├── NOTES.md
│   └── README.md
├── 1662-check-if-two-string-arrays-are-equivalent/
│   ├── 1662-check-if-two-string-arrays-are-equivalent.java
│   ├── NOTES.md
│   └── README.md
├── 1663-smallest-string-with-a-given-numeric-value/
│   ├── 1663-smallest-string-with-a-given-numeric-value.java
│   ├── NOTES.md
│   └── README.md
├── 167-two-sum-ii-input-array-is-sorted/
│   ├── 167-two-sum-ii-input-array-is-sorted.java
│   ├── NOTES.md
│   └── README.md
├── 1679-max-number-of-k-sum-pairs/
│   ├── 1679-max-number-of-k-sum-pairs.java
│   └── NOTES.md
├── 1680 Concatenation of Consecutive Binary Numbers med s23.cpp
├── 1680-concatenation-of-consecutive-binary-numbers/
│   ├── 1680-concatenation-of-consecutive-binary-numbers.java
│   └── README.md
├── 1689-partitioning-into-minimum-number-of-deci-binary-numbers/
│   ├── 1689-partitioning-into-minimum-number-of-deci-binary-numbers.java
│   ├── NOTES.md
│   └── README.md
├── 1695-maximum-erasure-value/
│   ├── 1695-maximum-erasure-value.java
│   ├── NOTES.md
│   └── README.md
├── 1696-jump-game-vi/
│   ├── 1696-jump-game-vi.java
│   ├── NOTES.md
│   └── README.md
├── 17-letter-combinations-of-a-phone-number/
│   ├── 17-letter-combinations-of-a-phone-number.java
│   ├── NOTES.md
│   └── README.md
├── 1704-determine-if-string-halves-are-alike/
│   ├── 1704-determine-if-string-halves-are-alike.java
│   ├── NOTES.md
│   └── README.md
├── 1706-where-will-the-ball-fall/
│   ├── 1706-where-will-the-ball-fall.java
│   ├── NOTES.md
│   └── README.md
├── 1710-maximum-units-on-a-truck/
│   ├── 1710-maximum-units-on-a-truck.java
│   ├── NOTES.md
│   └── README.md
├── 1721-swapping-nodes-in-a-linked-list/
│   ├── 1721-swapping-nodes-in-a-linked-list.java
│   └── README.md
├── 173-binary-search-tree-iterator/
│   ├── 173-binary-search-tree-iterator.java
│   ├── NOTES.md
│   └── binary-search-tree-iterator.cpp
├── 1742. Maximum Number of Balls in a Box(leetcode)
├── 1770 Maximum Score from Performing Multiplication Operations lc.cpp
├── 1770-maximum-score-from-performing-multiplication-operations/
│   ├── 1770-maximum-score-from-performing-multiplication-operations.java
│   ├── NOTES.md
│   └── README.md
├── 179-Largest Number.java
├── 1791. Find Center of Star Graph.java
├── 1832-check-if-the-sentence-is-pangram/
│   ├── 1832-check-if-the-sentence-is-pangram.java
│   ├── NOTES.md
│   └── README.md
├── 1833-maximum-ice-cream-bars/
│   ├── 1833-maximum-ice-cream-bars.java
│   ├── NOTES.md
│   └── README.md
├── 1834-single-threaded-cpu/
│   ├── 1834-single-threaded-cpu.java
│   ├── NOTES.md
│   └── README.md
├── 188-best-time-to-buy-and-sell-stock-iv/
│   ├── 188-best-time-to-buy-and-sell-stock-iv.java
│   ├── NOTES.md
│   └── README.md
├── 188. Best Time to Buy and Sell Stock IV.cpp
├── 19-remove-nth-node-from-end-of-list/
│   ├── 19-remove-nth-node-from-end-of-list.java
│   ├── NOTES.md
│   └── README.md
├── 191-number-of-1-bits/
│   ├── 191-number-of-1-bits.java
│   ├── NOTES.md
│   └── README.md
├── 1926-nearest-exit-from-entrance-in-maze/
│   ├── 1926-nearest-exit-from-entrance-in-maze.java
│   ├── NOTES.md
│   └── README.md
├── 1962-remove-stones-to-minimize-the-total/
│   ├── 1962-remove-stones-to-minimize-the-total.java
│   ├── NOTES.md
│   └── README.md
├── 1971-find-if-path-exists-in-graph/
│   ├── 1971-find-if-path-exists-in-graph.java
│   └── README.md
├── 199-binary-tree-right-side-view/
│   ├── 199-binary-tree-right-side-view.java
│   ├── NOTES.md
│   └── README.md
├── 1991-find-the-middle-index-in-array/
│   ├── 1991-find-the-middle-index-in-array.java
│   ├── NOTES.md
│   └── README.md
├── 1996-the-number-of-weak-characters-in-the-game/
│   ├── 1996-the-number-of-weak-characters-in-the-game.cpp
│   ├── 1996-the-number-of-weak-characters-in-the-game.java
│   ├── NOTES.md
│   └── README.md
├── 200-number-of-islands/
│   ├── 200-number-of-islands.java
│   ├── NOTES.md
│   └── README.md
├── 2007 Find Original Array From Doubled Array lc.cpp
├── 2007-find-original-array-from-doubled-array/
│   ├── 2007-find-original-array-from-doubled-array.java
│   ├── NOTES.md
│   └── README.md
├── 2095-delete-the-middle-node-of-a-linked-list/
│   ├── 2095-delete-the-middle-node-of-a-linked-list.java
│   └── NOTES.md
├── 2131-longest-palindrome-by-concatenating-two-letter-words/
│   ├── 2131-longest-palindrome-by-concatenating-two-letter-words.java
│   └── README.md
├── 2136-earliest-possible-day-of-full-bloom/
│   ├── 2136-earliest-possible-day-of-full-bloom.java
│   └── NOTES.md
├── 215-kth-largest-element-in-an-array/
│   ├── 215-kth-largest-element-in-an-array.java
│   └── NOTES.md
├── 216-combination-sum-iii/
│   ├── 216-combination-sum-iii.java
│   ├── NOTES.md
│   └── README.md
├── 218-the-skyline-problem/
│   ├── 218-the-skyline-problem.java
│   ├── NOTES.md
│   └── README.md
├── 2225-find-players-with-zero-or-one-losses/
│   ├── 2225-find-players-with-zero-or-one-losses.java
│   ├── NOTES.md
│   └── README.md
├── 2244-minimum-rounds-to-complete-all-tasks/
│   ├── 2244-minimum-rounds-to-complete-all-tasks.java
│   ├── NOTES.md
│   └── README.md
├── 2246-longest-path-with-different-adjacent-characters/
│   ├── 2246-longest-path-with-different-adjacent-characters.java
│   ├── NOTES.md
│   └── README.md
├── 225-implement-stack-using-queues/
│   ├── 225-implement-stack-using-queues.java
│   └── NOTES.md
├── 2256-minimum-average-difference/
│   ├── 2256-minimum-average-difference.java
│   ├── NOTES.md
│   └── README.md
├── 2279-maximum-bags-with-full-capacity-of-rocks/
│   ├── 2279-maximum-bags-with-full-capacity-of-rocks.java
│   ├── 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.java
│   └── NOTES.md
├── 234-palindrome-linked-list/
│   ├── 234-palindrome-linked-list.java
│   ├── 234-palindrome-linked-list.py
│   ├── NOTES.md
│   ├── README.md
│   └── palindrome-linked-list.cpp
├── 234. Palindrome Linked List/
│   └── SolutionCode.cpp
├── 235-lowest-common-ancestor-of-a-binary-search-tree/
│   ├── 235-lowest-common-ancestor-of-a-binary-search-tree.java
│   ├── 235-lowest-common-ancestor-of-a-binary-search-tree.py
│   ├── NOTES.md
│   └── README.md
├── 2359-find-closest-node-to-given-two-nodes/
│   ├── NOTES.md
│   └── README.md
├── 236-lowest-common-ancestor-of-a-binary-tree/
│   ├── 236-lowest-common-ancestor-of-a-binary-tree.java
│   └── NOTES.md
├── 237-delete-node-in-a-linked-list/
│   ├── 237-delete-node-in-a-linked-list.java
│   └── NOTES.md
├── 2389-longest-subsequence-with-limited-sum/
│   ├── 2389-longest-subsequence-with-limited-sum.java
│   ├── NOTES.md
│   └── README.md
├── 2389_longest_subsequence_with_limited_sum.cpp
├── 2390_removing_stars_from_a_string.cpp
├── 2395_Find_Subarrays_With_Equal_Sum.cpp
├── 240-search-a-2d-matrix-ii/
│   ├── 240-search-a-2d-matrix-ii.java
│   ├── NOTES.md
│   └── README.md
├── 242-valid-anagram/
│   ├── 242-valid-anagram.java
│   ├── NOTES.md
│   └── README.md
├── 2421-number-of-good-paths/
│   ├── 2421-number-of-good-paths.java
│   └── NOTES.md
├── 2429-minimize-xor/
│   ├── 2429-minimize-xor.cpp
│   ├── Notes.md
│   └── Readme.md
├── 2453-destroy-sequential-targets/
│   ├── 2453-destroy-sequential-targets.java
│   └── NOTES.md
├── 268-missing-number/
│   ├── 268-missing-number.java
│   ├── NOTES.md
│   └── README.md
├── 284-peeking-iterator/
│   ├── 284-peeking-iterator.java
│   └── README.md
├── 287-find-the-duplicate-number/
│   ├── 287-find-the-duplicate-number.java
│   ├── NOTES.md
│   └── README.md
├── 289-game-of-life/
│   ├── 289-game-of-life.java
│   ├── NOTES.md
│   └── README.md
├── 29-divide-two-integers/
│   ├── 29-divide-two-integers.java
│   └── NOTES.md
├── 3-longest-substring-without-repeating-characters/
│   ├── 3-longest-substring-without-repeating-characters.java
│   ├── NOTES.md
│   └── README.md
├── 30-substring-with-concatenation-of-all-words/
│   ├── 30-substring-with-concatenation-of-all-words.java
│   ├── 30-substring-with-concatenation-of-all-words.py
│   ├── NOTES.md
│   └── README.md
├── 300-longest-increasing-subsequence/
│   ├── 300-longest-increasing-subsequence.java
│   ├── NOTES.md
│   └── README.md
├── 304-range-sum-query-2d-immutable/
│   ├── 304-range-sum-query-2d-immutable.java
│   ├── NOTES.md
│   └── README.md
├── 307-range-sum-query-mutable/
│   ├── 307-range-sum-query-mutable.java
│   ├── NOTES.md
│   └── README.md
├── 31-next-permutation/
│   ├── 31-next-permutation.java
│   ├── NOTES.md
│   ├── README.md
│   └── nextPurmutation.cpp
├── 315-count-of-smaller-numbers-after-self/
│   ├── 315-count-of-smaller-numbers-after-self.java
│   ├── NOTES.md
│   └── README.md
├── 316-remove-duplicate-letters/
│   ├── 316-remove-duplicate-letters.java
│   ├── NOTES.md
│   └── README.md
├── 318-maximum-product-of-word-lengths/
│   ├── 318-maximum-product-of-word-lengths.java
│   ├── NOTES.md
│   └── README.md
├── 32-longest-valid-parentheses/
│   ├── 32-longest-valid-parentheses.java
│   ├── NOTES.md
│   └── README.md
├── 322-coin-change/
│   ├── 322-coin-change.java
│   ├── NOTES.md
│   └── README.md
├── 326-power-of-three/
│   ├── 326-power-of-three.java
│   ├── 326_Power_of_three.cpp
│   ├── NOTES.md
│   └── README.md
├── 329-longest-increasing-path-in-a-matrix/
│   ├── 329-longest-increasing-path-in-a-matrix.java
│   └── README.md
├── 33-search-in-rotated-sorted-array/
│   ├── 33-search-in-rotated-sorted-array.java
│   └── README.md
├── 336-palindrome-pairs/
│   ├── 336-palindrome-pairs.java
│   ├── 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.java
│   └── README.md
├── 341-flatten-nested-list-iterator/
│   ├── 341-flatten-nested-list-iterator.java
│   ├── NOTES.md
│   └── README.md
├── 342-power-of-four/
│   ├── 342-power-of-four.java
│   ├── NOTES.md
│   ├── README.md
│   └── power of four.cpp
├── 344-reverse-string/
│   ├── 344-reverse-string.java
│   ├── NOTES.md
│   └── README.md
├── 347-top-k-frequent-elements/
│   ├── 347-top-k-frequent-elements.cpp
│   ├── 347-top-k-frequent-elements.java
│   ├── NOTES.md
│   └── README.md
├── 354-russian-doll-envelopes/
│   ├── 354-russian-doll-envelopes.java
│   ├── NOTES.md
│   └── README.md
├── 363-max-sum-of-rectangle-no-larger-than-k/
│   ├── 363-max-sum-of-rectangle-no-larger-than-k.cpp
│   ├── 363-max-sum-of-rectangle-no-larger-than-k.java
│   ├── NOTES.md
│   └── README.md
├── 37-Sudoku-solver/
│   ├── 37-Sudoku-solver.js
│   └── README.md
├── 371-sum-of-two-integers/
│   ├── 371-sum-of-two-integers.java
│   ├── NOTES.md
│   └── README.md
├── 376-wiggle-subsequence/
│   ├── 376-wiggle-subsequence.java
│   ├── NOTES.md
│   └── README.md
├── 377-combination-sum-iv/
│   ├── 377-combination-sum-iv.java
│   ├── NOTES.md
│   └── README.md
├── 378-kth-smallest-element-in-a-sorted-matrix/
│   ├── 378-kth-smallest-element-in-a-sorted-matrix.java
│   └── NOTES.md
├── 383-ransom-note/
│   ├── 383-ransom-note.java
│   ├── NOTES.md
│   ├── README.md
│   ├── ransom-note.cpp
│   └── ransome-note-two-approaches.cpp
├── 387-first-unique-character-in-a-string/
│   ├── 387-first-unique-character-in-a-string.java
│   ├── NOTES.md
│   ├── README.md
│   └── first-unique-character-in-a-string.CPP
├── 393-utf-8-validation/
│   ├── 393-utf-8-validation.java
│   ├── NOTES.md
│   └── README.md
├── 399-evaluate-division/
│   ├── 399-evaluate-division.java
│   ├── NOTES.md
│   └── README.md
├── 4-median-of-two-sorted-arrays/
│   ├── 4-median-of-two-sorted-arrays.java
│   └── NOTES.md
├── 406-queue-reconstruction-by-height/
│   ├── 406-queue-reconstruction-by-height.java
│   ├── NOTES.md
│   └── README.md
├── 410-split-array-largest-sum/
│   ├── 410-split-array-largest-sum.java
│   ├── NOTES.md
│   └── README.md
├── 417-pacific-atlantic-water-flow/
│   ├── 417-pacific-atlantic-water-flow.java
│   ├── NOTES.md
│   └── README.md
├── 417_Pacific Atlantic Water Flow.cpp
├── 42 Trapping Rain Water hd s18.cpp
├── 42-trapping-rain-water/
│   ├── 42-trapping-rain-water.java
│   ├── NOTES.md
│   └── README.md
├── 429-n-ary-tree-level-order-traversal/
│   ├── 429-n-ary-tree-level-order-traversal.cpp
│   ├── 429-n-ary-tree-level-order-traversal.java
│   ├── NOTES.md
│   └── README.md
├── 456-132-pattern/
│   ├── 456-132-pattern.java
│   ├── NOTES.md
│   └── README.md
├── 458-poor-pigs/
│   ├── 458-poor-pigs.java
│   ├── NOTES.md
│   └── README.md
├── 462-minimum-moves-to-equal-array-elements-ii/
│   ├── 462-minimum-moves-to-equal-array-elements-ii.java
│   ├── NOTES.md
│   └── README.md
├── 47-permutations-ii/
│   ├── 47-permutations-ii.java
│   ├── NOTES.md
│   └── README.md
├── 473-matchsticks-to-square/
│   ├── 473-matchsticks-to-square.java
│   ├── NOTES.md
│   └── README.md
├── 474-ones-and-zeroes/
│   ├── 474-ones-and-zeroes.java
│   ├── NOTES.md
│   └── README.md
├── 48-rotate-image/
│   ├── 48-Rotate-Image.cpp
│   ├── 48-rotate-image.java
│   ├── NOTES.md
│   └── README.md
├── 5-longest-palindromic-substring/
│   ├── 5-longest-palindromic-substring.java
│   ├── NOTES.md
│   └── README.md
├── 50-powx-n/
│   ├── 50-powx-n.java
│   ├── NOTES.md
│   └── README.md
├── 509-fibonacci-number/
│   ├── 509-fibonacci-number.java
│   ├── NOTES.md
│   └── README.md
├── 51-n-queens/
│   ├── 51-n-queens.java
│   ├── NOTES.md
│   └── README.md
├── 52-n-queens-ii/
│   ├── 52-n-queens-ii.java
│   ├── NOTES.md
│   └── README.md
├── 53-maximum-subarray/
│   ├── 53-maximum-subarray.java
│   ├── Maximum Subarray.py
│   ├── NOTES.md
│   └── README.md
├── 535-encode-and-decode-tinyurl/
│   ├── 535-encode-and-decode-tinyurl.java
│   ├── NOTES.md
│   └── README.md
├── 538-convert-bst-to-greater-tree/
│   ├── 538-convert-bst-to-greater-tree.java
│   ├── NOTES.md
│   └── README.md
├── 541-reverse-string-ii/
│   ├── 541-reverse-string-ii.java
│   ├── NOTES.md
│   └── README.md
├── 557 Reverse Words in a String III easy lc s22.cpp
├── 557-reverse-words-in-a-string-iii/
│   ├── 557-reverse-words-in-a-string-iii.java
│   └── NOTES.md
├── 560. Subarray Sum Equals K/
│   └── 560. Subarray Sum Equals K.cpp
├── 576-out-of-boundary-paths/
│   ├── 576-out-of-boundary-paths.java
│   ├── NOTES.md
│   └── README.md
├── 581-shortest-unsorted-continuous-subarray/
│   ├── 581-shortest-unsorted-continuous-subarray.java
│   ├── NOTES.md
│   └── README.md
├── 583-delete-operation-for-two-strings/
│   ├── 583-delete-operation-for-two-strings.java
│   ├── NOTES.md
│   └── README.md
├── 59-spiral-matrix-ii/
│   ├── 59-spiral-matrix-ii.java
│   ├── NOTES.md
│   └── README.md
├── 6-zigzag-conversion/
│   ├── 6-zigzag-conversion.java
│   ├── NOTES.md
│   └── README.md
├── 606-construct-string-from-binary-tree/
│   ├── 606-construct-string-from-binary-tree.java
│   ├── NOTES.md
│   └── README.md
├── 609 Find Duplicate File in System lc med s19.cpp
├── 609-find-duplicate-file-in-system/
│   ├── 609-find-duplicate-file-in-system.java
│   ├── NOTES.md
│   └── README.md
├── 62-unique-paths/
│   ├── 62-unique-paths.java
│   ├── NOTES.md
│   └── README.md
├── 622-design-circular-queue/
│   ├── 622-design-circular-queue.java
│   ├── NOTES.md
│   └── README.md
├── 623-add-one-row-to-tree/
│   ├── 623-add-one-row-to-tree.java
│   ├── NOTES.md
│   └── README.md
├── 629-k-inverse-pairs-array/
│   ├── 629-k-inverse-pairs-array.java
│   ├── NOTES.md
│   └── README.md
├── 63-unique-paths-ii/
│   ├── 63-unique-paths-ii.java
│   ├── NOTES.md
│   └── README.md
├── 630-course-schedule-iii/
│   ├── 630-course-schedule-iii.java
│   └── README.md
├── 637-average-of-levels-in-binary-tree/
│   ├── 637-average-of-levels-in-binary-tree.cpp
│   ├── 637-average-of-levels-in-binary-tree.java
│   └── README.md
├── 637-average-of-levels-in-binary-tree.py
├── 647-palindromic-substrings/
│   ├── 647-palindromic-substrings.java
│   └── NOTES.md
├── 653-two-sum-iv-input-is-a-bst/
│   ├── 653-two-sum-iv-input-is-a-bst.java
│   ├── NOTES.md
│   └── README.md
├── 658-find-k-closest-elements/
│   ├── 658-find-k-closest-elements.java
│   └── README.md
├── 659-split-array-into-consecutive-subsequences/
│   ├── 659-split-array-into-consecutive-subsequences.cpp
│   ├── 659-split-array-into-consecutive-subsequences.java
│   ├── NOTES.md
│   └── README.md
├── 665-non-decreasing-array/
│   ├── 665-non-decreasing-array.java
│   ├── NOTES.md
│   └── README.md
├── 669-trim-a-binary-search-tree/
│   ├── 669-trim-a-binary-search-tree.java
│   ├── NOTES.md
│   └── README.md
├── 680-valid-palindrome-ii/
│   ├── 680-valid-palindrome-ii.java
│   ├── NOTES.md
│   └── README.md
├── 682-baseball-game/
│   ├── 682-baseball-game.java
│   ├── NOTES.md
│   └── README.md
├── 695-max-area-of-island/
│   ├── 695-max-area-of-island.java
│   ├── NOTES.md
│   ├── README.md
│   └── SolutionCode.cpp
├── 698-partition-to-k-equal-sum-subsets/
│   ├── 698-partition-to-k-equal-sum-subsets.java
│   └── README.md
├── 7 Segment Display.java
├── 70-climbing-stairs/
│   ├── 70-climbing-stairs.java
│   ├── NOTES.md
│   └── README.md
├── 700-search-in-a-binary-search-tree/
│   ├── 700-search-in-a-binary-search-tree.java
│   ├── NOTES.md
│   └── README.md
├── 703-kth-largest-element-in-a-stream/
│   ├── 703-kth-largest-element-in-a-stream.py
│   └── NOTES.md
├── 704-binary-search/
│   ├── 704-binary-search.java
│   ├── NOTES.md
│   └── README.md
├── 705-design-hashset/
│   ├── 705-design-hashset.java
│   ├── NOTES.md
│   └── README.md
├── 706-design-hashmap/
│   ├── 706-design-hashmap.java
│   ├── NOTES.md
│   └── README.md
├── 713_Subarray_Product_Less_Than_K.cpp
├── 718-Maximum-Length-of-Repeated-Subarray.cpp
├── 718-maximum-length-of-repeated-subarray/
│   ├── 718-maximum-length-of-repeated-subarray.java
│   ├── NOTES.md
│   ├── README.md
│   └── Solved Using DP.java
├── 718. Maximum Length of Repeated Subarray/
│   └── 718. Maximum Length of Repeated Subarray.cpp
├── 718. Maximum Length of Repeated Subarray lc med s20.cpp
├── 724-find-pivot-index/
│   ├── 724-find-pivot-index.java
│   ├── NOTES.md
│   └── README.md
├── 729-my-calendar-i/
│   ├── 729-my-calendar-i.java
│   ├── NOTES.md
│   └── README.md
├── 732-my-calendar-iii/
│   ├── 732-my-calendar-iii.java
│   ├── NOTES.md
│   └── README.md
├── 74-search-a-2d-matrix/
│   ├── 74-search-a-2d-matrix.java
│   ├── NOTES.md
│   └── README.md
├── 743-network-delay-time/
│   ├── 743-network-delay-time.java
│   ├── NOTES.md
│   └── README.md
├── 745-prefix-and-suffix-search/
│   ├── 745-prefix-and-suffix-search.java
│   ├── NOTES.md
│   └── README.md
├── 746-min-cost-climbing-stairs/
│   ├── 746-min-cost-climbing-stairs.java
│   ├── NOTES.md
│   └── README.md
├── 76-minimum-window-substring/
│   ├── 76-minimum-window-substring.java
│   ├── NOTES.md
│   └── README.md
├── 763-partition-labels/
│   ├── 763-partition-labels.java
│   ├── NOTES.md
│   └── README.md
├── 785-is-graph-bipartite/
│   ├── 785-is-graph-bipartite.java
│   ├── NOTES.md
│   └── README.md
├── 791-Custom-Sort-String-Leetcode.cpp
├── 792-number-of-matching-subsequences/
│   ├── 792-number-of-matching-subsequences.java
│   ├── NOTES.md
│   └── README.md
├── 802. Find Eventual Safe States.java
├── 804-unique-morse-code-words/
│   ├── 804-unique-morse-code-words.java
│   ├── NOTES.md
│   ├── README.md
│   └── unique-morse-code.cpp
├── 81-search-in-rotated-sorted-array-ii/
│   ├── 81-search-in-rotated-sorted-array-ii.java
│   ├── NOTES.md
│   └── README.md
├── 814-binary-tree-pruning/
│   ├── 814-binary-tree-pruning.java
│   └── README.md
├── 82-remove-duplicates-from-sorted-list-ii/
│   ├── 82-remove-duplicates-from-sorted-list-ii.java
│   ├── NOTES.md
│   └── README.md
├── 820-short-encoding-of-words/
│   ├── 820-short-encoding-of-words.java
│   ├── NOTES.md
│   └── README.md
├── 823-binary-trees-with-factors/
│   ├── 823-binary-trees-with-factors.java
│   ├── NOTES.md
│   └── README.md
├── 838-push-dominoes/
│   ├── 838-push-dominoes.java
│   ├── NOTES.md
│   └── README.md
├── 844-backspace-string-compare/
│   ├── 844-backspace-string-compare.java
│   ├── NOTES.md
│   └── README.md
├── 845_Longest_Mountain_in_Array.cpp
├── 856-score-of-parentheses/
│   ├── 856-score-of-parentheses.java
│   ├── NOTES.md
│   └── README.md
├── 86-partition-list/
│   ├── 86-partition-list.java
│   ├── NOTES.md
│   └── README.md
├── 867-transpose-matrix/
│   ├── 867-transpose-matrix.java
│   └── README.md
├── 869-Reordered-Power-of-2/
│   └── 869-Reordered-Power-of-2.cpp
├── 871-minimum-number-of-refueling-stops/
│   ├── 871-minimum-number-of-refueling-stops.java
│   ├── Minimum-Number-of-Refueling-Stops.cpp
│   ├── NOTES.md
│   └── README.md
├── 871. Minimum Number of Refueling Stops.cpp
├── 876-middle-of-the-linked-list/
│   ├── 876-middle-of-the-linked-list.java
│   ├── NOTES.md
│   └── README.md
├── 88-merge-sorted-array/
│   ├── 88-merge-sorted-array.java
│   ├── NOTES.md
│   └── README.md
├── 881-boats-to-save-people/
│   ├── 881-boats-to-save-people.java
│   ├── NOTES.md
│   └── README.md
├── 890-find-and-replace-pattern/
│   ├── 890-find-and-replace-pattern.java
│   ├── NOTES.md
│   └── README.md
├── 895-maximum-frequency-stack/
│   ├── 895-maximum-frequency-stack.java
│   ├── NOTES.md
│   └── README.md
├── 897-increasing-order-search-tree/
│   ├── 897-increasing-order-search-tree.java
│   ├── NOTES.md
│   └── README.md
├── 905-sort-array-by-parity/
│   ├── 905-sort-array-by-parity.java
│   ├── NOTES.md
│   └── README.md
├── 91-decode-ways/
│   ├── 91-decode-ways.java
│   ├── NOTES.md
│   └── README.md
├── 916-word-subsets/
│   ├── 916-word-subsets.java
│   ├── NOTES.md
│   └── README.md
├── 92-reverse-linked-list-ii/
│   ├── 92-reverse-linked-list-ii.java
│   ├── NOTES.md
│   └── README.md
├── 923-3sum-with-multiplicity/
│   ├── 923-3sum-with-multiplicity.java
│   ├── NOTES.md
│   └── README.md
├── 936-stamping-the-sequence/
│   ├── 936-stamping-the-sequence.java
│   ├── NOTES.md
│   ├── README.md
│   ├── Stamping The Sequence.cpp
│   └── stamping-the-sequence.cpp
├── 94-binary-tree-inorder-traversal/
│   ├── 94-binary-tree-inorder-traversal.java
│   ├── Binary Tree InOrder Traversal lc.cpp
│   ├── NOTES.md
│   └── README.md
├── 94. Binary Tree Inorder Traversal.cpp
├── 948 Bag of Tokens lc med.cpp
├── 948-bag-of-tokens/
│   ├── 948-bag-of-tokens.java
│   ├── NOTES.md
│   └── README.md
├── 96-Unique Binary Search Trees.java
├── 967-numbers-with-same-consecutive-differences/
│   ├── 967-numbers-with-same-consecutive-differences.java
│   ├── NOTES.md
│   └── README.md
├── 968-binary-tree-cameras/
│   ├── 968-binary-tree-cameras.java
│   ├── NOTES.md
│   └── README.md
├── 97-interleaving-string/
│   ├── 97-interleaving-string.java
│   ├── NOTES.md
│   └── README.md
├── 98-validate-binary-search-tree/
│   ├── 98-validate-binary-search-tree.java
│   ├── NOTES.md
│   └── README.md
├── 981-time-based-key-value-store/
│   ├── 981-time-based-key-value-store.java
│   ├── NOTES.md
│   └── README.md
├── 985 Sum of Even Numbers After Queries lc med.cpp
├── 985-sum-of-even-numbers-after-queries/
│   ├── 985-sum-of-even-numbers-after-queries.java
│   ├── NOTES.md
│   └── README.md
├── 987-vertical-order-traversal-of-a-binary-tree/
│   ├── 987-vertical-order-traversal-of-a-binary-tree.java
│   ├── NOTES.md
│   └── README.md
├── 99-recover-binary-search-tree/
│   ├── 99-recover-binary-search-tree.java
│   └── README.md
├── 990-satisfiability-of-equality-equations/
│   ├── 990-satisfiability-of-equality-equations.java
│   ├── NOTES.md
│   └── README.md
├── 991-broken-calculator/
│   ├── 991-broken-calculator.java
│   ├── NOTES.md
│   └── README.md
├── Add 1 to linked list.java
├── Add Binary Strings.java
├── Add Digits.java
├── Add One To Array.java
├── Add Two Numbers.java
├── Add all greater values to every node in a BST.java
├── Add binary.java
├── Adding Array Elements.java
├── Adventure in a Maze - GFG/
│   ├── README.md
│   └── adventure-in-a-maze.java
├── Alien Dictionary - GFG/
│   └── Alien Dictionary.cpp
├── All Elements in Two Binary Search Trees.java
├── All Factors.py
├── All Possible Combinations.java
├── All Unique Permutations.java
├── Allocate minimum number of pages.cpp
├── Alternate positive and negative numbers.cpp
├── Alternate positive and negative numbers.java
├── Anagram of String.java
├── Anagrams.java
├── Anti Diagonals.py
├── Arithmetic Slices.java
├── Array 3 Pointers.java
├── Array Partition - GFG/
│   ├── README.md
│   └── array-partition.java
├── Array Sum.java
├── Array to BST - GFG/
│   ├── README.md
│   └── array-to-bst.java
├── Assign Mice to Holes.java
├── Assignment Problem - GFG/
│   ├── README.md
│   ├── assignment-problem.cpp
│   ├── assignment-problem.java
│   ├── assignment-problem.py
│   └── hungarian_java(not_accepted).java
├── Average of level in Binary tree.cpp
├── Average of levels in binary tree.java
├── BST To Max Heap.cpp
├── BST to greater sum tree - GFG/
│   ├── README.md
│   └── bst-to-greater-sum-tree.java
├── BST to max heap GFG/
│   └── BstToMaxHeap.cpp
├── BST to max heap gfg med.cpp
├── BST-to-max-Heap/
│   ├── BSTtoMaxHeap.java
│   ├── Solution.cpp
│   └── question.md
├── Bag Of Tokens.java
├── Balance Array.java
├── Balanced Binary Tree.java
├── Balanced Parantheses!.java
├── Ball Coloring.cpp
├── Ball coloring.cpp
├── Ball coloring.java
├── Ball coloring.py
├── Ball-Coloring/
│   ├── ball_coloring.java
│   └── question.md
├── Best Time to Buy and Sell Stock IV.java
├── Best Time to Buy and Sell Stock.java
├── Biconnected Graph.java
├── Bike Racing - GFG/
│   ├── README.md
│   └── bike-racing.java
├── Binary Matrix with at most K 1s.java
├── Binary Tree Pruning lc.cpp
├── Binary Tree Pruning.java
├── Bipartite Graph - GFG/
│   ├── README.md
│   └── bipartite-graph.java
├── Bit Difference - GFG/
│   └── Bit Difference.cpp
├── Bitwise AND of the Array.java
├── Black Shapes.java
├── Book_Allcoation_Problem.cpp
├── Brackets in Matrix Chain Multiplication - GFG/
│   ├── README.md
│   ├── brackets-in-matrix-chain-multiplication.cpp
│   └── brackets-in-matrix-chain-multiplication.java
├── Brain Game - GFG/
│   ├── README.md
│   ├── brain-game.cpp
│   └── brain-game.java
├── Breadth first search.cpp
├── Broken blocks - GFG/
│   ├── README.md
│   └── broken-blocks.java
├── Burning Tree.cpp
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── Can Make Triangle.java
├── Can Place Flowers.java
├── Capacity To Ship Packages Within D Days.java
├── Capitalize the Title
├── Case-specific Sorting of Strings.java
├── Case-specific Sorting of Strings.py
├── Case-specific Sorting string.cpp
├── Ceil in BST.java
├── Champagne Tower.java
├── Change Bits - GFG/
│   ├── README.md
│   └── change-bits.java
├── Check Mirror in N-ary tree.java
├── Check Palindrome!.java
├── Check if Every Row and Column Contains All Numbers
├── Check if subtree
├── Cherry Pickup II (LC)
├── Chips Factory.java
├── Chocolate_Distribution_Problem_gfg.cpp
├── Choose and Swap - GFG/
│   ├── README.md
│   └── choose-and-swap.java
├── Climbing Stairs.java
├── Clone Graph.java
├── Clone a stack without using extra space
├── Closest Palindrome - GFG/
│   ├── README.md
│   └── closest-palindrome.java
├── Coin Piles - GFG/
│   ├── README.md
│   └── coin-piles.java
├── Coins of Geekland.java
├── Combination Sum II.java
├── Combination Sum.java
├── Combinations.java
├── Compare Version Numbers.java
├── Complete Binary Tree.java
├── Composite And Prime.java
├── Composite and Prime gfg med s18.cpp
├── Composite and Prime.cpp
├── Composite and Prime.java
├── Composite and Prime.py
├── Composite-and-prime.cpp
├── Compute Before Matrix.java
├── Concatenate two numbers.java
├── Connect Ropes.java
├── Consecutive Parent - Child.java
├── Construct BST from Preorder.java
├── Construct Binary Tree From Inorder And Preorder.java
├── Construct String With Repeat Limit.java
├── Construct String from Binary Tree lc easy.cpp
├── Construct String from Binary Tree.java
├── Container With Most Water.java
├── Contiguous Binary Array.java
├── Convert Sorted List to Binary Search Tree.java
├── Convert the amount in number to words.java
├── Convert to Palindrome.java
├── Copy List with Random Pointer.java
├── Corona Vaccine.java
├── Count All Valid Pickup and Delivery Options.java
├── Count And Say.java
├── Count BST nodes that lie in a given range - GFG/
│   ├── README.md
│   └── count-bst-nodes-that-lie-in-a-given-range.java
├── Count Common Words With One Occurrence
├── Count Integers With Even Digit Sum.py
├── Count Operations to Obtain Zero.java
├── Count Palindromic  Subsequence.cpp
├── Count Palindromic Subsequences.java
├── Count Smaller elements.java
├── Count Words Obtained After Adding a Letter
├── Count digit groupings of a number - GFG/
│   ├── README.md
│   └── count-digit-groupings-of-a-number.java
├── Count occurrences of a given word in a 2-d array(dynamic programming).cpp
├── Count occurrences of a given word in a 2-d array.cpp
├── Count occurrences of a given word in a 2-d array.java
├── Count occurrences of a given word in a 2-d array.py
├── Count pairs in array divisible by K - GFG/
│   ├── README.md
│   └── count-pairs-in-array-divisible-by-k.java
├── Count possible ways to construct buildings - GFG/
│   ├── README.md
│   └── count-possible-ways-to-construct-buildings.java
├── Count subsequences of type a^i, b^j, c^k - GFG/
│   ├── README.md
│   └── count-subsequences-of-type-ai-bj-ck.java
├── Count the paths - GFG/
│   ├── README.md
│   └── count-the-paths.java
├── Count-occurrences-of-a-given-string-in-2d-array.cpp
├── Count_occurences_of_a_given_word_in_a_2-d_array/
│   ├── Solution.java
│   └── question.md
├── Counting Bits.java
├── Counts Zeros Xor Pairs - GFG/
│   ├── README.md
│   └── counts-zeros-xor-pairs.java
├── Course Schedule - GFG/
│   ├── README.md
│   └── course-schedule.java
├── Cousins of a given node.java
├── Covered-Uncovered Nodes.java
├── Create number of weak characters in game.java
├── Delete and Earn.java
├── Delete nodes greater than k.java
├── Deserialize.java
├── Design Add and Search Words Data Structure.java
├── Design Bitset.java
├── Design Browser History/
│   └── Design-Browser-History.cpp
├── Diagonal Traversal of Binary Tree - GFG/
│   ├── README.md
│   └── diagonal-traversal-of-binary-tree.java
├── Different Bits Sum Pairwise.java
├── Diffk II.java
├── Diffk.java
├── Digital Root.java
├── Dijkstra’s_Algorithm_Shortest_distance.cpp
├── Distance from the Source (Bellman-Ford Algorithm).java
├── Distinct Numbers in Window.java
├── Distinct Subsequences.java
├── Distinct palindromic substrings.java
├── Distribute in Circle!.java
├── Divisible by 60.java
├── Dungeon Princess.java
├── Earthquake and the Paint Shop - GFG/
│   ├── README.md
│   └── earthquake-and-the-paint-shop.java
├── Egg Dropping Puzzle.java
├── Elements in the Range.java
├── Equivalent Sub-Arrays - GFG/
│   ├── README.md
│   └── equivalent-sub-arrays.java
├── Escape the Forbidden Forest.java
├── Eulerian Path in an Undirected Graph - GFG/
│   ├── README.md
│   └── eulerian-path-in-an-undirected-graph.java
├── Evaluate Expression To True.java
├── Evaluate Expression(Postfix).java
├── Even and Odd - GFG/
│   ├── README.md
│   └── even-and-odd.java
├── Exactly one swap.java
├── Excel Column Title.java
├── Excel Sheet Column Number.java
├── Exceptionally odd.java
├── Fact Digit Sum/
│   └── Fact-Digit-Sum.cpp
├── Fact Digit Sum.cpp
├── Fact Digit Sum.java
├── Farthest number - GFG/
│   ├── README.md
│   └── farthest-number.java
├── File Search.java
├── Fill the Tank - GFG/
│   ├── README.md
│   └── fill-the-tank.java
├── Filling Bucket - GFG/
│   ├── README.md
│   └── filling-bucket.java
├── Find All Anagrams in a String.java
├── Find Last Digit.java
├── Find Missing And Repeating.java
├── Find Original Array From Doubled Array.java
├── Find Prime numbers in a range.java
├── Find Second Smallest and Second Largest Element in an array without sorting/
│   └── Find-Second-Smallest-and-Second-Largest-Element-in-an-array-with-out-sorting.cpp
├── Find Three Consecutive Integers That Sum to a Given Number.py
├── Find Transition Point - GFG/
│   ├── README.md
│   └── find-transition-point.java
├── Find a peak element.java
├── Find all distinct subset (or subsequence) sums - GFG/
│   └── Find all distinct subset (or subsequence) sums.cpp
├── Find all distinct subset (or subsequence) sums.java
├── Find all possible paths from top to bottom - GFG/
│   ├── README.md
│   └── find-all-possible-paths-from-top-to-bottom.java
├── Find an Replace in String - GFG/
│   ├── README.md
│   └── find-an-replace-in-string.java
├── Find length of Loop - GFG/
│   ├── README.md
│   └── find-length-of-loop.java
├── Find pairs with given sum in doubly linked list.cpp
├── Find pairs with given sum in doubly linked list.java
├── Find rectangle with corners as 1.java
├── Find the Difference.java
├── Find the Maximum Flow - GFG/
│   ├── README.md
│   └── find-the-maximum-flow.java
├── Find the nearest smaller number in left.cpp
├── Find the number of islands.java
├── Find whether path exist - GFG/
│   ├── README.md
│   └── find-whether-path-exist.java
├── Find-Pattern/
│   ├── find_patter.java
│   └── question.md
├── Finding Profession - GFG/
│   ├── README.md
│   └── finding-profession.java
├── Firing employees.java
├── First Missing Integer.java
├── First Repeating element.java
├── Flip.java
├── Foldable Binary Tree.cpp
├── Foldable Binary Tree.java
├── Form a palindrome - GFG/
│   ├── README.md
│   └── form-a-palindrome.java
├── Form coils in a matrix - GFG/
│   ├── README.md
│   └── form-coils-in-a-matrix.java
├── Fraction Trouble - GFG/
│   ├── README.md
│   └── fraction-trouble.java
├── Fraction.java
├── Friends Pairing Problem DP.java
├── Friends Pairing Problem.cpp
├── Friends Pairing Problem.java
├── GFG/
│   ├── 0 -1 Knapsack Problem/
│   │   └── 0 - 1 Knapsack Problem.java
│   ├── 2D Hopscotch/
│   │   └── 2D Hopscotch.java
│   ├── 3 Divisors/
│   │   └── 3 Divisors.java
│   ├── A Game of LCM/
│   │   └── A Game of LCM.java
│   ├── A difference of values and indexes/
│   │   └── A difference of values and indexes.java
│   ├── Absolute List Sorting/
│   │   └── Absolute List Sorting.java
│   ├── Absolute difference divisible by K/
│   │   └── Absolute difference divisible by K.java
│   ├── Add Binary Strings/
│   │   └── Add Binary Strings.java
│   ├── Aggressive Cows/
│   │   └── Aggressive Cows.java
│   ├── Akku and Binary Numbers/
│   │   └── Akku and Binary Numbers.java
│   ├── Alex Travelling/
│   │   ├── Alex Travelling.cpp
│   │   └── Alex Travelling.java
│   ├── Alternate Vowel and Consonant String/
│   │   ├── Alternate Vowel and Consonant String.java
│   │   └── ReadMe.md
│   ├── Array Pair Sum Divisibility Problem/
│   │   └── Array Pair Sum Divisibility Problem.java
│   ├── Array Removals/
│   │   ├── Array Removals.cpp
│   │   └── Array Removals.java
│   ├── Articulation Point - I/
│   │   └── Articulation Point - I.java
│   ├── Asteroid Collision/
│   │   ├── Asteroid Collision.cpp
│   │   └── Asteroid Collision.java
│   ├── Balanced string/
│   │   └── Balanced string.java
│   ├── Base Equivalance/
│   │   └── Base Equivalence.java
│   ├── Base Equivalence/
│   │   └── Base Equivalence.java
│   ├── Binary Tree to DLL/
│   │   ├── Binary Tree to DLL.cpp
│   │   └── Binary Tree to DLL.java
│   ├── Black and White/
│   │   └── Black and White.java
│   ├── Break a number/
│   │   └── Break a number.java
│   ├── Build the smallest/
│   │   └── Build the smallest.java
│   ├── Burst Balloons/
│   │   └── Burst Balloons.java
│   ├── Check for BST/
│   │   └── Check for BST.java
│   ├── Check if all levels of two trees are anagrams or not/
│   │   └── Check if all levels of two trees are anagrams or not.java
│   ├── Check if it is possible to convert one string into another with given constraints/
│   │   └── Check if it is possible to convert one string into another with given constraints.java
│   ├── Chicks in a Zoo/
│   │   ├── Chicks in a Zoo.cpp
│   │   └── Chicks in a Zoo.java
│   ├── Complement/
│   │   └── Complement.java
│   ├── Construct Binary Tree from String with bracket representation/
│   │   ├── Construct Binary Tree from String with bracket representation.cpp
│   │   └── Construct Binary Tree from String with bracket representation.java
│   ├── Container With Most Water/
│   │   ├── Container With Most Water.cpp
│   │   └── Container With Most Water.java
│   ├── Count Lucky Permutations/
│   │   └── Count Lucky Permutations.java
│   ├── Count all possible paths from top left to bottom right/
│   │   ├── Count all possible paths from top left to bottom right oc4.cpp
│   │   ├── Count all possible paths from top left to bottom right.cpp
│   │   └── README.md
│   ├── Count even length/
│   │   └── Count even length.java
│   ├── Count of Subarrays/
│   │   ├── Count of Subarrays.cpp
│   │   ├── Count of Subarrays.java
│   │   └── README.md
│   ├── Count the Substring/
│   │   ├── Count the Substring.cpp
│   │   └── Count the Substring.java
│   ├── Counting Elements in Two Arrays/
│   │   ├── Counting Elements in Two Arrays.cpp
│   │   ├── Counting Elements in Two Arrays.java
│   │   └── Counting Elements in Two Arrays.py
│   ├── Cycle in Directed Graph/
│   │   └── Cycle in Directed Graph.java
│   ├── Cycle in Undirected Graph/
│   │   └── Cycle in Undirected Graph.java
│   ├── Decode the string/
│   │   ├── Decode the string.cpp
│   │   ├── Decode the string.java
│   │   └── README.md
│   ├── Distance of nearest cell having 1/
│   │   └── Distance of nearest cell having 1.java
│   ├── Earthquake and the Paint Shop/
│   │   ├── Earthquake and the Paint Shop.cpp
│   │   └── README.md
│   ├── Enemy/
│   │   ├── Enemy.cpp
│   │   └── Enemy.java
│   ├── Fill up buckets/
│   │   ├── Fill up buckets.cpp
│   │   └── Fill up buckets.java
│   ├── Filling Bucket/
│   │   ├── Filling Bucket.cpp
│   │   ├── Filling Bucket.java
│   │   └── README.md
│   ├── Find The Safe Position/
│   │   ├── Find The Safe Position s30.cpp
│   │   └── Find the Safe Position.java
│   ├── Find minimum number of Laptops required/
│   │   ├── Find minimum number of Laptops required.cpp
│   │   └── Find minimum number of Laptops required.java
│   ├── Find patterns/
│   │   ├── Find patterns.cpp
│   │   ├── Find patterns.java
│   │   └── README.md
│   ├── Find the N-th character/
│   │   └── Find the N-th character.cpp
│   ├── Find the first node of loop in linked list/
│   │   └── Find the first node of loop in linked list.java
│   ├── Find the longest string/
│   │   └── Find the longest string.java
│   ├── Find the maximum GCD of the siblings of a Binary Tree/
│   │   └── Find the maximum GCD of the siblings of a Binary Tree.java
│   ├── Fitting The Array/
│   │   ├── Fitting The Array s28.cpp
│   │   ├── Fitting The Array.cpp
│   │   └── Fitting The Array.java
│   ├── Flatten binary tree to linked list/
│   │   ├── Flatten binary tree to linked list.java
│   │   └── Readme.md
│   ├── Flattening a Linked List/
│   │   └── Flattening a Linked List.java
│   ├── Floyd Warshall/
│   │   ├── Floyd Warshall.java
│   │   ├── FloydWarshall.cpp
│   │   └── README.md
│   ├── Form a palindrome/
│   │   └── Form a palindrome.py
│   ├── GCD Array/
│   │   └── GCD Array.java
│   ├── Geek and Number String/
│   │   └── Geek and Number Str.cpp
│   ├── Geek and Strings/
│   │   ├── Geek and Strings.java
│   │   └── ReadMe.md
│   ├── Geek in a Maze/
│   │   ├── Geek in a maze.java
│   │   └── README.md
│   ├── Grouping Of Numbers/
│   │   └── Grouping Of Numbers.java
│   ├── Hamiltonian Path/
│   │   ├── Hamiltonian Path.cpp
│   │   ├── Hamiltonian Path.java
│   │   └── README.md
│   ├── Help Ishaan/
│   │   ├── Help Ishaan.cpp
│   │   ├── Help Ishaan.java
│   │   └── README.md
│   ├── Help a Thief/
│   │   ├── Help a thief.cpp
│   │   └── README.md
│   ├── Help the Old Man/
│   │   ├── Help the old man.java
│   │   └── README.md
│   ├── Hungry Pizza Lovers/
│   │   ├── Hungry pizza lovers.java
│   │   └── README.md
│   ├── IPL/
│   │   └── IPL.cpp
│   ├── IPL 2021 - Match Day 2/
│   │   └── IPL 2021 - Match Day 2 gfg med s22.cpp
│   ├── Ishaan Loves Chocolates/
│   │   ├── Ishaan loves chocolates.py
│   │   └── README.md
│   ├── Josephus problem/
│   │   └── Josephus problem.java
│   ├── Jump Game/
│   │   ├── Jump game.java
│   │   └── README.md
│   ├── Jumping Numbers/
│   │   ├── Jumping Numbers.cpp
│   │   └── README.md
│   ├── K-Ary Tree/
│   │   └── README.md
│   ├── Knight Walk/
│   │   ├── Knight Walk.cpp
│   │   └── Knight Walk.java
│   ├── Kth smallest element/
│   │   └── Kth smallest element.py
│   ├── LCM Triplet/
│   │   └── LCM Triplet.java
│   ├── Largest subtree sum in a tree/
│   │   ├── Largest subtree sum in a tree.cpp
│   │   └── Largest subtree sum in a tree.java
│   ├── Last modified ball/
│   │   └── Last modified ball.java
│   ├── Longest Bitonic subsequence/
│   │   └── Longest Bitonic subsequence.java
│   ├── Longest Perfect Piece/
│   │   └── Longest Perfect Piece.java
│   ├── Magic Triplets/
│   │   └── Magic Triplets.java
│   ├── Majority Element/
│   │   ├── Majority Element.java
│   │   ├── Majority Element.py
│   │   └── README.md
│   ├── Make array elements unique/
│   │   └── Make array elements unique.java
│   ├── Max Min/
│   │   ├── Max Min.cpp
│   │   ├── Max Min.java
│   │   ├── Max Min.py
│   │   └── README.md
│   ├── Maximize the sum of selected numbers from an array to make it empty/
│   │   ├── Maximize the sum of selected numbers from a sorted array to make it empty.cpp
│   │   ├── Maximize the sum of selected numbers from an array to make it empty.java
│   │   └── README.md
│   ├── Maximum Number of Toys/
│   │   └── Maximum Number of Toys.java
│   ├── Maximum Profit By Choosing A Subset Of Intervals/
│   │   └── Maximum Profit By Choosing A Subset Of Intervals.java
│   ├── Maximum Sub Array/
│   │   └── Maximum Sub Array.java
│   ├── Maximum Sub-String after at most K changes/
│   │   ├── Maximum Sub-String after at most K changes.cpp
│   │   ├── Maximum Sub-String after at most K changes.java
│   │   └── README.md
│   ├── Maximum Sum LCM/
│   │   └── Maximum Sum LCM.java
│   ├── Maximum Value/
│   │   └── Maximum Value.java
│   ├── Maximum of all subarrays of size k/
│   │   └── Maximum of all subarrays of size k.java
│   ├── Median in a row-wise sorted Matrix/
│   │   └── Median in a row-wise sorted Matrix.java
│   ├── Merge Sort/
│   │   └── Merge Sort.java
│   ├── Merge two BST 's/
│   │   └── Merge two BST.cpp
│   ├── Min operations/
│   │   └── Min operations.java
│   ├── Minimize number of Students to be removed/
│   │   └── Minimize number of Students to be removed.java
│   ├── Minimize the sum/
│   │   └── Minimize the sum.java
│   ├── Minimum Cost of ropes/
│   │   └── Minimum Cost of ropes.java
│   ├── Minimum Costs of Ropes/
│   │   └── Minimum Costs of Ropes.cpp
│   ├── Minimum characters to be added at front to make string palindrome/
│   │   ├── Minimum characters to be added at front to make string palindrome oc2.cpp
│   │   ├── Minimum characters to be added at front to make string palindrome.cpp
│   │   ├── Minimum characters to be added at front to make string palindrome.java
│   │   ├── Minimum characters to be added at front to make string palindrome.py
│   │   └── README.md
│   ├── Minimum number of Coins/
│   │   ├── Minimum number of Coins.cpp
│   │   └── Minimum number of Coins.java
│   ├── Minimum sum partition/
│   │   ├── Minimum sum partition.cpp
│   │   ├── Minimum sum partition.java
│   │   └── README.md
│   ├── Missing number in matrix.java/
│   │   └── Missing number in matrix.java
│   ├── Modified Numbers and Queries/
│   │   ├── Modified Numbers And Queries.java
│   │   ├── Modified Numbers and Queries oc3.cpp
│   │   ├── Modified Numbers and Queries.py
│   │   └── README.md
│   ├── Move Last Element to Front of a Linked List/
│   │   ├── Move Last Element to Front of a Linked List 2 different approaches.java
│   │   ├── Move Last Element to Front of a Linked List.cpp
│   │   ├── Move Last Element to Front of a Linked List.java
│   │   └── README.md
│   ├── Next Greater Element/
│   │   └── Next Greater Element.java
│   ├── Next Happy Number/
│   │   └── Next Happy Number.java
│   ├── Nine Divisors/
│   │   ├── Nine Divisors.cpp
│   │   └── Nine Divisors.java
│   ├── Number Formation/
│   │   ├── Number Formation.cpp
│   │   ├── Number Formation.java
│   │   └── README.md
│   ├── Number Of Islands/
│   │   ├── Number Of Islands.cpp
│   │   ├── Number Of Islands.java
│   │   └── README.md
│   ├── Number Of Open Doors/
│   │   └── Number Of Open Doors.java
│   ├── Number of Distinct Islands/
│   │   ├── Number of Distinct Islands oct1.cpp
│   │   └── Number of Distinct Islands.py
│   ├── Number of turns in binary tree/
│   │   ├── Number of turns in binary tree.cpp
│   │   └── Number of turns in binary tree.java
│   ├── Phone directory/
│   │   ├── Phone directory.cpp
│   │   └── Phone directory.java
│   ├── Primes sum/
│   │   ├── Primes sum.cpp
│   │   ├── Primes sum.java
│   │   └── README.md
│   ├── Print Diagonally/
│   │   ├── Print Diagonally.cpp
│   │   ├── Print Diagonally.java
│   │   └── README.md
│   ├── Print leaf nodes from preorder traversal of BST/
│   │   ├── Print leaf nodes from preorder traversal of BST.cpp
│   │   ├── Print leaf nodes from preorder traversal of BST.java
│   │   └── README.md
│   ├── Queries on a matrix/
│   │   └── Queries on a matrix hard s25 gfg.cpp
│   ├── Rearrange Array Alternately/
│   │   └── Rearrange Array Alternately.java
│   ├── Reorder List/
│   │   └── Reorder List.java
│   ├── Replace O's with X's/
│   │   └── Replace O's with X's.cpp
│   ├── Replace every element with the least greater element on its right/
│   │   ├── README.md
│   │   ├── Replace every element with the least greater element on its right.cpp
│   │   └── Replace every element with the least greater element on its right.java
│   ├── Reverse Spiral Form of Matrix/
│   │   ├── Reverse Spiral Form of Matrix.cpp
│   │   └── Reverse Spiral Form of Matrix.java
│   ├── Satisfy the equation/
│   │   └── Satisfy the equation.java
│   ├── Save Your Life/
│   │   ├── README.md
│   │   ├── Save Your Life.cpp
│   │   └── Save Your Life.java
│   ├── Search Pattern (KMP-Algorithm)/
│   │   └── Search Pattern (KMP-Algorithm).java
│   ├── Search Pattern (Rabin-Karp Algorithm)/
│   │   └── Search Pattern (Rabin-Karp Algorithm).java
│   ├── Sequence Fun/
│   │   └── Sequence Fun.java
│   ├── Shortest Distance in a Binary Maze/
│   │   ├── README.md
│   │   ├── Shortest Distance in a Binary Maze.cpp
│   │   └── Shortest Distance in a Binary Maze.java
│   ├── Shortest Path by Removing K walls/
│   │   └── Shortest Path by Removing K walls.java
│   ├── Shortest Prime Path/
│   │   └── Shortest Prime Path.java
│   ├── Shreyansh and his bits/
│   │   └── Shreyansh and his bits.java
│   ├── Single valued subtree/
│   │   └── Single valued subtree.java
│   ├── Sort an array of 0s, 1s and 2s/
│   │   ├── Sort an array of 0s, 1s and 2s.java
│   │   └── Sort an array of 0s,1s and 2s s29.cpp
│   ├── Spiral Matrix/
│   │   └── Spiral Matrix.cpp
│   ├── Split Array Largest Sum/
│   │   └── Split Array Largest Sum.java
│   ├── Stepping Numbers/
│   │   ├── README.md
│   │   ├── Stepping Numbers.cpp
│   │   └── Stepping Numbers.java
│   ├── Substrings of length k with k-1 distinct elements/
│   │   ├── README.md
│   │   ├── Substrings of length k with k-1 distinct elements.cpp
│   │   └── Substrings of length k with k-1 distinct elements.java
│   ├── Sum of Beauty of All Substrings/
│   │   └── Sum of Beauty of All Substrings.java
│   ├── The Smurfs/
│   │   ├── The Smurfs.cpp
│   │   └── The Smurfs.java
│   ├── Tom and jerry/
│   │   ├── Tom and Jerry easy s26.cpp
│   │   ├── Tom and Jerry.java
│   │   └── Tom and Jerry.py
│   ├── Transform to Sum Tree/
│   │   └── Transform to Sum Tree.java
│   ├── Two numbers with odd occurrences/
│   │   ├── README.md
│   │   ├── Two numbers with odd occurrences.cpp
│   │   └── Two numbers with odd occurrences.java
│   ├── Unique partitions/
│   │   └── Unique partitions.java
│   ├── Wine Buying and Selling/
│   │   └── Wine Buying and Selling.java
│   ├── Zero Sum Subarrays/
│   │   └── Zero Sum Subarrays.java
│   └── k-th smallest element in BST/
│       └── k-th smallest element in BST.java
├── GFG_Find_all_distinct_subset_(or subsequence
├── Game with nos
├── Game with nos.java
├── Gas Station.java
├── Geek and Number String s23 med.cpp
├── Geek and Number String.cpp
├── Geek and Number String.java
├── Geek and knots.java
├── Generate IP Addresses.cpp
├── Generate IP Addresses.java
├── Generate IP Addresses.py
├── Generate all Parentheses II.java
├── Get min at pop.java
├── Greater of Lesser.java
├── Greater than All.java
├── Hamiltonian Path - GFG/
│   ├── README.md
│   └── hamiltonian-path.java
├── Height Using Parent Array.java
├── Highest Product.java
├── Highest Score.java
├── Hit most Balloons.java
├── INVERSIONS.java
├── IPL 2021 - Match Day 2 by AMAN SAINI
├── IPL 2021 - Match Day 2.cpp
├── IPL 2021 - Match Day 2.java
├── IPL 2021 - Match Day 2.py
├── Identical Binary Trees.java
├── Immediate Smaller Element.java
├── Immediate Smaller Element.js
├── Immediate Smaller Element.py
├── Implement Power Function(IB)
├── Implement StrStr.java
├── Implementing Dijkstra Algorithm.java
├── Inorder Traversal of Cartesian Tree.java
├── Inorder linear Traversal.java
├── Insert into a Binary Search Tree
├── Insertion Sort List.java
├── Insertion Sort for Singly Linked List.java
├── Integer To Roman.java
├── Integers in Strings.java
├── Intersection Of Sorted Arrays.java
├── Intersection of Linked Lists.java
├── Interviewbit/
│   ├── Colorful Number/
│   │   ├── Colorful Number.java
│   │   └── Colorful Number.py
│   ├── Copy List/
│   │   └── Copy List.java
│   └── Valid Sudoku/
│       ├── Valid Sudoku.cpp
│       └── Valid Sudoku.java
├── Invert the Binary Tree.java
├── Is Subsequence.java
├── IsRectangle.java
├── Jump Game Array.java
├── Jump Game IV
├── K Largest Elements.java
├── K-diff Pairs in an Array.java
├── Kill Captain America - GFG/
│   ├── README.md
│   └── kill-captain-america.java
├── Killing Spree - GFG/
│   ├── README.md
│   └── killing-spree.java
├── Koko Eating Bananas.java
├── Kth Permutation Sequence.java
├── Kth Row of Pascal's Triangle.java
├── Kth Smallest Absolute Difference.java
├── Kth Smallest Element In Tree.java
├── Kth smallest element.cpp
├── LC 1000. Minimum Cost to Merge Stones.cpp
├── LCP - GFG/
│   ├── README.md
│   └── lcp.java
├── LICENSE
├── Largest BST - GFG/
│   ├── README.md
│   └── largest-bst.java
├── Largest Number.java
├── Largest Permutation.java
├── Largest Rectangle in Histogram.java
├── Largest number with given sum - GFG/
│   ├── README.md
│   └── largest-number-with-given-sum.java
├── Largest prime factor.cpp
├── Largest value in each level.java
├── Last Node in a Complete Binary Tree.java
├── Last digit K count.java
├── Leaders in an array.java
├── Leaves to DLL.java
├── Leetcode/
│   ├── 104 maximum depth of binary tree/
│   │   ├── 104 maximum depth of binary tree.cpp
│   │   ├── 104. Maximum Depth of Binary Tree.java
│   │   └── README.md
│   ├── 112 Path Sum/
│   │   ├── 112 Path Sum oc4.cpp
│   │   └── Path Sum.java
│   ├── 1155. Number of Dice Rolls With Target Sum/
│   │   ├── 1155 Number of Dice Rolls With Target Sum.cpp
│   │   ├── 1155. Number of Dice Rolls With Target Sum.java
│   │   └── 1155. Number of Dice Rolls With Target Sum.py
│   ├── 1217. Minimum Cost to Move Chips to The Same Position/
│   │   ├── 1217. Minimum Cost to Move Chips to The Same Position.java
│   │   ├── Notes.md
│   │   └── README.md
│   ├── 1252. Cells with Odd Values in a Matrix/
│   │   ├── 1252. Cells with Odd Values in a Matrix.java
│   │   ├── Notes.md
│   │   └── README.md
│   ├── 1304.Find N Unique Integers Sum up to Zero/
│   │   ├── 1304.Find N Unique Integers Sum up to Zero.java
│   │   ├── Notes.md
│   │   └── README.md
│   ├── 15. 3Sum/
│   │   ├── 3sum.java
│   │   └── README.md
│   ├── 151.Reverse Words in a String/
│   │   └── Reverse Words in a String.java
│   ├── 1531. String Compression II/
│   │   └── 1531. String Compression II.cpp
│   ├── 1578 Minimum Time to Make Rope Colorful/
│   │   └── 1578 Minimum Time to Make Rope Colorful.cpp
│   ├── 1578. Minimum Time to Make Rope Colorful/
│   │   └── 1578. Minimum Time to Make Rope Colorful.py
│   ├── 1662. Check If Two String Arrays are Equivalent/
│   │   └── Check If Two String Arrays are Equivalent.java
│   ├── 19 Remove Nth Node From End of List/
│   │   ├── 19 Remove Nth Node From End of List.cpp
│   │   └── Remove Nth Node from End Of List.java
│   ├── 1996. The Number of Weak Characters in the Game/
│   │   └── The Number of Weak Characters in the Game.cpp
│   ├── 2095. Delete the Middle Node of a Linked List/
│   │   ├── 2095 Delete the Middle Node of a Linked List.java
│   │   └── README.md
│   ├── 2124. Check if All A's Appears Before All B's/
│   │   └── 2124. Check if All A's Appears Before All B's.java
│   ├── 218 The Skyline Problem/
│   │   └── 218 The Skyline Problem s30.cpp
│   ├── 221. Maximal Square/
│   │   └── 221. Maximal Square.java
│   ├── 222. Count Complete Tree Nodes/
│   │   └── Count Complete Tree Nodes.java
│   ├── 2368. Reachable Nodes With Restrictions/
│   │   └── Reachable Nodes With Restrictions.cpp
│   ├── 237. Delete Node in a Linked List/
│   │   ├── Delete Node in a Linked List.cpp
│   │   └── Delete Node in a Linked List.java
│   ├── 2424. Longest Uploaded Prefix/
│   │   └── 2424. Longest Uploaded Prefix.java
│   ├── 2427. Number of Common Factors/
│   │   └── 2427. Number of Common Factors.cpp
│   ├── 2428. Maximum Sum of an Hour Glass/
│   │   └── 2428. Maximum Sum of an Hour Glass.cpp
│   ├── 263. Ugly Number/
│   │   └── 263. Ugly Number.cpp
│   ├── 279. Perfect Squares/
│   │   └── 279. Perfect Squares.cpp
│   ├── 336. Palindrome Pairs/
│   │   ├── 336. Palindrome Pairs.java
│   │   └── 336. Palindrome pairs.cpp
│   ├── 4. Median of Two Sorted Arrays/
│   │   ├── 4. Median of Two Sorted Arrays.java
│   │   └── Median of Two Sorted Arrays.cpp
│   ├── 401 binary watch/
│   │   ├── 401-binary-watch.java
│   │   ├── NOTES.md
│   │   └── README.md
│   ├── 437 Path Sum III/
│   │   └── pathSum.cpp
│   ├── 450 Delete Node in a BST/
│   │   └── deleteNode.java
│   ├── 4Sum II/
│   │   └── 4Sum II.java
│   ├── 622 Design Circular Queue/
│   │   └── 622 Design Circular Queue med s25.cpp
│   ├── 623 Add One Row To Tree/
│   │   ├── Add one row to tree.java
│   │   └── ReadMe.md
│   ├── 623 Add One Row to Tree/
│   │   └── 623 Add One Row to Tree.java
│   ├── 658 Find K Closest Elements/
│   │   ├── 658 Find K Closest Elements s29.cpp
│   │   └── Find k Closest Elements.java
│   ├── 704 binary search/
│   │   ├── 704-Binary-Search.py
│   │   ├── NOTES.md
│   │   └── README.md
│   ├── 72 Edit distance/
│   │   ├── minDistance.cpp
│   │   └── minDistance.java
│   ├── 75.Sort colors/
│   │   ├── 75.Sort-colors.java
│   │   ├── Notes.md
│   │   ├── README.md
│   │   └── Sort colors.cpp
│   ├── 766.Toeplitz Matrix/
│   │   └── Toeplitz Matrix.java
│   ├── 79.Word Search/
│   │   ├── 79. Word Search.cpp
│   │   ├── NOTES.md
│   │   └── README.md
│   ├── 838 Push Dominoes/
│   │   └── 838 Push Dominoes lc med s27.cpp
│   ├── 91 Decode Ways/
│   │   └── 91 Decode Ways oc1.cpp
│   ├── 92 Reverse Linked List II/
│   │   ├── Reverse Linked List II.cpp
│   │   └── Reverse Linked List II.java
│   ├── 990 Satisfiability of Equality Equations/
│   │   └── 990 Satisfiability of Equality Equations med s26.cpp
│   ├── Break A Palindrome/
│   │   └── Break A Palindrome.java
│   ├── K diff pairs/
│   │   └── K diff pairs.cpp
│   ├── Merge Overlapping Intervals/
│   │   └── Merge Overlapping Intervals.cpp
│   ├── Minimum time to Make Rope Colorful/
│   │   └── Minimum Time to Make Rope Colorful.cpp
│   ├── Number of Dice rolls with target sum/
│   │   └── Number of dice rolls.cpp
│   ├── Remove Letter To Equalize Frequency/
│   │   └── Remove Letter To Equalize Frequency.cpp
│   ├── Sort Colors/
│   │   └── Sort Colors.cpp
│   ├── Top K Frequent Words/
│   │   └── Top K Frequent Words.cpp
│   └── Two Sum IV-Input is BST/
│       └── Two Sum IV-Input is a BST.java
├── Length of Last Word.java
├── Length of longest palindrome in Linked List.java
├── Length of longest palindrome in linked list.java
├── Letter Phone.java
├── Level Order.java
├── Levels Of Game.java
├── Licence Key Formatting.java
├── License Key Formatting GFG/
│   └── Licence.cpp
├── License Key Formatting med s21.cpp
├── License Key Formatting(explanation in comments).cpp
├── License Key Formatting.cpp
├── License Key Formatting.java
├── Linked List Cycle II.java
├── Linked List Cycle.java
├── Longest Bitonic subsequence.cpp
├── Longest Common Prefix.java
├── Longest Common Subsequence.java
├── Longest Palindrome by Concatenating Two Letter Words
├── Longest Palindromic Subsequence.java
├── Longest Palindromic Substring.java
├── Longest Path in a matrix - GFG/
│   ├── README.md
│   └── longest-path-in-a-matrix.java
├── Longest Possible Route in a Matrix with Hurdles - GFG/
│   ├── README.md
│   └── longest-possible-route-in-a-matrix-with-hurdles.java
├── Longest Sub-Array with Sum K.cpp
├── Longest Sub-Array with Sum K.java
├── Longest subarray with sum divisible by K - GFG/
│   ├── README.md
│   └── longest-subarray-with-sum-divisible-by-k.java
├── Longest substring to form a Palindrome - GFG/
│   ├── README.md
│   └── longest-substring-to-form-a-palindrome.java
├── Longest valid Parentheses.java
├── M-Coloring Problem.java
├── MInimum time to fulfil all orders.cpp
├── Magician and Chocolates.java
├── Magnet Array Problem - GFG/
│   ├── README.md
│   └── magnet-array-problem.java
├── Majority Element.java
├── Make equal elements Array.java
├── Matrix Chain Multiplication.cpp
├── Matrix Exponentiation - GFG/
│   ├── README.md
│   └── matrix-exponentiation.java
├── Matrix Operations.java
├── Matrix Search.java
├── Max Depth of Binary Tree.java
├── Max Distance.java
├── Max Non Negative SubArray.java
├── Max Product Subarray.java
├── Max Rectangle in Binary Matrix.java
├── Max Sum Path in Binary Tree.java
├── Max length chain.cpp
├── Max length chain.java
├── Maximize Distance to Closest Person
├── Maximize The Array - GFG/
│   ├── README.md
│   └── maximize-the-array.java
├── Maximize the sum of selected numbers from an array to make it empty - GFG/
│   ├── README.md
│   └── maximize-the-sum-of-selected-numbers-from-an-array-to-make-it-empty.java
├── Maximum Depth of Binary Tree.java
├── Maximum GCD of siblings of a binary tree - GFG/
│   ├── README.md
│   └── maximum-gcd-of-siblings-of-a-binary-tree.java
├── Maximum Number of Words Found in Sentences.java
├── Maximum Path Sum between 2 Leaf Nodes.cpp
├── Maximum Path in Triangle.java
├── Maximum Product of Increasing Subsequence of Size 3 - GFG/
│   ├── README.md
│   └── maximum-product-of-increasing-subsequence-of-size-3.java
├── Maximum Split of Positive Even Integers.py
├── Maximum Twin Sum of a Linked List.java
├── Maximum Width of Binary Tree.java
├── Maximum Winning score.java
├── Maximum XOR of Two Numbers in an Array.java
├── Maximum average subarray - GFG/
│   ├── README.md
│   └── maximum-average-subarray.java
├── Maximum level sum.java
├── Maximum number of 2X2 squares.cpp
├── Maximum number of 2X2 squares.java
├── Maximum number of events that can be attended.java
├── Maximum selections - GFG/
│   ├── README.md
│   └── maximum-selections.java
├── Maximum sum Rectangle - GFG/
│   ├── README.md
│   └── maximum-sum-rectangle.java
├── Maximum sum leaf to root path.java
├── Maximum sum of Non-adjacent nodes.java
├── Maximum sum of increasing order elements from n arrays.java
├── Maximum twin sum of a linkedlist.cpp
├── Maximum-number-of-2X2-squares.cpp
├── Merge Intervals
├── Merge K sorted linked lists.java
├── Merge Nodes in Between Zeros.java
├── Merge Overlapping Intervals.java
├── Merge Two Sorted Array.py
├── Merge Two Sorted Lists
├── Merge Two Sorted Lists.java
├── Merge Without Extra Space.cpp
├── Merge k Sorted Lists.java
├── Merge new Interval.java
├── Merge two Binary Tree.java
├── Merge two binary Max heaps
├── Merge two sorted linked lists - GFG/
│   ├── README.md
│   └── merge-two-sorted-linked-lists.java
├── Merging Details - GFG/
│   └── Merging Details.cpp
├── Merging Details _GFG.cpp
├── Merging Details.java
├── Min Coin - GFG/
│   ├── README.md
│   └── min-coin.java
├── Min Depth of Binary Tree.java
├── Min Jumps Array.java
├── Min Stack.java
├── Min Steps in Infinite Grid.java
├── Min Sum Path in Matrix.java
├── Min Sum Path in Triangle.java
├── Min sum formed by digits - GFG/
│   ├── README.md
│   └── min-sum-formed-by-digits.java
├── Minimize Deviation in Array.java
├── Minimum Add to Make Parentheses Valid/
│   └── Minimum-Add-to-Make-Parentheses-Valid.cpp
├── Minimum Cost to Set Cooking Time.java
├── Minimum Cost to cut a board into squares.cpp
├── Minimum Cost to cut a board into squares.java
├── Minimum Cost to cut a board into squares.py
├── Minimum Exchange GFG/
│   └── MinimumExchange.cpp
├── Minimum Exchange gfg easy sep12.cpp
├── Minimum Exchange.java
├── Minimum Lights to Activate.java
├── Minimum Number in a sorted rotated array - GFG/
│   ├── README.md
│   ├── minimum-number-in-a-sorted-rotated-array.java
│   └── minimum-number-in-a-sorted-rotated-array.py
├── Minimum Number of Arrows to Burst Balloons(Non Overlapping intervals)
├── Minimum Number of Vertices to Reach All Nodes.java
├── Minimum Operations to Make the Array Alternating.java
├── Minimum Parantheses!.java
├── Minimum Platforms.java
├── Minimum Remove to Make Valid Parentheses/
│   └── Minimum-Remove-to-Make-Valid-Parentheses.cpp
├── Minimum Remove to Make Valid Parentheses.java
├── Minimum Sum of Absolute Differences of Pairs gfg easy.cpp
├── Minimum Sum of Absolute Differences of Pairs.java
├── Minimum Sum of Absolute Differences of Pairs.py
├── Minimum Sum of Four Digit Number After Splitting Digits.java
├── Minimum Swaps GFG (easy solution with comments).cpp
├── Minimum Swaps to Group All 1's Together II.cpp
├── Minimum Swaps to Sort.java
├── Minimum Swaps.java
├── Minimum Time To Fulfill All Orders Using BinarySearch And ApSeries Formula.java
├── Minimum Time to Remove All Cars Containing Illegal Goods.java
├── Minimum X (xor) A - GFG/
│   ├── README.md
│   └── minimum-x-xor-a.java
├── Minimum increment/
│   └── decrement to make array non-Increasing - GFG/
│       ├── README.md
│       └── minimum-incrementdecrement-to-make-array-non-increasing.java
├── Minimum sum of absolute difference of pairs.cpp
├── Minimum time to fulfil all orders
├── Minimum time to fulfil all orders gfg hard.cpp
├── Minimum time to fulfil all orders.java
├── Minimum time to fulfill  all orders.java
├── Minimum times A has to be repeated such that B is a substring of it - GFG/
│   ├── README.md
│   └── minimum-times-a-has-to-be-repeated-such-that-b-is-a-substring-of-it.py
├── Minimum-Exchange/
│   ├── Solution.java
│   └── question.md
├── Minimum-swaps.cpp
├── Minimum_Cost_to_cut_a_board_into_squares_gfg_greedy.cpp
├── Mirror Reflection.java LeetCode
├── Move Last Element to Front of a Linked List - GFG/
│   ├── README.md
│   └── move-last-element-to-front-of-a-linked-list.java
├── Move Zeroes.java
├── Move all zeroes to end of the array.java
├── Move all zeros to the front of the linked list - GFG/
│   ├── README.md
│   └── move-all-zeros-to-the-front-of-the-linked-list.java
├── Moving on grid - GFG/
│   ├── README.md
│   └── moving-on-grid.java
├── Multiple left rotations of the array.java
├── N Digit numbers with digits in increasing order
├── N by 3 Repeating Number
├── N-th_Tribonacci_Number_leetcode1137.cpp
├── Nearest Smaller Element.java
├── Nearly sorted - GFG/
│   ├── README.md
│   └── nearly-sorted.java
├── Negative weight cycle - GFG/
│   ├── README.md
│   └── negative-weight-cycle.java
├── Next Permutation
├── Next Pointer Binary Tree.java
├── Next Right Node.cpp
├── Next Right Node.java
├── Next element with greater frequency - GFG/
│   ├── README.md
│   └── next-element-with-greater-frequency.java
├── Noble Integer.java
├── Node with highest edge score.cpp
├── Nodes at even distance - GFG/
│   ├── README.md
│   └── nodes-at-even-distance.java
├── Nth item through sum - GFG/
│   ├── README.md
│   └── nth-item-through-sum.py
├── Number Formation - GFG/
│   ├── README.md
│   └── number-formation.java
├── Number of 1 Bits.java
├── Number of Provinces.java
├── Number of Sundays.java
├── Number of Ways to Arrive at Destination gfg med sep16.cpp
├── Number of Ways to Arrive at Destination.cpp
├── Number of Ways to Arrive at Destination.java
├── Number of distict Words with k maximum contiguous vowels.java
├── Number of distinct Words with k maximum contiguous vowels - GFG/
│   ├── README.md
│   └── number-of-distinct-words-with-k-maximum-contiguous-vowels.java
├── Number of positive integral solutions - GFG/
│   ├── README.md
│   └── number-of-positive-integral-solutions.py
├── Number of ways - GFG/
│   ├── README.md
│   └── number-of-ways.java
├── Number-of-ways-to-arrive-destination/
│   ├── Solution.cpp
│   └── question.md
├── Numbers-With-Same-Consecutive-Differences.cpp
├── Occurence of Each Number.java
├── Odd Even Rule.java
├── POTD_gfg_The_Bit_Game .py
├── Pair With Given Difference.java
├── Pairs With Given Xor.java
├── Pairs of Non Coinciding Points - GFG/
│   ├── README.md
│   └── pairs-of-non-coinciding-points.java
├── Palindrome List.java
├── Palindrome Numbers.java
├── Palindrome Partitioning II.java
├── Palindrome Partitioning.java
├── Palindromic Substrings.java
├── Palindromic Time.java
├── Palindromic Words.java
├── Partition Array According to Given Pivot.java
├── Partition Labels .cpp
├── Partition List.java
├── Partition a Linked List around a given value - GFG/
│   ├── README.md
│   └── partition-a-linked-list-around-a-given-value.java
├── Partition a number into two divisible parts - GFG/
│   ├── README.md
│   └── partition-a-number-into-two-divisible-parts.java
├── Partition array to K subsets - GFG/
│   ├── README.md
│   ├── partition-array-to-k-subsets.java
│   └── partition-array-to-k-subsets.py
├── Partition array to K subsets.java
├── Party in Town - GFG/
│   ├── README.md
│   └── party-in-town.java
├── Pascal's Triangle.java
├── Path in Directed Graph.java
├── Path in Matrix.java
├── Path to Given Node.java
├── Path with good nodes!.java
├── Perfect Peak of Array.java
├── Permutation in String.java
├── Permutation with Spaces - GFG/
│   ├── README.md
│   └── permutation-with-spaces.java
├── Permutations.java
├── Polynomial Addition - GFG/
│   ├── README.md
│   └── polynomial-addition.java
├── Positive Negative Pair
├── Postorder Traversal (Iterative).java
├── Postorder Traversal.py
├── Pots of Gold Game.java
├── Power Of 2 and Subsequences GFG/
│   └── powerOf2Sub.cpp
├── Power Of 2 and Subsequences.cpp
├── Power Of 2 and Subsequences.java
├── Power Of 2 and Subsequences.py
├── Power of 2 and Subsequences.cpp
├── Power of 2 and Subsequences.java
├── Power-of-2-&-Subsequences/
│   ├── Solution.cpp
│   └── question.md
├── Preorder Traversal.java
├── Preorder to BST.java
├── Previous number in one swap - GFG/
│   ├── README.md
│   └── previous-number-in-one-swap.py
├── Prim's_Algorithm.cpp
├── Prime Sum.java
├── Print Diagonally - GFG/
│   ├── README.md
│   └── print-diagonally.java
├── Print Pattern using String.java
├── Print the pattern gfg sep_4.cpp
├── Print the pattern.java
├── Probability of Knight - GFG/
│   ├── README.md
│   └── probability-of-knight.java
├── Product of Digits.java
├── Product of Primes - GFG/
│   ├── README.md
│   └── product-of-primes.java
├── Profit Maximisation.java
├── Pythagorean Triplets.java
├── Queries on Strings - GFG/
│   ├── README.md
│   └── queries-on-strings.java
├── Queries on a Matrix.java
├── Queue using two Stacks.java
├── QuickSort on Doubly Linked List.java
├── README.md
├── Rank The Permutations - GFG/
│   ├── README.md
│   └── rank-the-permutations.java
├── Rat Maze With Multiple Jumps - GFG/
│   ├── README.md
│   └── rat-maze-with-multiple-jumps.java
├── Reaching the heights - GFG/
│   ├── README.md
│   └── reaching-the-heights.java
├── Rearrange Geek and his Classmates.java
├── Recursively remove all adjacent duplicates - GFG/
│   ├── README.md
│   └── recursively-remove-all-adjacent-duplicates.java
├── Redundant Braces.java
├── Region in BinaryMatrix.java
├── Remove Consecutive Characters.java
├── Remove Covered Intervals.java
├── Remove Duplicates from Sorted Array II.java
├── Remove Duplicates from Sorted List II.java
├── Remove Duplicates from Sorted List.java
├── Remove Half Nodes.java
├── Remove K Digits.java
├── Remove Nth Node from List End.java
├── Remove leading zeros from an IP address.java
├── Repeat and Missing Number Array.java
├── Repeated Character.java
├── Replace every element with the least greater element on its right - GFG/
│   ├── README.md
│   └── replace-every-element-with-the-least-greater-element-on-its-right.java
├── Return two prime numbers.java
├── Reverse Bits.java
├── Reverse First K elements of Queue
├── Reverse Level Order.java
├── Reverse Spiral Form of Matrix - GFG/
│   ├── README.md
│   └── reverse-spiral-form-of-matrix.java
├── Reverse a Stack using Recursion.cpp
├── Reverse a string using Stack.java
├── Reverse a sublist of a linked list - GFG/
│   ├── README.md
│   └── reverse-a-sublist-of-a-linked-list.java
├── Reverse array in groups(GFG))
├── Reverse the String.cpp
├── Reverse the String.java
├── Reverse-Interger.java
├── Richest Customer Wealth.java
├── RightView in a Binary Tree
├── Robot Bounded In Circle
├── Robots.java
├── Roman To Integer.java
├── Root to Leaf Paths With Sum.java
├── Rotate Image.cpp
├── Rotate List.java
├── Rotate Matrix.java
├── Salutes.java
├── Save Your Life - GFG/
│   ├── README.md
│   └── save-your-life.java
├── Score of Parentheses.java
├── Search for a Range.java
├── Search in Bitonic Array!.java
├── Search insert position of K in a sorted array - GFG/
│   ├── README.md
│   └── search-insert-position-of-k-in-a-sorted-array.java
├── Searching all indices for matching substring.py
├── Segregate 0s and 1s in an array.java
├── Self Permutation.java
├── Sequential Digits.java
├── Serialize.java
├── Shop in Candy Store - GFG/
│   ├── README.md
│   └── shop-in-candy-store.java
├── Shortest Distance in a Binary Maze - GFG/
│   ├── README.md
│   └── shortest-distance-in-a-binary-maze.java
├── Shortest Path Visiting All Nodes.java
├── Shortest Path between Cities - GFG/
│   ├── README.md
│   └── shortest-path-between-cities.java
├── Shortest Uncommon Subsequence - GFG/
│   ├── README.md
│   ├── shortest-uncommon-subsequence.cpp
│   └── shortest-uncommon-subsequence.java
├── Shortest Unique prefix for every word.java
├── Shortest_distance_in_Directed_acyclic_graph.cpp
├── Simplify Path.java
├── Single Element in Sorted Array.py
├── Single Number II.java
├── Single Number.java
├── Sliding Window Maximum.java
├── Smaller on Left - GFG/
│   ├── README.md
│   └── smaller-on-left.java
├── Smallest Subset With Greater Sum.Java
├── Smallest Subset With Greater Sum.java
├── Smallest Subset with Greater Sum GFG/
│   └── SmallestSubsetWithGreterSum.cpp
├── Smallest Subset with Greater Sum gfg s15.cpp
├── Smallest Subset with Greater Sum.Cpp
├── Smallest Subset with Greater Sum.java
├── Smallest Subset with Max Sum.py
├── Smallest Value of the Rearranged Number.java
├── Smallest distinct window - GFG/
│   └── README.md
├── Smallest factorial number - GFG/
│   ├── README.md
│   └── smallest-factorial-number.java
├── Smallest greater elements in whole array - GFG/
│   ├── README.md
│   └── smallest-greater-elements-in-whole-array.java
├── Smallest number on left gfg med.cpp
├── Smallest number on left.cpp
├── Smallest number on left.java
├── Smallest number with sum of digits as N and divisible by 10^N.cpp
├── Smallest number with sum of digits as N and divisible by 10^N.java
├── Smallest number with sum of digits as N and divisible by 10^N.py
├── Smallest number with sum of digits as N and divisible by 10powerN.cpp
├── Smallest sum contiguous subarray.cpp
├── Smallest sum contiguous subarray.java
├── Smallest sum contiguous subarray.py
├── Smallest window containing 0, 1 and 2.java
├── SmallestNumberWithSumOfDigitsAsNAndDivisbileBy10ToThePowerN.java
├── Solve-the-Sudoku - GFG/
│   └── Solve-the-Sudoku.java
├── Sort Binary Linked List.java
├── Sort Even and Odd Indices Independently.java
├── Sort List.java
├── Sort by Set Bit Count.java
├── Sorted Array To Balanced BST.java
├── Sorted Insert Position.java
├── Sorted Link List to BST - GFG/
│   └── README.md
├── Special Matrix.java
├── Spidey Sense.java
├── Spiral Matrix.java
├── Spiral Order Matrix II.java
├── Split_Array_Into_Consecutive_subsequence.java
├── Square Root of Integer.java
├── Stack Permutation med gfg sep7.cpp
├── Stack Permutations [GFG POTD(07-09-22)].java
├── Stack Permutations.java
├── Stack Permutations.py
├── Step by Step.java
├── Stepping Numbers - GFG/
│   ├── README.md
│   └── stepping-numbers.java
├── Steps by Knight
├── Stock buy and sell - GFG/
│   └── Stock buy and sell.cpp
├── Stone Game IV.java
├── String And Its Frequency.java
├── String formation from substring - GFG/
│   ├── README.md
│   └── string-formation-from-substring.java
├── String to Integer (atoi).java
├── Subarray Sum Equals K.java
├── Subarray with equal occurences!.java
├── Subarray with given sum - GFG/
│   └── Subarray with given sum.cpp
├── Subset.java
├── Subsets II.java
├── Subsets with XOR value - GFG/
│   ├── README.md
│   └── subsets-with-xor-value.java
├── Subsets.java
├── Sum Of k smallest elements in BST.java
├── Sum Root to Leaf Numbers.java
├── Sum of 7's Multiple.java
├── Sum of K smallest elements  in BST.cpp
├── Sum of Root To Leaf Binary Numbers.java
├── Sum of elements between k1'th and k2'th smallest elements - GFG/
│   ├── README.md
│   └── sum-of-elements-between-k1th-and-k2th-smallest-elements.java
├── Sum of k smallest elements in BST.cpp
├── Sum of k smallest elements in BST.java
├── Sum of nodes within k distance from target - GFG/
│   ├── README.md
│   └── sum-of-nodes-within-k-distance-from-target.java
├── Sum of two large numbers.cpp
├── Sum of two large numbers.java
├── Sum of two numbers without using arithmetic operators - GFG/
│   ├── README.md
│   └── sum-of-two-numbers-without-using-arithmetic-operators.java
├── Summary Ranges.java
├── Super Primes - GFG/
│   ├── README.md
│   └── super-primes.java
├── Swap Bits.java
├── Swap Kth nodes from ends - GFG/
│   ├── README.md
│   └── swap-kth-nodes-from-ends.java
├── Swap Nodes in Pairs.java
├── Swap bits - GFG/
│   ├── README.md
│   └── swap-bits.java
├── Symmetric Binary Tree.java
├── The Bit Game easy s24.cpp
├── The bit Game.cpp
├── Theft at World Bank - GFG/
│   ├── README.md
│   └── theft-at-world-bank.java
├── Topo_sort.cpp
├── Total Moves For Bishop!.java
├── Towers_CSES.cpp
├── Trailing Zeroes.java
├── Transfiguration.java
├── Transform String - GFG/
│   └── README.md
├── Tree Path Sum.java
├── Triangle and Square - GFG/
│   ├── README.md
│   └── triangle-and-square.java
├── Tricky Subset Problem - GFG/
│   ├── README.md
│   └── tricky-subset-problem.java
├── Two Sum.java
├── Two Sum.py
├── UTF-8-Validation med lc.cpp
├── Union-Find - GFG/
│   ├── README.md
│   └── union-find.java
├── Unique Subsets - GFG/
│   ├── README.md
│   └── unique-subsets.java
├── Unit Area of largest region of 1's.cpp
├── Unit Area of largest region of 1's.java
├── Valid Binary Search Tree.java
├── Valid Mountain Array.java
├── Valid Parentheses.java
├── Valid Password.java
├── Validate Stack Sequences.java
├── Verify Prime.java
├── Vertical Sum of a Binary Tree.java
├── Villain Con - GFG/
│   ├── README.md
│   └── villain-con.java
├── Vowel and Consonant Substrings!.java
├── Wave Array.java
├── Ways to Decode.java
├── Window String.java
├── Word Break - Part 2 - GFG/
│   ├── README.md
│   └── word-break-part-2.java
├── Word Break II.cpp
├── Word Break II.java
├── Word Break.java
├── Word Count.py
├── Word Ladder I.cpp
├── Word Ladder II.py
├── Word Ladder.java
├── Word Pattern.java
├── Word Wrap - GFG/
│   ├── README.md
│   └── word-wrap.java
├── X Total Shapes.java
├── XOR Game.java
├── XOR-ing the Subarrays!.java
├── ZigZag Level Order Traversal BT.java
├── Zigzag String.java
├── alternate positive and negative.cpp
├── check if array is sorted and rotated/
│   └── check-if-array-is-rotated-and-sorted.cpp
├── depth first search.cpp
├── rotate-array/
│   └── rotate-array.cpp
├── sorting-characters-by-frequency/
│   └── sorting-characters-by-frequency.cpp
├── split array into consecutive subsequences/
│   └── split-array-into-consecutive-subsequences.cpp
├── string-to-integer(atoi)/
│   └── string-to-integer(atoi).cpp
├── sum of k smallest elements in  BST.cpp
└── valid parenthesis.java
Download .txt
Showing preview only (349K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (3946 symbols across 1369 files)

FILE: 0012-integer-to-roman/0012-integer-to-roman.java
  class Solution (line 1) | class Solution {
    method intToRoman (line 4) | public String intToRoman(int num) {

FILE: 0012-integer-to-roman/0012-integer-to-roman.py
  class Solution (line 1) | class Solution:
    method intToRoman (line 2) | def intToRoman(self, num: int) -> str:

FILE: 0026-remove-duplicates-from-sorted-array/0026-remove-duplicates-from-sorted-array.java
  class Solution (line 1) | class Solution {
    method removeDuplicates (line 2) | public int removeDuplicates(int[] nums) {

FILE: 0026-remove-duplicates-from-sorted-array/0026-remove-duplicates-from-sorted-array.py
  class Solution (line 1) | class Solution(object):
    method removeDuplicates (line 2) | def removeDuplicates(self, nums):

FILE: 0036-valid-sudoku/0036-valid-sudoku.java
  class Solution (line 1) | class Solution {
    method isCorrect (line 2) | public static boolean isCorrect(char[][] board,int x,int y){
    method isValidSudoku (line 17) | public boolean isValidSudoku(char[][] board) {

FILE: 0036-valid-sudoku/0036-valid-sudoku.py
  class Solution (line 1) | class Solution:
    method isValidSudoku (line 2) | def isValidSudoku(self, board) -> bool:

FILE: 0037-sudoku-solver/0037-sudoku-solver.java
  class Solution (line 1) | class Solution {
    method solveSudoku (line 2) | public void solveSudoku(char[][] board) {
    method dfs (line 5) | boolean dfs(int i,int j,char[][]board){
    method notInRow (line 31) | boolean notInRow(char arr[][], int row)
    method notInCol (line 43) | boolean notInCol(char arr[][], int col)
    method notInBox (line 54) | boolean notInBox(char arr[][], int startRow, int startCol)
    method safe (line 70) | boolean safe(char arr[][], int row,

FILE: 0038-count-and-say/0038-count-and-say.java
  class Solution (line 1) | class Solution {
    method countAndSay (line 2) | public String countAndSay(int n) {
    method getNextState (line 10) | private StringBuilder getNextState(StringBuilder curSb) {

FILE: 0038-count-and-say/0038-count-and-say.py
  class Solution (line 2) | class Solution:
    method countAndSay (line 3) | def countAndSay(self, n: int) -> str:

FILE: 0049-group-anagrams/0049-group-anagrams.java
  class Solution (line 1) | class Solution {
    method groupAnagrams (line 2) | public List<List<String>> groupAnagrams(String[] strs) {

FILE: 0049-group-anagrams/0049-group-anagrams.py
  class Solution (line 3) | class Solution:
    method groupAnagrams (line 4) | def groupAnagrams(self, strs):

FILE: 0055-jump-game/0055-jump-game.java
  class Solution (line 1) | class Solution {
    method canJump (line 2) | public boolean canJump(int[] nums) {

FILE: 0055-jump-game/0055-jump-game.py
  class Solution (line 1) | class Solution:
    method canJump (line 2) | def canJump(self, nums: List[int]) -> bool:

FILE: 0057-insert-interval/0057-insert-interval.java
  class Solution (line 1) | class Solution {
    method insert (line 2) | public int[][] insert(int[][] intervals, int[] newInterval) {

FILE: 0057-insert-interval/0057-insert-interval.py
  class Solution (line 1) | class Solution:
    method insert (line 2) | def insert(self, intervals, newInterval):

FILE: 0070-climbing-stairs/0070-climbing-stairs.java
  class Solution (line 1) | class Solution {
    method climbStairs (line 2) | public int climbStairs(int n) {

FILE: 0076-minimum-window-substring/0076-minimum-window-substring.java
  class Solution (line 1) | class Solution {
    method minWindow (line 2) | public String minWindow(String s, String t) {

FILE: 0079-word-search/0079-word-search.java
  class Solution (line 1) | class Solution {
    method exist (line 4) | public boolean exist(char[][] board, String word) {
    method dfs (line 39) | private boolean dfs(char[][] board, String word, int i, int j, int ci) {

FILE: 0093-restore-ip-addresses/0093-restore-ip-addresses.java
  class Solution (line 1) | class Solution {
    method valid (line 2) | private boolean valid(String s, int start, int length) {
    method helper (line 9) | private void helper(String s, int startIndex, List<Integer> dots, List...
    method restoreIpAddresses (line 42) | public List<String> restoreIpAddresses(String s) {

FILE: 0100-same-tree/0100-same-tree.java
  class Solution (line 1) | class Solution {
    method isSameTree (line 2) | public boolean isSameTree(TreeNode p, TreeNode q) {
    method inOrderTraversal (line 8) | public boolean inOrderTraversal(TreeNode node1, TreeNode node2) {

FILE: 0124-binary-tree-maximum-path-sum/0124-binary-tree-maximum-path-sum.java
  class Solution (line 2) | class Solution {
    method maxPathSum (line 3) | public int maxPathSum(TreeNode root) {
    method gainFromSubtree (line 12) | private int gainFromSubtree(TreeNode root) {

FILE: 0125-valid-palindrome/0125-valid-palindrome.java
  class Solution (line 1) | class Solution {
    method isPalindrome (line 2) | public boolean isPalindrome(String s) {

FILE: 0131-palindrome-partitioning/0131-palindrome-partitioning.java
  class Solution (line 1) | class Solution {
    method partition (line 2) | public List<List<String>> partition(String s) {
    method palPart (line 10) | public void palPart(List<List<String>> Al1, List<String> Al2,String s,...
    method isPalindrome (line 29) | public boolean isPalindrome(int start, int i, String s)

FILE: 0134-gas-station/0134-gas-station.java
  class Solution (line 1) | class Solution {
    method canCompleteCircuit (line 2) | public int canCompleteCircuit(int[] gas, int[] cost) {

FILE: 0144-binary-tree-preorder-traversal/0144-binary-tree-preorder-traversal.java
  class Solution (line 16) | class Solution {
    method preorderTraversal (line 17) | public List<Integer> preorderTraversal(TreeNode root) {
    method preOrder (line 22) | void preOrder(TreeNode root, List<Integer> list){

FILE: 0149-max-points-on-a-line/0149-max-points-on-a-line.java
  class Solution (line 1) | class Solution {
    method maxPoints (line 2) | public int maxPoints(int[][] points) {

FILE: 0150-evaluate-reverse-polish-notation/0150-evaluate-reverse-polish-notation.java
  class Solution (line 1) | class Solution {
    method evalRPN (line 2) | public int evalRPN(String[] tokens) {
    method eval (line 8) | private int eval(String[] tokens, int pos, int[] nxtPos) {

FILE: 0151-reverse-words-in-a-string/0151-reverse-words-in-a-string.java
  class Solution (line 1) | class Solution {
    method reverseWords (line 2) | public String reverseWords(String s) {

FILE: 0198-house-robber/0198-house-robber.java
  class Solution (line 1) | class Solution {
    method rob (line 2) | public int rob(int[] nums) {

FILE: 0212-word-search-ii/0212-word-search-ii.java
  class Solution (line 1) | class Solution {
    method findWords (line 5) | public List<String> findWords(char[][] board, String[] words) {
    method searchWord (line 23) | private List<String> searchWord(char[][] board) {
    method checkWord (line 35) | private void checkWord(List<String> res, int y, int x, char[][] board,...
    class Tree (line 69) | class Tree {
      method isEmpty (line 75) | public boolean isEmpty() {

FILE: 0219-contains-duplicate-ii/0219-contains-duplicate-ii.java
  class Solution (line 1) | class Solution {
    method containsNearbyDuplicate (line 2) | public boolean containsNearbyDuplicate(int[] nums, int k) {

FILE: 0222-count-complete-tree-nodes/0222-count-complete-tree-nodes.java
  class Solution (line 1) | class Solution {
    method countNodes (line 2) | public int countNodes(TreeNode root) {

FILE: 0223-rectangle-area/0223-rectangle-area.java
  class Solution (line 1) | class Solution {
    method computeArea (line 2) | public int computeArea(int ax1, int ay1, int ax2, int ay2, int bx1, in...

FILE: 0224-basic-calculator/0224-basic-calculator.java
  class Solution (line 1) | class Solution {
    method calculate (line 3) | public int calculate(String s) {
    method calc (line 8) | private int calc(String s) {

FILE: 0232-implement-queue-using-stacks/0232-implement-queue-using-stacks.java
  class MyQueue (line 1) | class MyQueue {
    method MyQueue (line 6) | public MyQueue() {
    method push (line 11) | public void push(int x) {
    method pop (line 16) | public int pop() {
    method peek (line 25) | public int peek() {
    method empty (line 34) | public boolean empty() {

FILE: 0236-lowest-common-ancestor-of-a-binary-tree/0236-lowest-common-ancestor-of-a-binary-tree.java
  class Solution (line 1) | class Solution {
    method lowestCommonAncestor (line 2) | public TreeNode lowestCommonAncestor(TreeNode root, TreeNode p, TreeNo...

FILE: 0237-delete-node-in-a-linked-list/0237-delete-node-in-a-linked-list.java
  class Solution (line 1) | class Solution {
    method deleteNode (line 2) | public void deleteNode(ListNode node) {

FILE: 0242-valid-anagram/0242-valid-anagram.cpp
  class Solution (line 1) | class Solution {
    method isAnagram (line 3) | bool isAnagram(string s, string t) {

FILE: 0242-valid-anagram/0242-valid-anagram.java
  class Solution (line 1) | class Solution {
    method isAnagram (line 2) | public boolean isAnagram(String a, String b) {

FILE: 0263-ugly-number/0263-ugly-number.java
  class Solution (line 1) | class Solution {
    method isUgly (line 2) | public boolean isUgly(int n) {

FILE: 0279-perfect-squares/0279-perfect-squares.java
  class Solution (line 1) | class Solution {
    method numSquares (line 2) | public int numSquares(int n) {

FILE: 0290-word-pattern/0290-word-pattern.java
  class Solution (line 1) | class Solution {
    method wordPattern (line 2) | public boolean wordPattern(String pattern, String s) {

FILE: 0295-find-median-from-data-stream/0295-find-median-from-data-stream.java
  class MedianFinder (line 1) | class MedianFinder {
    method MedianFinder (line 5) | public MedianFinder() {
    method addNum (line 9) | public void addNum(int num) {
    method findMedian (line 22) | public double findMedian() {

FILE: 0309-best-time-to-buy-and-sell-stock-with-cooldown/0309-best-time-to-buy-and-sell-stock-with-cooldown.java
  class Solution (line 1) | class Solution {
    method maxProfit (line 2) | public int maxProfit(int[] prices) {

FILE: 0328-odd-even-linked-list/0328-odd-even-linked-list.java
  class Solution (line 11) | class Solution {
    method oddEvenList (line 12) | public ListNode oddEvenList(ListNode head) {

FILE: 0334-increasing-triplet-subsequence/0334-increasing-triplet-subsequence.java
  class Solution (line 1) | class Solution {
    method increasingTriplet (line 2) | public boolean increasingTriplet(int[] nums) {

FILE: 0345-reverse-vowels-of-a-string/0345-reverse-vowels-of-a-string.java
  class Solution (line 1) | class Solution {
    method reverseVowels (line 2) | public String reverseVowels(String s) {
    method vowel (line 18) | boolean vowel(char c){

FILE: 0374-guess-number-higher-or-lower/0374-guess-number-higher-or-lower.java
  class Solution (line 6) | public class Solution extends GuessGame {
    method guessNumber (line 7) | public int guessNumber(int n) {

FILE: 0380-insert-delete-getrandom-o1/0380-insert-delete-getrandom-o1.java
  class RandomizedSet (line 1) | class RandomizedSet {
    method RandomizedSet (line 5) | public RandomizedSet() {
    method insert (line 10) | public boolean insert(int val) {
    method remove (line 21) | public boolean remove(int val) {
    method swap (line 33) | private void swap(int index) {
    method getRandom (line 43) | public int getRandom() {

FILE: 0409-longest-palindrome/0409-longest-palindrome.java
  class Solution (line 1) | class Solution {
    method longestPalindrome (line 2) | public int longestPalindrome(String s) {

FILE: 0446-arithmetic-slices-ii-subsequence/0446-arithmetic-slices-ii-subsequence.java
  class Solution (line 2) | class Solution {
    method numberOfArithmeticSlices (line 3) | public int numberOfArithmeticSlices(int[] A) {

FILE: 0451-sort-characters-by-frequency/0451-sort-characters-by-frequency.java
  class Solution (line 1) | class Solution {
    method frequencySort (line 2) | public String frequencySort(String s) {

FILE: 0452-minimum-number-of-arrows-to-burst-balloons/0452-minimum-number-of-arrows-to-burst-balloons.java
  class Solution (line 1) | class Solution {
    method findMinArrowShots (line 2) | public int findMinArrowShots(int[][] points) {

FILE: 0491-non-decreasing-subsequences/0491-non-decreasing-subsequences.java
  class Solution (line 1) | class Solution {
    method backtrack (line 2) | private void backtrack(int[] nums, int index, List<Integer> sequence,
    method findSubsequences (line 25) | public List<List<Integer>> findSubsequences(int[] nums) {

FILE: 0520-detect-capital/0520-detect-capital.java
  class Solution (line 1) | class Solution {
    method detectCapitalUse (line 2) | public boolean detectCapitalUse(String word) {

FILE: 0523-continuous-subarray-sum/0523-continuous-subarray-sum.java
  class Solution (line 1) | class Solution
    method checkSubarraySum (line 3) | public boolean checkSubarraySum(int[] nums, int k)

FILE: 0587-erect-the-fence/0587-erect-the-fence.java
  class Solution (line 1) | public class Solution {
    method orientation (line 2) | public int orientation(int[] p, int[] q, int[] r) {
    method outerTrees (line 5) | public int[][] outerTrees(int[][] points) {

FILE: 0645-set-mismatch/0645-set-mismatch.java
  class Solution (line 1) | class Solution {
    method findErrorNums (line 2) | public int[] findErrorNums(int[] nums) {

FILE: 0692-top-k-frequent-words/0692-top-k-frequent-words.java
  class Solution (line 1) | class Solution {
    method topKFrequent (line 2) | public List<String> topKFrequent(String[] words, int k) {

FILE: 0739-daily-temperatures/0739-daily-temperatures.java
  class Solution (line 1) | class Solution {
    method dailyTemperatures (line 2) | public int[] dailyTemperatures(int[] a) {

FILE: 0766-toeplitz-matrix/0766-toeplitz-matrix.java
  class Solution (line 1) | class Solution {
    method isToeplitzMatrix (line 2) | public boolean isToeplitzMatrix(int[][] matrix) {

FILE: 0787-cheapest-flights-within-k-stops/0787-cheapest-flights-within-k-stops.java
  class Solution (line 1) | class Solution {
    method findCheapestPrice (line 2) | public int findCheapestPrice(int n, int[][] flights, int src, int dst,...

FILE: 0790-domino-and-tromino-tiling/0790-domino-and-tromino-tiling.java
  class Solution (line 1) | class Solution {
    method numTilings (line 2) | public int numTilings(int n) {

FILE: 0797-all-paths-from-source-to-target/0797-all-paths-from-source-to-target.java
  class Solution (line 1) | class Solution {
    method allPathsSourceTarget (line 2) | public List<List<Integer>> allPathsSourceTarget(int[][] graph) {
    method dfs (line 11) | public void dfs(int[][] graph, List<List<Integer>> ans, List<Integer> ...

FILE: 0834-sum-of-distances-in-tree/0834-sum-of-distances-in-tree.java
  class Solution (line 1) | class Solution {
    method sumOfDistancesInTree (line 2) | public int[] sumOfDistancesInTree(int n, int[][] edges) {
    method buildParents (line 44) | static int[] buildParents(int n, int[][] edges) {
    method buildNext (line 63) | static int[][] buildNext(final int n, final int[][] edges) {

FILE: 0835-image-overlap/0835-image-overlap.java
  class Solution (line 1) | class Solution {
    method convolute (line 3) | protected int convolute(int[][] A, int[][] kernel, int xShift, int ySh...
    method largestOverlap (line 11) | public int largestOverlap(int[][] A, int[][] B) {

FILE: 0841-keys-and-rooms/0841-keys-and-rooms.java
  class Solution (line 1) | class Solution {
    method canVisitAllRooms (line 2) | public boolean canVisitAllRooms(List<List<Integer>> rooms) {
    method dfs (line 9) | public int dfs(List<List<Integer>> rooms, int currRoom, boolean[] visi...

FILE: 0872-leaf-similar-trees/0872-leaf-similar-trees.java
  class Solution (line 16) | class Solution {
    method leafSimilar (line 17) | public boolean leafSimilar(TreeNode root1, TreeNode root2) {
    method getLeafValues (line 25) | List<Integer> getLeafValues(TreeNode node, List<Integer> values) {

FILE: 0876-middle-of-the-linked-list/0876-middle-of-the-linked-list.java
  class Solution (line 1) | class Solution {
    method middleNode (line 2) | public ListNode middleNode(ListNode head) {

FILE: 0886-possible-bipartition/0886-possible-bipartition.java
  class Solution (line 1) | class Solution {
    method possibleBipartition (line 2) | public boolean possibleBipartition(int n, int[][] dislikes) {

FILE: 0899-orderly-queue/0899-orderly-queue.java
  class Solution (line 1) | class Solution {
    method orderlyQueue (line 2) | public String orderlyQueue(String s, int k) {

FILE: 0901-online-stock-span/0901-online-stock-span.java
  class StockSpanner (line 1) | class StockSpanner {
    method next (line 4) | public int next(int price) {

FILE: 0907-sum-of-subarray-minimums/0907-sum-of-subarray-minimums.java
  class Solution (line 2) | class Solution {
    method sumSubarrayMins (line 3) | public int sumSubarrayMins(int[] arr) {

FILE: 0909-snakes-and-ladders/0909-snakes-and-ladders.java
  class Solution (line 1) | class Solution {
    method snakesAndLadders (line 2) | public int snakesAndLadders(int[][] board) {

FILE: 0918-maximum-sum-circular-subarray/0918-maximum-sum-circular-subarray.java
  class Solution (line 1) | class Solution {
    method maxSubarraySumCircular (line 2) | public int maxSubarraySumCircular(int[] nums) {

FILE: 0926-flip-string-to-monotone-increasing/0926-flip-string-to-monotone-increasing.java
  class Solution (line 1) | class Solution {
    method minFlipsMonoIncr (line 2) | public int minFlipsMonoIncr(String s) {

FILE: 0938-range-sum-of-bst/0938-range-sum-of-bst.java
  class Solution (line 16) | class Solution {
    method rangeSumBST (line 17) | public int rangeSumBST(TreeNode root, int low, int high) {

FILE: 0944-delete-columns-to-make-sorted/0944-delete-columns-to-make-sorted.java
  class Solution (line 1) | class Solution {
    method minDeletionSize (line 2) | public int minDeletionSize(String[] strs) {

FILE: 0947-most-stones-removed-with-same-row-or-column/0947-most-stones-removed-with-same-row-or-column.java
  class Solution (line 1) | class Solution {
    method removeStones (line 2) | public int removeStones(int[][] stones) {
    class UnionFind (line 17) | class UnionFind {
      method UnionFind (line 21) | public UnionFind() {
      method find (line 26) | public int find(int x) {
      method union (line 39) | public void union(int x, int y) {

FILE: 0974-subarray-sums-divisible-by-k/0974-subarray-sums-divisible-by-k.java
  class Solution (line 1) | class Solution {
    method subarraysDivByK (line 2) | public int subarraysDivByK(int[] nums, int k) {

FILE: 0976-largest-perimeter-triangle/0976-largest-perimeter-triangle.java
  class Solution (line 1) | class Solution {
    method largestPerimeter (line 2) | public int largestPerimeter(int[] nums) {

FILE: 0980-unique-paths-iii/0980-unique-paths-iii.java
  class Solution (line 1) | class Solution {
    method uniquePathsIII (line 2) | public int uniquePathsIII(int[][] grid) {
    method dfs (line 18) | public int dfs(int grid[][], int x, int y, int zero){

FILE: 0997-find-the-town-judge/0997-find-the-town-judge.java
  class Solution (line 1) | class Solution {
    method findJudge (line 2) | public int findJudge(int n, int[][] trust) {

FILE: 1007-minimum-domino-rotations-for-equal-row/1007-minimum-domino-rotations-for-equal-row.java
  class Solution (line 1) | class Solution {
    method minDominoRotations (line 2) | public int minDominoRotations(int[] tops, int[] bottoms) {
    method helper (line 13) | private int helper(int target,int[] a,int[] b){

FILE: 102-binary-tree-level-order-traversal/102-binary-tree-level-order-traversal.java
  class Solution (line 16) | class Solution {
    method levelOrder (line 17) | public List<List<Integer>> levelOrder(TreeNode root) {

FILE: 102-binary-tree-level-order-traversal/102-binary-tree-level-order-traversal.py
  class Solution (line 7) | class Solution:
    method levelOrder (line 8) | def levelOrder(self, root: Optional[TreeNode]) -> List[List[int]]:

FILE: 1020-number-of-enclaves/1020-number-of-enclaves.cpp
  class Solution (line 1) | class Solution {
    method bfs (line 3) | pair<int,bool> bfs(vector<vector<int>>& gr, vector<vector<bool>>& vis,...
    method numEnclaves (line 36) | int numEnclaves(vector<vector<int>>& grid) {

FILE: 1020. Number of Enclaves.java
  class Solution (line 1) | class Solution {
    method numEnclaves (line 2) | public int numEnclaves(int[][] grid) {
    method dfs (line 33) | public void dfs(int[][] a,int[][] vis,int i,int j){

FILE: 1026-maximum-difference-between-node-and-ancestor/1026-maximum-difference-between-node-and-ancestor.java
  class Solution (line 1) | class Solution {
    method maxAncestorDiff (line 3) | public int maxAncestorDiff(TreeNode root) {
    method dfs (line 10) | void dfs(TreeNode root, int max, int min){

FILE: 1029-two-city-scheduling/1029-two-city-scheduling.java
  class Solution (line 1) | class Solution {
    method twoCitySchedCost (line 2) | public int twoCitySchedCost(int[][] costs) {

FILE: 1046-last-stone-weight/1046-last-stone-weight.java
  class Solution (line 1) | class Solution {
    method lastStoneWeight (line 2) | public int lastStoneWeight(int[] stones) {

FILE: 1047-remove-all-adjacent-duplicates-in-string/1047-remove-all-adjacent-duplicates-in-string.java
  class Solution (line 1) | class Solution {
    method removeDuplicates (line 2) | public String removeDuplicates(String s) {

FILE: 1048-longest-string-chain/1048-longest-string-chain.java
  class Solution (line 1) | class Solution {
    method longestStrChain (line 2) | public int longestStrChain(String[] words) {

FILE: 105-construct-binary-tree-from-preorder-and-inorder-traversal/105-construct-binary-tree-from-preorder-and-inorder-traversal.java
  class Solution (line 1) | class Solution {
    method buildTree (line 4) | public TreeNode buildTree(int[] preorder, int[] inorder) {
    method arrayToTree (line 15) | private TreeNode arrayToTree(int[] preorder, int left, int right) {

FILE: 1061-lexicographically-smallest-equivalent-string/1061-lexicographically-smallest-equivalent-string.java
  class Solution (line 1) | class Solution {
    method find (line 5) | int find(int x) {
    method performUnion (line 14) | void performUnion(int x, int y) {
    method smallestEquivalentString (line 30) | public String smallestEquivalentString(String s1, String s2, String ba...

FILE: 1074-number-of-submatrices-that-sum-to-target/1074-number-of-submatrices-that-sum-to-target.java
  class Solution (line 1) | class Solution {
    method numSubmatrixSumTarget (line 2) | public int numSubmatrixSumTarget(int[][] matrix, int target) {

FILE: 108-convert-sorted-array-to-binary-search-tree/108-convert-sorted-array-to-binary-search-tree.java
  class Solution (line 16) | class Solution {
    method sortedArrayToBST (line 17) | public TreeNode sortedArrayToBST(int[] nums) {
    method create (line 20) | TreeNode create(int[]nums,int i,int j){

FILE: 1081-smallest-subsequence-of-distinct-characters/1081-smallest-subsequence-of-distinct-characters.java
  class Solution (line 1) | class Solution {
    method smallestSubsequence (line 2) | public String smallestSubsequence(String s) {

FILE: 1091-shortest-path-in-binary-matrix/1091-shortest-path-in-binary-matrix.java
  class Solution (line 1) | class Solution {
    method shortestPathBinaryMatrix (line 2) | public int shortestPathBinaryMatrix(int[][] grid) {
    method check (line 14) | public void check(int[][] grid,List<int[]> pos){

FILE: 11-container-with-most-water/11-container-with-most-water.java
  class Solution (line 1) | class Solution {
    method maxArea (line 2) | public int maxArea(int[] height) {

FILE: 11-container-with-most-water/Container_With_Most_Water.cpp
  class Solution (line 1) | class Solution {
    method maxArea (line 3) | int maxArea(vector<int>& h) {

FILE: 112-path-sum/112-path-sum.java
  class Solution (line 1) | class Solution{
    method hasPathSum (line 2) | public boolean hasPathSum(TreeNode root, int targetSum) {

FILE: 113 Path Sum II med s24.cpp
  class Solution (line 4) | class Solution {
    method dfs (line 7) | void dfs(TreeNode* node, vector<int>& path, int remainingSum) {
    method pathSum (line 16) | vector<vector<int>> pathSum(TreeNode* root, int targetSum) {

FILE: 113-Path-Sum-II.cpp
  class Solution (line 1) | class Solution {
    method dfs (line 4) | void dfs(vector<int>&curr,TreeNode* root,int target)
    method pathSum (line 16) | vector<vector<int>> pathSum(TreeNode* root, int targetSum)

FILE: 113-path-sum-ii/113-path-sum-ii.java
  class Solution (line 1) | class Solution {
    method check (line 2) | public void check(TreeNode root,int T,List<Integer> curr,List<List<Int...
    method pathSum (line 18) | public List<List<Integer>> pathSum(TreeNode root, int targetSum) {

FILE: 113-path-sum-ii/113. Path Sum II.cpp
  class Solution (line 1) | class Solution {
    method dfs (line 4) | void dfs(TreeNode* root, int targetSum, vector<int> &t){
    method pathSum (line 18) | vector<vector<int>> pathSum(TreeNode* root, int targetSum) {

FILE: 114-flatten-binary-tree-to-linked-list/114-flatten-binary-tree-to-linked-list.java
  class Solution (line 16) | class Solution {
    method flatten (line 17) | public void flatten(TreeNode root) {

FILE: 114-flatten-binary-tree-to-linked-list/SolutionCode.cpp
  class Solution (line 1) | class Solution
    method Node (line 4) | Node* helper(Node* root){
    method flatten (line 24) | void flatten(Node *root)

FILE: 1143-longest-common-subsequence/1143-longest-common-subsequence.java
  class Solution (line 1) | class Solution {
    method longestCommonSubsequence (line 2) | public int longestCommonSubsequence(String s1, String s2) {

FILE: 1155-number-of-dice-rolls-with-target-sum/1155-number-of-dice-rolls-with-target-sum.java
  class Solution (line 1) | class Solution {
    method helper (line 3) | int helper(int n,int t,int k,int dp[][]){
    method numRollsToTarget (line 13) | public int numRollsToTarget(int n, int k, int target) {

FILE: 117-populating-next-right-pointers-in-each-node-ii/117-populating-next-right-pointers-in-each-node-ii.java
  class Solution (line 1) | class Solution {
    method connect (line 2) | public Node connect(Node root) {

FILE: 118-pascals-triangle/118-pascals-triangle.java
  class Solution (line 1) | class Solution {
    method generate (line 2) | public List<List<Integer>> generate(int numRows) {

FILE: 1192-critical-connections-in-a-network/1192-critical-connections-in-a-network.java
  class Solution (line 1) | class Solution {
    method criticalConnections (line 6) | public List<List<Integer>> criticalConnections(int n, List<List<Intege...
    method dfs (line 18) | public void dfs(int curr, int prev) {

FILE: 12-integer-to-roman/12-Leetcode-Integer-to-roman.cpp
  class Solution (line 1) | class Solution {
    method string (line 3) | string intToRoman(int num) {

FILE: 12-integer-to-roman/12-integer-to-roman.java
  class Solution (line 1) | public class Solution {
    method intToRoman (line 2) | public String intToRoman(int A) {
    method getRoman (line 19) | public String getRoman(int a){

FILE: 120-triangle/120-triangle.java
  class Solution (line 1) | class Solution {
    method minimumTotal (line 2) | public int minimumTotal(List<List<Integer>> list) {

FILE: 1207-unique-number-of-occurrences/1207-unique-number-of-occurrences.java
  class Solution (line 1) | class Solution {
    method uniqueOccurrences (line 2) | public boolean uniqueOccurrences(int[] arr) {

FILE: 1209-remove-all-adjacent-duplicates-in-string-ii/1209-remove-all-adjacent-duplicates-in-string-ii.java
  class Solution (line 1) | class Solution {
    method removeDuplicates (line 2) | public String removeDuplicates(String s, int k) {

FILE: 1220-count-vowels-permutation/1220-count-vowels-permutation.java
  class Solution (line 1) | class Solution {
    method countVowelPermutation (line 2) | public int countVowelPermutation(int n) {

FILE: 1235-maximum-profit-in-job-scheduling/1235-maximum-profit-in-job-scheduling.java
  class Solution (line 1) | class Solution {
    class Job (line 2) | class Job implements Comparable<Job>{
      method Job (line 6) | Job(int start, int end, int profit) {
      method compareTo (line 11) | public int compareTo(Job otherJob) {
    method jobScheduling (line 15) | public int jobScheduling(int[] startTime, int[] endTime, int[] profit) {

FILE: 1239-maximum-length-of-a-concatenated-string-with-unique-characters/1239-maximum-length-of-a-concatenated-string-with-unique-characters.java
  class Solution (line 1) | class Solution {
    method solve (line 2) | public int solve(String strs[], int no, int a[], int index, int c) {
    method maxLength (line 11) | public int maxLength(List<String> arr) {

FILE: 126-word-ladder-ii/126-word-ladder-ii.java
  class Solution (line 1) | class Solution {
    method findLadders (line 2) | public List<List<String>> findLadders(String beginWord, String endWord...
    method minTrans (line 18) | private void minTrans() {
    method makeTrans (line 57) | private void makeTrans(Map<String, Set<String>> paths, int maxLen) {
    method makeTransInternal (line 68) | void makeTransInternal(String start, int depth, String[] path) {
    method sanityCheck (line 84) | private boolean sanityCheck(List<String> wordList) {
    method prepare (line 93) | private void prepare(List<String> wordList) {
    method getPatterns (line 113) | private String[] getPatterns(String word) {

FILE: 1260-shift-2d-grid/1260-shift-2d-grid.java
  class Solution (line 1) | class Solution {
    method shiftGrid (line 2) | public List<List<Integer>> shiftGrid(int[][] grid, int k) {

FILE: 1268-search-suggestions-system/1268-search-suggestions-system.java
  class Solution (line 1) | class Solution {
    method suggestedProducts (line 2) | public List<List<String>> suggestedProducts(String[] products, String ...

FILE: 128-longest-consecutive-sequence/128-longest-consecutive-sequence.java
  class Solution (line 1) | class Solution {
    method longestConsecutive (line 2) | public int longestConsecutive(int[] nums) {

FILE: 1293-shortest-path-in-a-grid-with-obstacles-elimination/1293-shortest-path-in-a-grid-with-obstacles-elimination.java
  class Solution (line 1) | class Solution {
    class Node (line 2) | class Node {
      method Node (line 7) | Node(int row, int col, int obstacles){
    method shortestPath (line 16) | public int shortestPath(int[][] grid, int k) {

FILE: 13-roman-to-integer/13-roman-to-integer.cpp
  class Solution (line 1) | class Solution {
    method romanToInt (line 3) | int romanToInt(string s) {

FILE: 13-roman-to-integer/13-roman-to-integer.java
  class Solution (line 1) | public class Solution {
    method romanToInt (line 2) | public int romanToInt(String A) {
    method getValue (line 21) | int getValue(char ch){

FILE: 1302-deepest-leaves-sum/1302-deepest-leaves-sum.java
  class Solution (line 1) | class Solution {
    method deepestLeavesSum (line 5) | public int deepestLeavesSum(TreeNode root) {
    method deepestLeavesSum (line 10) | public void deepestLeavesSum(TreeNode root,int level) {

FILE: 1323-maximum-69-number/1323-maximum-69-number.java
  class Solution (line 1) | class Solution {
    method maximum69Number (line 2) | public int maximum69Number (int num) {

FILE: 1328-break-a-palindrome/1328-break-a-palindrome.java
  class Solution (line 1) | class Solution {
    method breakPalindrome (line 2) | public String breakPalindrome(String palindrome) {

FILE: 1329-sort-the-matrix-diagonally/1329-sort-the-matrix-diagonally.cpp
  class Solution (line 1) | class Solution {
    method diagonalSort (line 3) | vector<vector<int>> diagonalSort(vector<vector<int>>& mat) {

FILE: 1329-sort-the-matrix-diagonally/1329-sort-the-matrix-diagonally.java
  class Solution (line 1) | class Solution {
    method diagonalSort (line 2) | public int[][] diagonalSort(int[][] mat) {
    method sort (line 14) | public static void sort(int[][] mat,int row,int col,int m,int n){

FILE: 1329-sort-the-matrix-diagonally/SolutionCode.cpp
  class Solution (line 1) | class Solution {
    method sortIt (line 3) | void sortIt(int r,int c,int m,int n,vector<vector<int>> &v){
    method diagonalSort (line 19) | vector<vector<int>> diagonalSort(vector<vector<int>>& mat) {

FILE: 1332-remove-palindromic-subsequences/1332-remove-palindromic-subsequences.java
  class Solution (line 1) | class Solution {
    method removePalindromeSub (line 2) | public int removePalindromeSub(String s) {
    method isPal (line 8) | public boolean isPal(String s){

FILE: 1335-minimum-difficulty-of-a-job-schedule/1335-minimum-difficulty-of-a-job-schedule.java
  class Solution (line 1) | class Solution {
    method Helper (line 6) | public int Helper(int idx, int[] arr, int d){
    method minDifficulty (line 25) | public int minDifficulty(int[] jobDifficulty, int d) {

FILE: 1337-the-k-weakest-rows-in-a-matrix/1337-the-k-weakest-rows-in-a-matrix.java
  class Solution (line 1) | class Solution {
    method kWeakestRows (line 2) | public int[] kWeakestRows(int[][] mat, int k) {
    method count (line 14) | public int count(int[][]mat,int i){

FILE: 1338-reduce-array-size-to-the-half/1338-reduce-array-size-to-the-half.cpp
  function minSetSize (line 1) | int minSetSize(vector<int>& arr) {

FILE: 1338-reduce-array-size-to-the-half/1338-reduce-array-size-to-the-half.java
  class Pair (line 1) | class Pair{
    method Pair (line 4) | Pair(int i,int j){
  class Solution (line 9) | class Solution {
    method minSetSize (line 10) | public int minSetSize(int[] arr) {

FILE: 1339-maximum-product-of-splitted-binary-tree/1339-maximum-product-of-splitted-binary-tree.java
  class Solution (line 1) | class Solution {
    method maxProduct (line 5) | public int maxProduct(TreeNode root) {
    method dfs (line 11) | private int dfs(TreeNode root)
    method traverse (line 18) | private void traverse(TreeNode root)

FILE: 1342-number-of-steps-to-reduce-a-number-to-zero/1342-number-of-steps-to-reduce-a-number-to-zero.java
  class Solution (line 1) | class Solution {
    method numberOfSteps (line 2) | public int numberOfSteps(int num) {

FILE: 135-candy/135-candy.java
  class Solution (line 1) | public class Solution {
    method candy (line 2) | public int candy(int[] ratings) {

FILE: 1354-construct-target-array-with-multiple-sums/1354-construct-target-array-with-multiple-sums.java
  class Solution (line 1) | class Solution {
    method isPossible (line 2) | public boolean isPossible(int[] target) {

FILE: 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.java
  class Solution (line 11) | class Solution {
    method getTargetCopy (line 14) | public final TreeNode getTargetCopy(final TreeNode original, final Tre...
    method dfs (line 19) | public void dfs(TreeNode a,TreeNode b){

FILE: 1381. Design a Stack With Increment Operation/1381-Design-a-Stack-With-Increment-Operation.cpp
  class CustomStack (line 1) | class CustomStack {
    method CustomStack (line 69) | CustomStack(int maxSize) {
    method push (line 73) | void push(int x) {
    method pop (line 80) | int pop() {
    method increment (line 92) | void increment(int k, int val) {

FILE: 1383 Maximum Performance of a Team lc hard.cpp
  class Solution (line 4) | class Solution {
    method maxPerformance (line 9) | int maxPerformance(int n, vector<int>& speed, vector<int>& efficiency,...

FILE: 1383-maximum-performance-of-a-team/1383-maximum-performance-of-a-team.java
  class Solution (line 1) | class Solution {
    method maxPerformance (line 2) | public int maxPerformance(int n, int[] speed, int[] efficiency, int k) {

FILE: 1396-design-underground-system/1396-design-underground-system.java
  class UndergroundSystem (line 1) | class UndergroundSystem {
    class Pair (line 2) | class Pair{
      method Pair (line 5) | Pair(String p,int t){
    method UndergroundSystem (line 12) | public UndergroundSystem() {
    method checkIn (line 17) | public void checkIn(int id, String p, int t) {
    method checkOut (line 21) | public void checkOut(int id, String stationName, int t) {
    method getAverageTime (line 38) | public double getAverageTime(String start, String end) {

FILE: 14. Longest Common Prefix.py
  function longestCommonPrefix (line 1) | def longestCommonPrefix(self, strs: List[str]) -> str:

FILE: 1423-maximum-points-you-can-obtain-from-cards/1423-maximum-points-you-can-obtain-from-cards.java
  class Solution (line 1) | class Solution {
    method maxScore (line 2) | public int maxScore(int[] cardPoints, int k) {

FILE: 143-Reorder List.java
  class Solution (line 3) | class Solution {
    method reorderList (line 4) | public void reorderList(ListNode head) {

FILE: 1443-minimum-time-to-collect-all-apples-in-a-tree/1443-minimum-time-to-collect-all-apples-in-a-tree.java
  class Solution (line 1) | class Solution {
    method dfs (line 2) | public int dfs(int node, int parent, Map<Integer, List<Integer>> adj,
    method minTime (line 21) | public int minTime(int n, int[][] edges, List<Boolean> hasApple) {

FILE: 1448-count-good-nodes-in-binary-tree/1448-count-good-nodes-in-binary-tree.java
  class Solution (line 16) | class Solution {
    method goodNodes (line 19) | public int goodNodes(TreeNode root) {
    method helper (line 33) | public void helper(TreeNode root,int curr){

FILE: 1457 Pseudo-Palindromic Paths in a Binary Tree lc.cpp
  class Solution (line 1) | class Solution {
    method checkPalin (line 5) | bool checkPalin(){
    method solve (line 15) | void solve(TreeNode *root){
    method pseudoPalindromicPaths (line 29) | int pseudoPalindromicPaths (TreeNode* root) {

FILE: 1457-pseudo-palindromic-paths-in-a-binary-tree/1457-pseudo-palindromic-paths-in-a-binary-tree.java
  class Solution (line 16) | class Solution {
    method pseudoPalindromicPaths (line 18) | public int pseudoPalindromicPaths (TreeNode root) {
    method dfs (line 24) | void dfs(TreeNode root,int[]freq){

FILE: 1461-check-if-a-string-contains-all-binary-codes-of-size-k/1461-check-if-a-string-contains-all-binary-codes-of-size-k.java
  class Solution (line 1) | class Solution {
    method hasAllCodes (line 2) | public static boolean hasAllCodes(String s, int k) {

FILE: 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.java
  class Solution (line 1) | class Solution {
    method maxArea (line 2) | public int maxArea(int h, int w, int[] hc, int[] vc) {
    method getMax (line 5) | public long getMax(int len,int[] cuts){

FILE: 1473-paint-house-iii/1473-paint-house-iii.java
  class Solution (line 1) | class Solution {
    method minCost (line 5) | public int minCost(int[] houses, int[][] cost, int m, int n, int targe...
    method min (line 89) | private int min(int[][] minCost, int j, int remaining) {

FILE: 1480-running-sum-of-1d-array/1480-running-sum-of-1d-array.java
  class Solution (line 1) | class Solution {
    method runningSum (line 2) | public int[] runningSum(int[] nums) {

FILE: 15. 3Sum/SolutionCode.cpp
  class Solution (line 1) | class Solution {
    method threeSum (line 3) | vector<vector<int>> threeSum(vector<int>& nums) {
    method threeSum (line 45) | vector<vector<int>> threeSum(vector<int>& nums) {
  class Solution (line 43) | class Solution {
    method threeSum (line 3) | vector<vector<int>> threeSum(vector<int>& nums) {
    method threeSum (line 45) | vector<vector<int>> threeSum(vector<int>& nums) {

FILE: 151. Reverse Words in a String.java
  class Solution (line 2) | class Solution {
    method reverseWords (line 3) | public String reverseWords(String s) {

FILE: 1519-number-of-nodes-in-the-sub-tree-with-the-same-label/1519-number-of-nodes-in-the-sub-tree-with-the-same-label.java
  class Solution (line 1) | class Solution {
    method dfs (line 2) | public int[] dfs(int node, int parent, Map<Integer, List<Integer>> adj,
    method countSubTrees (line 25) | public int[] countSubTrees(int n, int[][] edges, String labels) {

FILE: 1531-string-compression-ii/1531-string-compression-ii.java
  class Solution (line 10) | class Solution {
    method getLengthOfOptimalCompression (line 11) | public int getLengthOfOptimalCompression(String s, int k) {
    method length (line 69) | private int length(int count) {

FILE: 1544-make-the-string-great/1544-make-the-string-great.java
  class Solution (line 1) | class Solution {
    method makeGood (line 2) | public String makeGood(String s) {

FILE: 1578-minimum-time-to-make-rope-colorful/1578-minimum-time-to-make-rope-colorful.java
  class Solution (line 1) | class Solution {
    method minCost (line 2) | public int minCost(String colors, int[] neededTime) {

FILE: 1584-min-cost-to-connect-all-points/1584-min-cost-to-connect-all-points.java
  class Solution (line 1) | class Solution {
    method minCostConnectPoints (line 2) | public int minCostConnectPoints(int[][] points) {

FILE: 16-3sum-closest/16-3sum-closest.java
  class Solution (line 1) | class Solution {
    method threeSumClosest (line 2) | public int threeSumClosest(int[] nums, int target) {

FILE: 16. 3Sum Closest - leetcode/SolutionCode.cpp
  class Solution (line 1) | class Solution {
    method threeSumClosest (line 3) | int threeSumClosest(vector<int>& nums, int target) {

FILE: 160-intersection-of-two-linked-lists/160-intersection-of-two-linked-lists.java
  class Solution (line 1) | public class Solution {
    method getIntersectionNode (line 2) | public ListNode getIntersectionNode(ListNode headA, ListNode headB) {

FILE: 1631-path-with-minimum-effort/1631-path-with-minimum-effort.java
  class Solution (line 1) | class Solution {
    method minimumEffortPath (line 2) | public int minimumEffortPath(int[][] heights) {

FILE: 1641-count-sorted-vowel-strings/1641-count-sorted-vowel-strings.java
  class Solution (line 1) | class Solution {
    method countVowelStrings (line 2) | public int countVowelStrings(int n) {
    method sum (line 14) | private int sum(int[] arr) {

FILE: 1642-furthest-building-you-can-reach/1642-furthest-building-you-can-reach.java
  class Solution (line 1) | class Solution {
    method furthestBuilding (line 2) | public int furthestBuilding(int[] h, int bricks, int l) {

FILE: 1647-minimum-deletions-to-make-character-frequencies-unique/1647-minimum-deletions-to-make-character-frequencies-unique.java
  class Solution (line 1) | class Solution {
    method minDeletions (line 2) | public int minDeletions(String s) {

FILE: 1657-determine-if-two-strings-are-close/1657-determine-if-two-strings-are-close.java
  class Solution (line 1) | class Solution {
    method closeStrings (line 2) | public boolean closeStrings(String s1, String s2) {

FILE: 1658-minimum-operations-to-reduce-x-to-zero/1658-minimum-operations-to-reduce-x-to-zero.java
  class Solution (line 1) | class Solution {
    method minOperations (line 2) | public int minOperations(int[] nums, int x) {

FILE: 1662-check-if-two-string-arrays-are-equivalent/1662-check-if-two-string-arrays-are-equivalent.java
  class Solution (line 1) | class Solution {
    method arrayStringsAreEqual (line 2) | public boolean arrayStringsAreEqual(String[] word1, String[] word2) {

FILE: 1663-smallest-string-with-a-given-numeric-value/1663-smallest-string-with-a-given-numeric-value.java
  class Solution (line 1) | class Solution {
    method getSmallestString (line 2) | public String getSmallestString(int n, int k) {

FILE: 167-two-sum-ii-input-array-is-sorted/167-two-sum-ii-input-array-is-sorted.java
  class Solution (line 1) | class Solution {
    method twoSum (line 2) | public int[] twoSum(int[] numbers, int target) {

FILE: 1679-max-number-of-k-sum-pairs/1679-max-number-of-k-sum-pairs.java
  class Solution (line 1) | class Solution {
    method maxOperations (line 2) | public int maxOperations(int[] nums, int k) {

FILE: 1680 Concatenation of Consecutive Binary Numbers med s23.cpp
  class Solution (line 4) | class Solution {
    method concatenatedBinary (line 7) | int concatenatedBinary(int n) {

FILE: 1680-concatenation-of-consecutive-binary-numbers/1680-concatenation-of-consecutive-binary-numbers.java
  class Solution (line 1) | class Solution {
    method build (line 6) | public void build() {
    method getVal (line 14) | public int getVal(int n) {
    method concatenatedBinary (line 26) | public int concatenatedBinary(int n) {

FILE: 1689-partitioning-into-minimum-number-of-deci-binary-numbers/1689-partitioning-into-minimum-number-of-deci-binary-numbers.java
  class Solution (line 1) | class Solution {
    method minPartitions (line 2) | public int minPartitions(String n) {

FILE: 1695-maximum-erasure-value/1695-maximum-erasure-value.java
  class Solution (line 1) | class Solution {
    method maximumUniqueSubarray (line 2) | public int maximumUniqueSubarray(int[] arr) {

FILE: 1696-jump-game-vi/1696-jump-game-vi.java
  class Solution (line 1) | class Solution {
    method maxResult (line 2) | public int maxResult(int[] nums, int k) {

FILE: 17-letter-combinations-of-a-phone-number/17-letter-combinations-of-a-phone-number.java
  class Solution (line 1) | class Solution {
    method letterCombinations (line 3) | public List<String> letterCombinations(String digits) {
    method dfs (line 12) | public void dfs(String digits, int index, StringBuilder sb, List<Strin...

FILE: 1704-determine-if-string-halves-are-alike/1704-determine-if-string-halves-are-alike.java
  class Solution (line 1) | class Solution {
    method halvesAreAlike (line 2) | public boolean halvesAreAlike(String s) {
    method check (line 15) | public int check(char[] ch,int start,int end){

FILE: 1706-where-will-the-ball-fall/1706-where-will-the-ball-fall.java
  class Solution (line 1) | class Solution {
    method findBall (line 2) | public int[] findBall(int[][] grid) {
    method findBallDropColumn (line 10) | public int findBallDropColumn(int row, int col, int[][] grid) {

FILE: 1710-maximum-units-on-a-truck/1710-maximum-units-on-a-truck.java
  class Solution (line 1) | class Solution {
    method maximumUnits (line 2) | public int maximumUnits(int[][] boxTypes, int truckSize) {

FILE: 1721-swapping-nodes-in-a-linked-list/1721-swapping-nodes-in-a-linked-list.java
  class Solution (line 11) | class Solution {
    method swapNodes (line 12) | public ListNode swapNodes(ListNode head, int k) {

FILE: 173-binary-search-tree-iterator/173-binary-search-tree-iterator.java
  class BSTIterator (line 1) | class BSTIterator {
    method BSTIterator (line 5) | public BSTIterator(TreeNode root) {
    method next (line 9) | public int next() {
    method hasNext (line 15) | public boolean hasNext() {
    method pushLeft (line 19) | private void pushLeft(TreeNode root) {

FILE: 173-binary-search-tree-iterator/binary-search-tree-iterator.cpp
  class BSTIterator (line 2) | class BSTIterator {
    method BSTIterator (line 7) | BSTIterator(TreeNode* root) {
    method next (line 11) | int next() {
    method hasNext (line 18) | bool hasNext() {
    method addElements (line 22) | void addElements(TreeNode* node){

FILE: 1770 Maximum Score from Performing Multiplication Operations lc.cpp
  class Solution (line 4) | class Solution {
    method dfs (line 7) | int dfs(vector<int>& nums, vector<int>& mult, vector<vector<int>>& dp,...
    method maximumScore (line 19) | int maximumScore(vector<int>& nums, vector<int>& multipliers) {

FILE: 1770-maximum-score-from-performing-multiplication-operations/1770-maximum-score-from-performing-multiplication-operations.java
  class Solution (line 1) | class Solution {
    method maximumScore (line 2) | public int maximumScore(int[] nums, int[] multipliers) {

FILE: 179-Largest Number.java
  class Solution (line 7) | class Solution {
    method largestNumber (line 8) | public String largestNumber(int[] nums) {

FILE: 1791. Find Center of Star Graph.java
  class Solution (line 1) | class Solution {
    method findCenter (line 2) | public int findCenter(int[][] edges) {

FILE: 1832-check-if-the-sentence-is-pangram/1832-check-if-the-sentence-is-pangram.java
  class Solution (line 1) | class Solution {
    method checkIfPangram (line 2) | public boolean checkIfPangram(String sentence) {

FILE: 1833-maximum-ice-cream-bars/1833-maximum-ice-cream-bars.java
  class Solution (line 1) | class Solution {
    method maxIceCream (line 2) | public int maxIceCream(int[] costs, int coins) {

FILE: 1834-single-threaded-cpu/1834-single-threaded-cpu.java
  class Solution (line 1) | class Solution {
    method getOrder (line 2) | public int[] getOrder(int[][] tasks) {

FILE: 188-best-time-to-buy-and-sell-stock-iv/188-best-time-to-buy-and-sell-stock-iv.java
  class Solution (line 1) | class Solution {
    method maxProfit (line 4) | public int maxProfit(int k, int[] prices) {
    method DP (line 8) | private int DP(int[] prices, int k) {

FILE: 188. Best Time to Buy and Sell Stock IV.cpp
  class Solution (line 1) | class Solution {
    method maxProfit (line 3) | int maxProfit(int k, vector<int>& prices) {

FILE: 19-remove-nth-node-from-end-of-list/19-remove-nth-node-from-end-of-list.java
  class Solution (line 11) | class Solution {
    method removeNthFromEnd (line 12) | public ListNode removeNthFromEnd(ListNode head, int n) {

FILE: 191-number-of-1-bits/191-number-of-1-bits.java
  class Solution (line 1) | public class Solution {
    method hammingWeight (line 2) | public int hammingWeight(int n) {

FILE: 1926-nearest-exit-from-entrance-in-maze/1926-nearest-exit-from-entrance-in-maze.java
  class Solution (line 1) | class Solution {
    method nearestExit (line 2) | public int nearestExit(char[][] maze, int[] entrance) {

FILE: 1962-remove-stones-to-minimize-the-total/1962-remove-stones-to-minimize-the-total.java
  class Solution (line 1) | public class Solution {
    method minStoneSum (line 2) | public int minStoneSum(int[] piles, int k) {

FILE: 1971-find-if-path-exists-in-graph/1971-find-if-path-exists-in-graph.java
  class Solution (line 1) | class Solution {
    method validPath (line 2) | public boolean validPath(int n, int[][] edges, int start, int end) {

FILE: 199-binary-tree-right-side-view/199-binary-tree-right-side-view.java
  class Solution (line 16) | class Solution {
    method rightSideView (line 17) | public List<Integer> rightSideView(TreeNode root) {
    method rightView (line 23) | void rightView(TreeNode root,List<Integer> list,int level){

FILE: 1991-find-the-middle-index-in-array/1991-find-the-middle-index-in-array.java
  class Solution (line 1) | class Solution {
    method findMiddleIndex (line 2) | public int findMiddleIndex(int[] nums) {

FILE: 1996-the-number-of-weak-characters-in-the-game/1996-the-number-of-weak-characters-in-the-game.cpp
  class Solution (line 4) | class Solution{
    method numberOfWeakCharacters (line 13) | int numberOfWeakCharacters(vector<vector<int>>& properties){

FILE: 1996-the-number-of-weak-characters-in-the-game/1996-the-number-of-weak-characters-in-the-game.java
  class Solution (line 1) | class Solution {
    method numberOfWeakCharacters (line 2) | public int numberOfWeakCharacters(int[][] prop) {
    method numberOfWeakCharacters (line 39) | public int numberOfWeakCharacters(int[][] properties) {
  class Solution (line 38) | class Solution {
    method numberOfWeakCharacters (line 2) | public int numberOfWeakCharacters(int[][] prop) {
    method numberOfWeakCharacters (line 39) | public int numberOfWeakCharacters(int[][] properties) {

FILE: 200-number-of-islands/200-number-of-islands.java
  class Solution (line 1) | class Solution {
    method numIslands (line 2) | public int numIslands(char[][] grid) {
    method dfs (line 16) | public void dfs(char[][]grid,int i,int j){

FILE: 2007 Find Original Array From Doubled Array lc.cpp
  class Solution (line 1) | class Solution {
    method findOriginalArray (line 3) | vector<int> findOriginalArray(vector<int>& changed) {

FILE: 2007-find-original-array-from-doubled-array/2007-find-original-array-from-doubled-array.java
  class Solution (line 15) | class Solution {
    method findOriginalArray (line 16) | public int[] findOriginalArray(int[] c) {
    method findOriginalArray (line 45) | public int[] findOriginalArray(int[] changed) {
    method findOriginalArray (line 68) | public int[] findOriginalArray(int[] changed) {
  class Solution (line 44) | class Solution {
    method findOriginalArray (line 16) | public int[] findOriginalArray(int[] c) {
    method findOriginalArray (line 45) | public int[] findOriginalArray(int[] changed) {
    method findOriginalArray (line 68) | public int[] findOriginalArray(int[] changed) {
  class Solution (line 67) | class Solution {
    method findOriginalArray (line 16) | public int[] findOriginalArray(int[] c) {
    method findOriginalArray (line 45) | public int[] findOriginalArray(int[] changed) {
    method findOriginalArray (line 68) | public int[] findOriginalArray(int[] changed) {

FILE: 2095-delete-the-middle-node-of-a-linked-list/2095-delete-the-middle-node-of-a-linked-list.java
  class Solution (line 11) | class Solution {
    method deleteMiddle (line 12) | public ListNode deleteMiddle(ListNode head) {

FILE: 2131-longest-palindrome-by-concatenating-two-letter-words/2131-longest-palindrome-by-concatenating-two-letter-words.java
  class Solution (line 1) | class Solution {
    method longestPalindrome (line 2) | public int longestPalindrome(String[] words) {

FILE: 2136-earliest-possible-day-of-full-bloom/2136-earliest-possible-day-of-full-bloom.java
  class Solution (line 1) | class Solution {
    class Pair (line 2) | class Pair{
      method Pair (line 5) | Pair(int a,int b){
    method earliestFullBloom (line 10) | public int earliestFullBloom(int[] plantTime, int[] growTime) {

FILE: 215-kth-largest-element-in-an-array/215-kth-largest-element-in-an-array.java
  class Solution (line 1) | class Solution {
    method findKthLargest (line 2) | public int findKthLargest(int[] nums, int k) {

FILE: 216-combination-sum-iii/216-combination-sum-iii.java
  class Solution (line 1) | class Solution {
    method combinationSum3 (line 2) | public List<List<Integer>> combinationSum3(int k, int n) {
    method back (line 8) | void back(List<List<Integer>> res,List<Integer> out,int currSize,int n...

FILE: 218-the-skyline-problem/218-the-skyline-problem.java
  class Solution (line 1) | class Solution {
    class KeyPoint (line 2) | class KeyPoint {
      method KeyPoint (line 7) | public KeyPoint(int key, int height) {
    method getSkyline (line 13) | public List<List<Integer>> getSkyline(int[][] buildings) {

FILE: 2225-find-players-with-zero-or-one-losses/2225-find-players-with-zero-or-one-losses.java
  class Solution (line 1) | class Solution {
    method findWinners (line 2) | public List<List<Integer>> findWinners(int[][] matches) {

FILE: 2244-minimum-rounds-to-complete-all-tasks/2244-minimum-rounds-to-complete-all-tasks.java
  class Solution (line 1) | class Solution {
    method minimumRounds (line 2) | public int minimumRounds(int[] tasks) {

FILE: 2246-longest-path-with-different-adjacent-characters/2246-longest-path-with-different-adjacent-characters.java
  class Solution (line 1) | class Solution {
    method dfs (line 4) | public int dfs(int currentNode, Map<Integer, List<Integer>> children, ...
    method longestPath (line 36) | public int longestPath(int[] parent, String s) {

FILE: 225-implement-stack-using-queues/225-implement-stack-using-queues.java
  class MyStack (line 1) | class MyStack {
    method MyStack (line 4) | public MyStack() {
    method push (line 10) | public void push(int x) {
    method pop (line 18) | public int pop() {
    method top (line 36) | public int top() {
    method empty (line 56) | public boolean empty() {

FILE: 2256-minimum-average-difference/2256-minimum-average-difference.java
  class Solution (line 1) | class Solution {
    method minimumAverageDifference (line 2) | public int minimumAverageDifference(int[] nums) {

FILE: 2279-maximum-bags-with-full-capacity-of-rocks/2279-maximum-bags-with-full-capacity-of-rocks.java
  class Solution (line 1) | class Solution {
    method maximumBags (line 2) | public int maximumBags(int[] capacity, int[] rocks, int x) {

FILE: 23-Merge-k-Sorted-Lists/23-Merge-k-Sorted-Lists.cpp
  class Solution (line 1) | class Solution {
    method ListNode (line 3) | ListNode* mergeKLists(vector<ListNode*>& lists) {

FILE: 230-kth-smallest-element-in-a-bst/230-kth-smallest-element-in-a-bst.java
  class Solution (line 16) | class Solution {
    method kthSmallest (line 19) | public int kthSmallest(TreeNode root, int k) {
    method dfs (line 23) | public void dfs(TreeNode root,int k){

FILE: 234-palindrome-linked-list/234-palindrome-linked-list.java
  class Solution (line 11) | class Solution {
    method isPalindrome (line 12) | public boolean isPalindrome(ListNode head) {

FILE: 234-palindrome-linked-list/234-palindrome-linked-list.py
  class Solution (line 6) | class Solution:
    method isPalindrome (line 7) | def isPalindrome(self, head: Optional[ListNode]) -> bool:

FILE: 234-palindrome-linked-list/palindrome-linked-list.cpp
  class Solution (line 1) | class Solution {
    method isPalindrome (line 3) | bool isPalindrome(ListNode* head) {

FILE: 234. Palindrome Linked List/SolutionCode.cpp
  class Solution (line 8) | class Solution {
    method ListNode (line 10) | ListNode* reverseNode(ListNode* head){
    method isPalindrome (line 23) | bool isPalindrome(ListNode* head) {

FILE: 235-lowest-common-ancestor-of-a-binary-search-tree/235-lowest-common-ancestor-of-a-binary-search-tree.java
  class Solution (line 1) | class Solution {
    method lowestCommonAncestor (line 2) | public TreeNode lowestCommonAncestor(TreeNode root, TreeNode p, TreeNo...

FILE: 235-lowest-common-ancestor-of-a-binary-search-tree/235-lowest-common-ancestor-of-a-binary-search-tree.py
  class Solution (line 8) | class Solution:
    method lowestCommonAncestor (line 9) | def lowestCommonAncestor(self, root: 'TreeNode', p: 'TreeNode', q: 'Tr...

FILE: 236-lowest-common-ancestor-of-a-binary-tree/236-lowest-common-ancestor-of-a-binary-tree.java
  class Solution (line 1) | class Solution {
    method lowestCommonAncestor (line 2) | public TreeNode lowestCommonAncestor(TreeNode root, TreeNode p, TreeNo...

FILE: 237-delete-node-in-a-linked-list/237-delete-node-in-a-linked-list.java
  class Solution (line 9) | class Solution {
    method deleteNode (line 10) | public void deleteNode(ListNode node) {

FILE: 2389-longest-subsequence-with-limited-sum/2389-longest-subsequence-with-limited-sum.java
  class Solution (line 1) | class Solution {
    method answerQueries (line 2) | public int[] answerQueries(int[] nums, int[] queries) {

FILE: 2389_longest_subsequence_with_limited_sum.cpp
  class Solution (line 1) | class Solution {
    method answerQueries (line 3) | vector<int> answerQueries(vector<int>& n, vector<int>& q) {

FILE: 2390_removing_stars_from_a_string.cpp
  class Solution (line 1) | class Solution {
    method string (line 3) | string removeStars(string s) {

FILE: 2395_Find_Subarrays_With_Equal_Sum.cpp
  class Solution (line 1) | class Solution {
    method findSubarrays (line 3) | bool findSubarrays(vector<int>& nums) {

FILE: 240-search-a-2d-matrix-ii/240-search-a-2d-matrix-ii.java
  class Solution (line 1) | class Solution {
    method searchMatrix (line 2) | public boolean searchMatrix(int[][] matrix, int target) {

FILE: 242-valid-anagram/242-valid-anagram.java
  class Solution (line 1) | class Solution {
    method isAnagram (line 2) | public boolean isAnagram(String s, String t) {

FILE: 2421-number-of-good-paths/2421-number-of-good-paths.java
  class UnionFind (line 1) | class UnionFind {
    method UnionFind (line 5) | public UnionFind(int size) {
    method find (line 12) | public int find(int x) {
    method union_set (line 18) | public void union_set(int x, int y) {
  class Solution (line 33) | class Solution {
    method numberOfGoodPaths (line 34) | public int numberOfGoodPaths(int[] vals, int[][] edges) {

FILE: 2429-minimize-xor/2429-minimize-xor.cpp
  class Solution (line 1) | class Solution
    method minimizeXor (line 4) | int minimizeXor(int num1, int num2)

FILE: 2453-destroy-sequential-targets/2453-destroy-sequential-targets.java
  class Solution (line 1) | class Solution {
    method destroyTargets (line 2) | public int destroyTargets(int[] nums, int space) {

FILE: 268-missing-number/268-missing-number.java
  class Solution (line 1) | class Solution {
    method missingNumber (line 2) | public int missingNumber(int[] nums) {

FILE: 284-peeking-iterator/284-peeking-iterator.java
  class PeekingIterator (line 4) | class PeekingIterator implements Iterator<Integer> {
    method PeekingIterator (line 7) | public PeekingIterator(Iterator<Integer> iterator) {
    method peek (line 17) | public Integer peek() {
    method next (line 23) | @Override
    method hasNext (line 30) | @Override

FILE: 287-find-the-duplicate-number/287-find-the-duplicate-number.java
  class Solution (line 1) | class Solution {
    method findDuplicate (line 2) | public int findDuplicate(int[] nums) {

FILE: 289-game-of-life/289-game-of-life.java
  class Solution (line 1) | class Solution {
    method gameOfLife (line 2) | public void gameOfLife(int[][] board) {
    method getNebs (line 27) | public int getNebs(int[][]mat,int i,int j){

FILE: 29-divide-two-integers/29-divide-two-integers.java
  class Solution (line 1) | class Solution {
    method divide (line 2) | public int divide(int dividend, int divisor) {
    method count (line 25) | private int count(int a, int b) {

FILE: 3-longest-substring-without-repeating-characters/3-longest-substring-without-repeating-characters.java
  class Solution (line 1) | class Solution {
    method lengthOfLongestSubstring (line 2) | public int lengthOfLongestSubstring(String s) {

FILE: 30-substring-with-concatenation-of-all-words/30-substring-with-concatenation-of-all-words.java
  class Solution (line 1) | class Solution {
    method findSubstring (line 2) | public List<Integer> findSubstring(String str, String[] words) {

FILE: 30-substring-with-concatenation-of-all-words/30-substring-with-concatenation-of-all-words.py
  class Solution (line 1) | class Solution:
    method findSubstring (line 2) | def findSubstring(self, s: str, words: List[str]) -> List[int]:

FILE: 300-longest-increasing-subsequence/300-longest-increasing-subsequence.java
  class Solution (line 1) | class Solution {
    method lengthOfLIS (line 2) | public int lengthOfLIS(int[] nums) {

FILE: 304-range-sum-query-2d-immutable/304-range-sum-query-2d-immutable.java
  class NumMatrix (line 1) | class NumMatrix {
    method NumMatrix (line 4) | public NumMatrix(int[][] matrix) {
    method sumRegion (line 20) | public int sumRegion(int row1, int col1, int row2, int col2) {

FILE: 307-range-sum-query-mutable/307-range-sum-query-mutable.java
  class NumArray (line 1) | class NumArray {
    class SegmentTreeNode (line 2) | class SegmentTreeNode {
      method SegmentTreeNode (line 7) | public SegmentTreeNode(int start, int end) {
    method NumArray (line 18) | public NumArray(int[] nums) {
    method buildTree (line 22) | private SegmentTreeNode buildTree(int[] nums, int start, int end) {
    method update (line 39) | void update(int i, int val) {
    method update (line 43) | void update(SegmentTreeNode root, int pos, int val) {
    method sumRange (line 57) | public int sumRange(int i, int j) {
    method sumRange (line 61) | public int sumRange(SegmentTreeNode root, int start, int end) {

FILE: 31-next-permutation/31-next-permutation.java
  class Solution (line 1) | class Solution {
    method nextPermutation (line 2) | public void nextPermutation(int[] a) {
    method reverse (line 25) | public void reverse(int[]a,int i,int j){

FILE: 31-next-permutation/nextPurmutation.cpp
  class Solution (line 18) | class Solution {
    method findIfMidExists (line 20) | int findIfMidExists(vector<int>& nums, int t){
    method nextPermutation (line 29) | void nextPermutation(vector<int>& nums) {

FILE: 315-count-of-smaller-numbers-after-self/315-count-of-smaller-numbers-after-self.java
  class Solution (line 1) | class Solution {
    method countSmaller (line 2) | public List<Integer> countSmaller(int[] nums) {
    method dfs (line 17) | int dfs(List<Integer> arr,int ele){

FILE: 316-remove-duplicate-letters/316-remove-duplicate-letters.java
  class Solution (line 1) | class Solution {
    method removeDuplicateLetters (line 2) | public String removeDuplicateLetters(String s) {

FILE: 318-maximum-product-of-word-lengths/318-maximum-product-of-word-lengths.java
  class Solution (line 1) | class Solution {
    method maxProduct (line 2) | public int maxProduct(String[] words) {

FILE: 32-longest-valid-parentheses/32-longest-valid-parentheses.java
  class Solution (line 1) | public class Solution {
    method longestValidParentheses (line 2) | public int longestValidParentheses(String s) {

FILE: 322-coin-change/322-coin-change.java
  class Solution (line 1) | class Solution {
    method coinChange (line 2) | public int coinChange(int[] coins, int amount) {

FILE: 326-power-of-three/326-power-of-three.java
  class Solution (line 1) | public class Solution {
    method isPowerOfThree (line 2) | public boolean isPowerOfThree(int n) {

FILE: 326-power-of-three/326_Power_of_three.cpp
  class Solution (line 1) | class Solution {
    method isPowerOfThree (line 3) | bool isPowerOfThree(int n) {

FILE: 329-longest-increasing-path-in-a-matrix/329-longest-increasing-path-in-a-matrix.java
  class Solution (line 1) | class Solution {
    method longestIncreasingPath (line 4) | public int longestIncreasingPath(int[][] matrix) {
    method dfs (line 16) | private int dfs(int x, int y) {

FILE: 33-search-in-rotated-sorted-array/33-search-in-rotated-sorted-array.java
  class Solution (line 1) | class Solution {
    method search (line 2) | public int search(int[] nums, int target) {

FILE: 336-palindrome-pairs/336-palindrome-pairs.java
  class Solution (line 1) | class Solution {
    method palindromePairs (line 2) | public List<List<Integer>> palindromePairs(String[] words) {
    method isPal (line 32) | boolean isPal(String s){

FILE: 34-find-first-and-last-position-of-element-in-sorted-array/34-find-first-and-last-position-of-element-in-sorted-array.java
  class Solution (line 1) | class Solution {
    method searchRange (line 2) | public int[] searchRange(int[] nums, int target) {
    method dfs (line 13) | void dfs(int[]nums,int target,int[]ans,int l,int h){

FILE: 341-flatten-nested-list-iterator/341-flatten-nested-list-iterator.java
  class NestedIterator (line 1) | public class NestedIterator implements Iterator<Integer> {
    method NestedIterator (line 6) | public NestedIterator(List<NestedInteger> nestedList) {
    method worker (line 11) | void worker(List<NestedInteger> node) {
    method next (line 24) | @Override
    method hasNext (line 31) | @Override

FILE: 342-power-of-four/342-power-of-four.java
  class Solution (line 1) | class Solution {
    method isPowerOfFour (line 2) | public boolean isPowerOfFour(int n) {

FILE: 342-power-of-four/power of four.cpp
  function isPowerOfFour (line 1) | bool isPowerOfFour(int n) {

FILE: 344-reverse-string/344-reverse-string.java
  class Solution (line 1) | class Solution {
    method reverseString (line 2) | public void reverseString(char[] s) {

FILE: 347-top-k-frequent-elements/347-top-k-frequent-elements.cpp
  class Solution (line 1) | class Solution {
    method topKFrequent (line 3) | vector<int> topKFrequent(vector<int>& nums, int k) {

FILE: 347-top-k-frequent-elements/347-top-k-frequent-elements.java
  class Solution (line 1) | class Solution {
    method topKFrequent (line 2) | public int[] topKFrequent(int[] nums, int k) {

FILE: 354-russian-doll-envelopes/354-russian-doll-envelopes.java
  class Solution (line 1) | public class Solution {
    method maxEnvelopes (line 2) | public int maxEnvelopes(int[][] envelopes) {
    class EnvelopeComparator (line 25) | class EnvelopeComparator implements Comparator<int[]> {
      method compare (line 26) | public int compare(int[] e1, int[] e2) {

FILE: 363-max-sum-of-rectangle-no-larger-than-k/363-max-sum-of-rectangle-no-larger-than-k.cpp
  class Solution (line 2) | class Solution {
    method maxSumSubmatrix (line 4) | int maxSumSubmatrix(vector<vector<int>>& mat, int k) {

FILE: 363-max-sum-of-rectangle-no-larger-than-k/363-max-sum-of-rectangle-no-larger-than-k.java
  class Solution (line 1) | class Solution {
    method maxSumSubmatrix (line 2) | public int maxSumSubmatrix(int[][] mat, int k) {

FILE: 37-Sudoku-solver/37-Sudoku-solver.js
  function isValid (line 3) | function isValid(grid, row, col, k) {
  function solve (line 15) | function solve(grid) {

FILE: 371-sum-of-two-integers/371-sum-of-two-integers.java
  class Solution (line 1) | class Solution {
    method getSum (line 2) | public int getSum(int a, int b) {

FILE: 376-wiggle-subsequence/376-wiggle-subsequence.java
  class Solution (line 1) | public class Solution {
    method wiggleMaxLength (line 2) | public int wiggleMaxLength(int[] nums) {

FILE: 377-combination-sum-iv/377-combination-sum-iv.java
  class Solution (line 1) | class Solution {
    method combinationSum4 (line 4) | public int combinationSum4(int[] nums, int target) {
    method helper (line 11) | private int helper(int[] nums, int target) {

FILE: 378-kth-smallest-element-in-a-sorted-matrix/378-kth-smallest-element-in-a-sorted-matrix.java
  class Solution (line 1) | class Solution {
    method kthSmallest (line 2) | public int kthSmallest(int[][] mat, int k) {

FILE: 383-ransom-note/383-ransom-note.java
  class Solution (line 1) | class Solution {
    method canConstruct (line 2) | public boolean canConstruct(String ransomNote, String magazine) {

FILE: 383-ransom-note/ransom-note.cpp
  class Solution (line 1) | class Solution {
    method canConstruct (line 3) | bool canConstruct(string ransomNote, string magazine) {

FILE: 383-ransom-note/ransome-note-two-approaches.cpp
  class Solution (line 1) | class Solution {
    method canConstruct (line 3) | bool canConstruct(string rn, string mag) {

FILE: 387-first-unique-character-in-a-string/387-first-unique-character-in-a-string.java
  class Solution (line 1) | class Solution {
    method firstUniqChar (line 2) | public int firstUniqChar(String s) {

FILE: 387-first-unique-character-in-a-string/first-unique-character-in-a-string.CPP
  function firstUniqChar (line 1) | int firstUniqChar(string s) {

FILE: 393-utf-8-validation/393-utf-8-validation.java
  class Solution (line 1) | class Solution {
    method validUtf8 (line 2) | public boolean validUtf8(int[] data)
    method validUtf8 (line 35) | public boolean validUtf8(int[] data) {
  class Solution (line 34) | class Solution {
    method validUtf8 (line 2) | public boolean validUtf8(int[] data)
    method validUtf8 (line 35) | public boolean validUtf8(int[] data) {

FILE: 399-evaluate-division/399-evaluate-division.java
  class Solution (line 1) | class Solution {
    class Node (line 2) | class Node{
      method Node (line 5) | Node(String k,double v){
    method calcEquation (line 10) | public double[] calcEquation(List<List<String>> equations, double[] va...
    method dfs (line 18) | private double dfs(String s,String d,Set<String> vis,Map<String,List<N...
    method buildGraph (line 30) | private Map<String,List<Node>> buildGraph(List<List<String>> eq,double...

FILE: 4-median-of-two-sorted-arrays/4-median-of-two-sorted-arrays.java
  class Solution (line 1) | class Solution {
    method findMedianSortedArrays (line 2) | public double findMedianSortedArrays(int[] nums1, int[] nums2) {

FILE: 406-queue-reconstruction-by-height/406-queue-reconstruction-by-height.java
  class Solution (line 1) | class Solution {
    method reconstructQueue (line 2) | public int[][] reconstructQueue(int[][] people) {

FILE: 410-split-array-largest-sum/410-split-array-largest-sum.java
  class Solution (line 1) | class Solution {
    method splitArray (line 2) | public int splitArray(int[] nums, int m) {
    method canSplit (line 23) | private boolean canSplit(int[] nums, int m, int largest) {

FILE: 417-pacific-atlantic-water-flow/417-pacific-atlantic-water-flow.java
  class Solution (line 1) | class Solution {
    method pacificAtlantic (line 2) | public List<List<Integer>> pacificAtlantic(int[][] heights) {
    method dfs (line 23) | private void dfs(int row, int col, int rows, int cols, boolean[][] vis...

FILE: 417_Pacific Atlantic Water Flow.cpp
  class Solution (line 3) | class Solution{
    method pacificAtlantic (line 11) | vector<vector<int> > pacificAtlantic(vector<vector<int>>& heights) {
    method dfs (line 23) | void dfs(vector<vector<int> >& mat, vector<vector<bool> >& visited, in...
  function main (line 35) | int main(){

FILE: 42 Trapping Rain Water hd s18.cpp
  class Solution (line 4) | class Solution {
    method trap (line 6) | int trap(vector<int>& height) {

FILE: 42-trapping-rain-water/42-trapping-rain-water.java
  class Solution (line 1) | class Solution {
    method trap (line 2) | public int trap(int[] h) {

FILE: 429-n-ary-tree-level-order-traversal/429-n-ary-tree-level-order-traversal.cpp
  class Solution (line 1) | class Solution {
    method levelOrder (line 3) | vector<vector<int>> levelOrder(Node* root) {

FILE: 429-n-ary-tree-level-order-traversal/429-n-ary-tree-level-order-traversal.java
  class Solution (line 20) | class Solution {
    method levelOrder (line 21) | public List<List<Integer>> levelOrder(Node root) {
    method levelOrder (line 47) | public List<List<Integer>> levelOrder(Node root) {
  class Solution (line 46) | class Solution {
    method levelOrder (line 21) | public List<List<Integer>> levelOrder(Node root) {
    method levelOrder (line 47) | public List<List<Integer>> levelOrder(Node root) {

FILE: 456-132-pattern/456-132-pattern.java
  class Solution (line 1) | class Solution {
    method find132pattern (line 2) | public boolean find132pattern(int[] nums) {

FILE: 458-poor-pigs/458-poor-pigs.java
  class Solution (line 1) | class Solution {
    method poorPigs (line 2) | public int poorPigs(int buckets, int minutesToDie, int minutesToTest) {

FILE: 462-minimum-moves-to-equal-array-elements-ii/462-minimum-moves-to-equal-array-elements-ii.java
  class Solution (line 1) | class Solution {
    method minMoves2 (line 2) | public int minMoves2(int[] nums) {

FILE: 47-permutations-ii/47-permutations-ii.java
  class Solution (line 1) | class Solution {
    method permuteUnique (line 6) | public List<List<Integer>> permuteUnique(int[] nums) {
    method permuteUnique (line 14) | private void permuteUnique(int[] nums, List<Integer> list) {

FILE: 473-matchsticks-to-square/473-matchsticks-to-square.java
  class Solution (line 3) | class Solution {
    method Solution (line 15) | public Solution() {
    method recurse (line 20) | public boolean recurse(Integer mask, Integer sidesDone) {
    method makesquare (line 71) | public boolean makesquare(int[] nums) {

FILE: 474-ones-and-zeroes/474-ones-and-zeroes.java
  class Solution (line 1) | class Solution {
    method findMaxForm (line 2) | public static int findMaxForm(String[] strs, int m, int n) {

FILE: 48-rotate-image/48-Rotate-Image.cpp
  class Solution (line 1) | class Solution {
    method rotate (line 3) | void rotate(vector<vector<int>>& mat) {

FILE: 48-rotate-image/48-rotate-image.java
  class Solution (line 1) | class Solution {
    method rotate (line 2) | public void rotate(int[][] matrix) {

FILE: 5-longest-palindromic-substring/5-longest-palindromic-substring.java
  class Solution (line 1) | class Solution {
    method longestPalindrome (line 2) | public String longestPalindrome(String s) {

FILE: 50-powx-n/50-powx-n.java
  class Solution (line 1) | class Solution {
    method myPow (line 2) | public double myPow(double x, int n) {

FILE: 509-fibonacci-number/509-fibonacci-number.java
  class Solution (line 1) | class Solution{
    method multiply (line 3) | long[][] multiply(long [][]m1, long[][]m2){
    method matPow (line 12) | long[][] matPow(long [][]mat,long n){
    method fib (line 20) | public int fib(int N){

FILE: 51-n-queens/51-n-queens.java
  class Solution (line 1) | class Solution {
    method solveNQueens (line 2) | public List<List<String>> solveNQueens(int n) {
    method solve (line 14) | public static void solve(List<List<String>> res, int col, char[][] boa...
    method construct (line 36) | public static List<String> construct(char[][] board){

FILE: 52-n-queens-ii/52-n-queens-ii.java
  class Solution (line 1) | class Solution {
    method totalNQueens (line 3) | public int totalNQueens(int n) {
    method dfs (line 8) | public void dfs(boolean[][]board,int row){
    method isSafe (line 21) | boolean isSafe(boolean[][] board,int row,int col){

FILE: 53-maximum-subarray/53-maximum-subarray.java
  class Solution (line 1) | class Solution {
    method maxSubArray (line 2) | public int maxSubArray(int[] nums) {

FILE: 53-maximum-subarray/Maximum Subarray.py
  class Solution (line 1) | class Solution:
    method maxSubArray (line 2) | def maxSubArray(self, nums: List[int]) -> int:

FILE: 535-encode-and-decode-tinyurl/535-encode-and-decode-tinyurl.java
  class Codec (line 1) | public class Codec {
    method encode (line 4) | public String encode(String s) {
    method decode (line 9) | public String decode(String s) {

FILE: 538-convert-bst-to-greater-tree/538-convert-bst-to-greater-tree.java
  class Solution (line 1) | class Solution {
    method convertBST (line 3) | public TreeNode convertBST(TreeNode root) {

FILE: 541-reverse-string-ii/541-reverse-string-ii.java
  class Solution (line 1) | class Solution {
    method reverseStr (line 2) | public String reverseStr(String s, int k) {

FILE: 557 Reverse Words in a String III easy lc s22.cpp
  class Solution (line 4) | class Solution {
    method string (line 8) | string reverseWords(string s) {

FILE: 557-reverse-words-in-a-string-iii/557-reverse-words-in-a-string-iii.java
  class Solution (line 1) | class Solution {
    method reverseWords (line 2) | public String reverseWords(String sy) {

FILE: 560. Subarray Sum Equals K/560. Subarray Sum Equals K.cpp
  class Solution (line 1) | class Solution {
    method subarraySum (line 3) | int subarraySum(vector<int>& nums, int k) {

FILE: 576-out-of-boundary-paths/576-out-of-boundary-paths.java
  class Solution (line 1) | class Solution {
    method findPaths (line 4) | public int findPaths(int m, int n, int maxMove, int startRow, int star...
    method f (line 13) | int f(int m, int n, int max, int r, int c) {

FILE: 581-shortest-unsorted-continuous-subarray/581-shortest-unsorted-continuous-subarray.java
  class Solution (line 1) | public class Solution {
    method findUnsortedSubarray (line 2) | public int findUnsortedSubarray(int[] nums) {

FILE: 583-delete-operation-for-two-strings/583-delete-operation-for-two-strings.java
  class Solution (line 1) | class Solution {
    method minDistance (line 2) | public int minDistance(String word1, String word2) {

FILE: 59-spiral-matrix-ii/59-spiral-matrix-ii.java
  class Solution (line 1) | class Solution {
    method generateMatrix (line 2) | public int[][] generateMatrix(int n) {
    method fillMatrix (line 9) | public void fillMatrix(int [][]ans, int i, int j, int cur, char dir){

FILE: 6-zigzag-conversion/6-zigzag-conversion.java
  class Solution (line 1) | class Solution {
    method convert (line 2) | public String convert(String s, int numRows) {

FILE: 606-construct-string-from-binary-tree/606-construct-string-from-binary-tree.java
  class Solution (line 16) | class Solution {
    method tree2str (line 18) | public String tree2str(TreeNode root) {
    method dfs (line 23) | public void dfs(TreeNode root){

FILE: 609 Find Duplicate File in System lc med s19.cpp
  class Solution (line 4) | class Solution {
    method split (line 6) | vector<string> split(string str, char delim) {
    method findDuplicate (line 14) | vector<vector<string>> findDuplicate(vector<string>& paths) {

FILE: 609-find-duplicate-file-in-system/609-find-duplicate-file-in-system.java
  class Solution (line 1) | class Solution {
    method findDuplicate (line 2) | public List<List<String>> findDuplicate(String[] paths) {

FILE: 62-unique-paths/62-unique-paths.java
  class Solution (line 1) | class Solution {
    method uniquePaths (line 2) | public int uniquePaths(int m, int n) {
    method helper (line 6) | private int helper(int m, int n, int[][] dp) {

FILE: 622-design-circular-queue/622-design-circular-queue.java
  class MyCircularQueue (line 1) | class MyCircularQueue {
    method MyCircularQueue (line 9) | public MyCircularQueue(int k) {
    method enQueue (line 14) | public boolean enQueue(int value) {
    method deQueue (line 23) | public boolean deQueue()
    method Front (line 33) | public int Front() {
    method Rear (line 39) | public int Rear() {
    method isEmpty (line 45) | public boolean isEmpty() {
    method isFull (line 49) | public boolean isFull() {

FILE: 623-add-one-row-to-tree/623-add-one-row-to-tree.java
  class Solution (line 16) | class Solution {
    method addOneRow (line 17) | public TreeNode addOneRow(TreeNode root, int val, int depth) {
    method dfs (line 26) | public void dfs(TreeNode root,int val,int depth){

FILE: 629-k-inverse-pairs-array/629-k-inverse-pairs-array.java
  class Solution (line 1) | public class Solution {
    method kInversePairs (line 2) | public int kInversePairs(int n, int k) {

FILE: 63-unique-paths-ii/63-unique-paths-ii.java
  class Solution (line 1) | class Solution {
    method uniquePathsWithObstacles (line 2) | public int uniquePathsWithObstacles(int[][] a) {

FILE: 630-course-schedule-iii/630-course-schedule-iii.java
  class Solution (line 1) | public class Solution {
    method scheduleCourse (line 2) | public int scheduleCourse(int[][] courses) {

FILE: 637-average-of-levels-in-binary-tree.py
  class Solution (line 1) | class Solution:
    method averageOfLevels (line 2) | def averageOfLevels(self, root: Optional[TreeNode]) -> List[float]:

FILE: 637-average-of-levels-in-binary-tree/637-average-of-levels-in-binary-tree.cpp
  class Solution (line 1) | class Solution {
    method averageOfLevels (line 3) | vector<double> averageOfLevels(TreeNode* root) {

FILE: 637-average-of-levels-in-binary-tree/637-average-of-levels-in-binary-tree.java
  class Solution (line 16) | class Solution {
    method averageOfLevels (line 17) | public List<Double> averageOfLevels(TreeNode root) {

FILE: 647-palindromic-substrings/647-palindromic-substrings.java
  class Solution (line 1) | class Solution {
    method countSubstrings (line 2) | public int countSubstrings(String s) {

FILE: 653-two-sum-iv-input-is-a-bst/653-two-sum-iv-input-is-a-bst.java
  class Solution (line 1) | public class Solution {
    method findTarget (line 2) | public boolean findTarget(TreeNode root, int k) {
    method dfs (line 5) | private boolean dfs(TreeNode root, TreeNode cur, int target) {
    method search (line 11) | private boolean search(TreeNode root, TreeNode cur, int target) {

FILE: 658-find-k-closest-elements/658-find-k-closest-elements.java
  class Solution (line 1) | class Solution {
    method findClosestElements (line 2) | public List<Integer> findClosestElements(int[] arr, int k, int x) {
    method binSea (line 30) | public int binSea(int[]arr,int x){

FILE: 659-split-array-into-consecutive-subsequences/659-split-array-into-consecutive-subsequences.cpp
  class Solution (line 1) | class Solution {
    method isPossible (line 3) | bool isPossible(vector<int>& nums) {

FILE: 659-split-array-into-consecutive-subsequences/659-split-array-into-consecutive-subsequences.java
  class Solution (line 1) | class Solution {
    method isPossible (line 2) | public boolean isPossible(int[] nums) {

FILE: 665-non-decreasing-array/665-non-decreasing-array.java
  class Solution (line 1) | class Solution {
    method checkPossibility (line 2) | public boolean checkPossibility(int[] arr) {
    method helper (line 21) | public int helper(int[] arr) {

FILE: 669-trim-a-binary-search-tree/669-trim-a-binary-search-tree.java
  class Solution (line 16) | class Solution {
    method trimBST (line 17) | public TreeNode trimBST(TreeNode root, int low, int high) {

FILE: 680-valid-palindrome-ii/680-valid-palindrome-ii.java
  class Solution (line 1) | class Solution {
    method validPalindrome (line 2) | public boolean validPalindrome(String s) {
    method valid (line 19) | boolean valid(byte[] chars, int i, int j) {

FILE: 682-baseball-game/682-baseball-game.java
  class Solution (line 1) | class Solution {
    method calPoints (line 2) | public int calPoints(String[] ops) {

FILE: 695-max-area-of-island/695-max-area-of-island.java
  class Solution (line 1) | class Solution {
    method maxAreaOfIsland (line 2) | public int maxAreaOfIsland(int[][] grid) {
    method iarea (line 16) | public static int iarea(int [][]grid,int i,int j){

FILE: 695-max-area-of-island/SolutionCode.cpp
  class Solution (line 14) | class Solution {
    method travelMap (line 16) | int travelMap(int r, int c, vector<vector<int>> &grid){
    method maxAreaOfIsland (line 34) | int maxAreaOfIsland(vector<vector<int>>& grid) {

FILE: 698-partition-to-k-equal-sum-subsets/698-partition-to-k-equal-sum-subsets.java
  class Solution (line 1) | class Solution {
    method canPartitionKSubsets (line 2) | public boolean canPartitionKSubsets(int[] arr, int k) {
    method dfs (line 11) | public boolean dfs(int ind,int[] arr,int[] sum, int k,int target){

FILE: 7 Segment Display.java
  class Solution (line 1) | class Solution {
    method sevenSegments (line 2) | static String sevenSegments(String S, int N) {

FILE: 70-climbing-stairs/70-climbing-stairs.java
  class Solution (line 1) | class Solution {
    method climbStairs (line 2) | public int climbStairs(int n) {

FILE: 700-search-in-a-binary-search-tree/700-search-in-a-binary-search-tree.java
  class Solution (line 16) | class Solution {
    method searchBST (line 17) | public TreeNode searchBST(TreeNode root, int val) {

FILE: 703-kth-largest-element-in-a-stream/703-kth-largest-element-in-a-stream.py
  class KthLargest (line 1) | class KthLargest:
    method __init__ (line 3) | def __init__(self, k: int, nums: List[int]):
    method add (line 8) | def add(self, val: int) -> int:

FILE: 704-binary-search/704-binary-search.java
  class Solution (line 1) | class Solution {
    method search (line 2) | public int search(int[] nums, int target) {

FILE: 705-design-hashset/705-design-hashset.java
  class MyHashSet (line 1) | class MyHashSet {
    method MyHashSet (line 3) | public MyHashSet() {
    method add (line 7) | public void add(int key) {
    method remove (line 11) | public void remove(int key) {
    method contains (line 15) | public boolean contains(int key) {

FILE: 706-design-hashmap/706-design-hashmap.java
  class MyHashMap (line 1) | class MyHashMap {
    method MyHashMap (line 3) | public MyHashMap() {
    method put (line 8) | public void put(int key, int value) {
    method get (line 12) | public int get(int key) {
    method remove (line 17) | public void remove(int key) {

FILE: 713_Subarray_Product_Less_Than_K.cpp
  class Solution (line 1) | class Solution {
    method numSubarrayProductLessThanK (line 3) | int numSubarrayProductLessThanK(vector<int>& n, int k) {

FILE: 718-Maximum-Length-of-Repeated-Subarray.cpp
  function findLength (line 1) | int findLength(vector<int>& nums1, vector<int>& nums2)

FILE: 718-maximum-length-of-repeated-subarray/718-maximum-length-of-repeated-subarray.java
  class Solution (line 3) | class Solution {
    method rolling (line 8) | private int[] rolling(int[] source, int length) {
    method check (line 25) | private boolean check(int guess, int[] A, int[] B) {
    method findLength (line 43) | public int findLength(int[] A, int[] B) {

FILE: 718-maximum-length-of-repeated-subarray/Solved Using DP.java
  class Solution (line 1) | class Solution {
    method findLength (line 2) | public int findLength(int[] nums1, int[] nums2) {

FILE: 718. Maximum Length of Repeated Subarray lc med s20.cpp
  class Solution (line 4) | class Solution {
    method findLength (line 6) | int findLength(vector<int>& nums1, vector<int>& nums2) {

FILE: 718. Maximum Length of Repeated Subarray/718. Maximum Length of Repeated Subarray.cpp
  class Solution (line 1) | class Solution {
    method findLength (line 3) | int findLength(vector<int>& nums1, vector<int>& nums2) {

FILE: 724-find-pivot-index/724-find-pivot-index.java
  class Solution (line 1) | class Solution {
    method pivotIndex (line 2) | public int pivotIndex(int[] nums) {

FILE: 729-my-calendar-i/729-my-calendar-i.java
  class MyCalendar (line 1) | class MyCalendar {
    class TreeNode (line 3) | class TreeNode{
      method TreeNode (line 8) | TreeNode(int start,int end){
    method MyCalendar (line 14) | public MyCalendar() {
    method book (line 18) | public boolean book(int start, int end) {
    method insert (line 26) | private boolean insert(TreeNode root, int start, int end){

FILE: 732-my-calendar-iii/732-my-calendar-iii.java
  class MyCalendarThree (line 1) | class MyCalendarThree {
    method MyCalendarThree (line 4) | public MyCalendarThree() {
    method book (line 8) | public int book(int start, int end) {

FILE: 74-search-a-2d-matrix/74-search-a-2d-matrix.java
  class Solution (line 1) | class Solution {
    method searchMatrix (line 3) | public boolean searchMatrix(int[][] matrix, int target) {
    method binarySearch (line 17) | public boolean binarySearch(int[][]matrix,int i){

FILE: 743-network-delay-time/743-network-delay-time.java
  class Solution (line 1) | class Solution {
    method networkDelayTime (line 2) | public int networkDelayTime(int[][] times, int n, int k) {

FILE: 745-prefix-and-suffix-search/745-prefix-and-suffix-search.java
  class WordFilter (line 1) | class WordFilter {
    method WordFilter (line 3) | public WordFilter(String[] words) {
    method f (line 20) | public int f(String prefix, String suffix) {
  class TrieNode (line 30) | class TrieNode {
    method TrieNode (line 33) | public TrieNode() {

FILE: 746-min-cost-climbing-stairs/746-min-cost-climbing-stairs.java
  class Solution (line 1) | class Solution {
    method minCostClimbingStairs (line 2) | public int minCostClimbingStairs(int[] cost) {

FILE: 76-minimum-window-substring/76-minimum-window-substring.java
  class Solution (line 1) | class Solution {
    method minWindow (line 2) | public String minWindow(String s, String t) {

FILE: 763-partition-labels/763-partition-labels.java
  class Solution (line 1) | class Solution {
    method partitionLabels (line 2) | public List<Integer> partitionLabels(String s) {

FILE: 785-is-graph-bipartite/785-is-graph-bipartite.java
  class Solution (line 1) | class Solution {
    method isBipartite (line 2) | public boolean isBipartite(int[][] graph) {

FILE: 791-Custom-Sort-String-Leetcode.cpp
  class Solution (line 1) | class Solution {
    method string (line 3) | string customSortString(string order, string s)

FILE: 792-number-of-matching-subsequences/792-number-of-matching-subsequences.java
  class Solution (line 1) | class Solution {
    method numMatchingSubseq (line 2) | public int numMatchingSubseq(String s, String[] words) {

FILE: 802. Find Eventual Safe States.java
  class Solution (line 1) | class Solution {
    method eventualSafeNodes (line 2) | public List<Integer> eventualSafeNodes(int[][] graph) {
    method dfs (line 35) | public boolean dfs(List<List<Integer>> adj,int node,int[] vis,int[] df...

FILE: 804-unique-morse-code-words/804-unique-morse-code-words.java
  class Solution (line 1) | class Solution {
    method uniqueMorseRepresentations (line 3) | public int uniqueMorseRepresentations(String[] words) {
    method convertToMorseStr (line 19) | private String convertToMorseStr(String[] MORSE, String word) {

FILE: 804-unique-morse-code-words/unique-morse-code.cpp
  class Solution (line 1) | class Solution {
    method uniqueMorseRepresentations (line 3) | int uniqueMorseRepresentations(vector<string>& words) {

FILE: 81-search-in-rotated-sorted-array-ii/81-search-in-rotated-sorted-array-ii.java
  class Solution (line 1) | class Solution {
    method search (line 2) | public boolean search(int[] nums, int target) {

FILE: 814-binary-tree-pruning/814-binary-tree-pruning.java
  class Solution (line 16) | class Solution {
    method pruneTree (line 19) | public TreeNode pruneTree(TreeNode root) {
    method dfs (line 28) | void dfs(TreeNode root){
    method sum (line 39) | int sum(TreeNode root){
  method helper (line 58) | public boolean helper(TreeNode root){

FILE: 82-remove-duplicates-from-sorted-list-ii/82-remove-duplicates-from-sorted-list-ii.java
  class Solution (line 11) | public class Solution {
    method deleteDuplicates (line 12) | public ListNode deleteDuplicates(ListNode A) {

FILE: 820-short-encoding-of-words/820-short-encoding-of-words.java
  class Solution (line 1) | class Solution {
    method minimumLengthEncoding (line 2) | public int minimumLengthEncoding(String[] words) {
  class Trie (line 17) | class Trie {
    method Trie (line 21) | public Trie() {
    method insert (line 25) | public boolean insert(String word) {
  class TrieNode (line 40) | class TrieNode {
    method TrieNode (line 43) | public TrieNode() {}

FILE: 823-binary-trees-with-factors/823-binary-trees-with-factors.java
  class Solution (line 1) | class Solution {
    method numFactoredBinaryTrees (line 2) | public int numFactoredBinaryTrees(int[] arr) {

FILE: 838-push-dominoes/838-push-dominoes.java
  class Solution (line 1) | class Solution {
    method pushDominoes (line 2) | public String pushDominoes(String dominoes) {

FILE: 844-backspace-string-compare/844-backspace-string-compare.java
  class Solution (line 1) | class Solution {
    method backspaceCompare (line 2) | public boolean backspaceCompare(String s, String t) {
    method getNextCharacterPosition (line 24) | public int getNextCharacterPosition(String s, int start) {

FILE: 845_Longest_Mountain_in_Array.cpp
  class Solution (line 1) | class Solution {
    method longestMountain (line 3) | int longestMountain(vector<int>& arr) {

FILE: 856-score-of-parentheses/856-score-of-parentheses.java
  class Solution (line 1) | class Solution {
    method scoreOfParentheses (line 2) | public int scoreOfParentheses(String S) {

FILE: 86-partition-list/86-partition-list.java
  class Solution (line 11) | class Solution {
    method partition (line 12) | public ListNode partition(ListNode head, int x) {

FILE: 867-transpose-matrix/867-transpose-matrix.java
  class Solution (line 1) | class Solution {
    method transpose (line 2) | public int[][] transpose(int[][] A) {

FILE: 869-Reordered-Power-of-2/869-Reordered-Power-of-2.cpp
  class Solution (line 1) | class Solution {
    method reorderedPowerOf2 (line 3) | bool reorderedPowerOf2(int n) {

FILE: 871-minimum-number-of-refueling-stops/871-minimum-number-of-refueling-stops.java
  class Solution (line 1) | class Solution {
    method minRefuelStops (line 2) | public int minRefuelStops(int target, int startFuel, int[][] stations) {

FILE: 871-minimum-number-of-refueling-stops/Minimum-Number-of-Refueling-Stops.cpp
  class Solution (line 1) | class Solution {
    method minRefuelStops (line 3) | int minRefuelStops(int target, int startFuel, vector<vector<int>>& sta...

FILE: 871. Minimum Number of Refueling Stops.cpp
  function minRefuelStops (line 1) | int minRefuelStops(int target, int sf, vector<vector<int>>& s) {

FILE: 876-middle-of-the-linked-list/876-middle-of-the-linked-list.java
  class Solution (line 11) | class Solution {
    method middleNode (line 12) | public ListNode middleNode(ListNode head) {

FILE: 88-merge-sorted-array/88-merge-sorted-array.java
  class Solution (line 1) | class Solution {
    method merge (line 2) | public void merge(int[] nums1, int m, int[] nums2, int n) {

FILE: 881-boats-to-save-people/881-boats-to-save-people.java
  class Solution (line 1) | class Solution {
    method numRescueBoats (line 2) | public int numRescueBoats(int[] people, int limit) {

FILE: 890-find-and-replace-pattern/890-find-and-replace-pattern.java
  class Solution (line 1) | class Solution {
    method findAndReplacePattern (line 2) | public static List<String> findAndReplacePattern(String[] words, Strin...
    method checkPattern (line 11) | private static boolean checkPattern(String word, String pattern){

FILE: 895-maximum-frequency-stack/895-maximum-frequency-stack.java
  class FreqStack (line 1) | class FreqStack {
    method FreqStack (line 8) | public FreqStack() {
    method push (line 15) | public void push(int val) {
    method pop (line 27) | public int pop() {

FILE: 897-increasing-order-search-tree/897-increasing-order-search-tree.java
  class Solution (line 1) | class Solution {
    method increasingBST (line 2) | public TreeNode increasingBST(TreeNode root){
    method inOrder (line 13) | public void inOrder(TreeNode root,List<TreeNode> list){

FILE: 905-sort-array-by-parity/905-sort-array-by-parity.java
  class Solution (line 1) | class Solution {
    method sortArrayByParity (line 2) | public int[] sortArrayByParity(int[] nums) {

FILE: 91-decode-ways/91-decode-ways.java
  class Solution (line 1) | class Solution {
    method numDecodings (line 2) | public int numDecodings(String s) {

FILE: 916-word-subsets/916-word-subsets.java
  class Solution (line 1) | class Solution {
    method wordSubsets (line 2) | public List<String> wordSubsets(String[] A, String[] B) {
    method count (line 22) | public int[] count(String S) {

FILE: 92-reverse-linked-list-ii/92-reverse-linked-list-ii.java
  class Solution (line 1) | class Solution {
    method reverseBetween (line 2) | public ListNode reverseBetween(ListNode head, int left, int right) {

FILE: 923-3sum-with-multiplicity/923-3sum-with-multiplicity.java
  class Solution (line 1) | class Solution {
    method threeSumMulti (line 2) | public int threeSumMulti(int[] A, int target) {

FILE: 936-stamping-the-sequence/936-stamping-the-sequence.java
  class Solution (line 1) | class Solution {
    method movesToStamp (line 2) | public int[] movesToStamp(String stamp, String target) {
    method stamp (line 28) | private int stamp(int start, char[] s, char[] t, int count) {
    method canStamp (line 38) | private boolean canStamp(int start, char[] s, char[] t) {

FILE: 936-stamping-the-sequence/Stamping The Sequence.cpp
  class Solution (line 1) | class Solution {
    method canReplace (line 4) | bool canReplace(string &stamp, string &target, int i, int n)
    method replace (line 14) | void replace(string &stamp, string &target, int i, int n, int &cnt)
    method movesToStamp (line 21) | vector<int> movesToStamp(string stamp, string target) {

FILE: 936-stamping-the-sequence/stamping-the-sequence.cpp
  class Solution (line 13) | class Solution {
    method movesToStamp (line 15) | vector<int> movesToStamp(string stamp, string target) {
    method remove (line 28) | int remove(string& str, string stamp){

FILE: 94-binary-tree-inorder-traversal/94-binary-tree-inorder-traversal.java
  class Solution (line 16) | class Solution {
    method inorderTraversal (line 17) | public List<Integer> inorderTraversal(TreeNode root) {
    method inOrder (line 22) | void inOrder(TreeNode root,List<Integer> list){

FILE: 94-binary-tree-inorder-traversal/Binary Tree InOrder Traversal lc.cpp
  class Solution (line 15) | class Solution {
    method inorder (line 18) | void inorder(TreeNode* node){
    method inorderTraversal (line 27) | vector<int> inorderTraversal(TreeNode* root) {

FILE: 94. Binary Tree Inorder Traversal.cpp
  class Solution (line 1) | class Solution {
    method solve (line 3) | void solve(TreeNode *root,vector<int> &result)
    method inorderTraversal (line 12) | vector<int> inorderTraversal(TreeNode* root) {

FILE: 948 Bag of Tokens lc med.cpp
  class Solution (line 1) | class Solution {
    method bagOfTokensScore (line 3) | int bagOfTokensScore(vector<int>& tokens, int power) {

FILE: 948-bag-of-tokens/948-bag-of-tokens.java
  class Solution (line 1) | class Solution {
    method bagOfTokensScore (line 2) | public int bagOfTokensScore(int[] tokens, int power) {

FILE: 96-Unique Binary Search Trees.java
  method helper (line 3) | public static int helper(int n, int[] dp) {
  method numTrees (line 15) | public int numTrees(int n) {
  method numTrees (line 23) | public int numTrees(int n) {

FILE: 967-numbers-with-same-consecutive-differences/967-numbers-with-same-consecutive-differences.java
  class Solution (line 1) | class Solution {
    method numsSameConsecDiff (line 3) | public int[] numsSameConsecDiff(int n, int k) {
    method dfs (line 15) | void dfs(int num,int n,int k){

FILE: 968-binary-tree-cameras/968-binary-tree-cameras.java
  class Solution (line 1) | class Solution {
    method minCameraCover (line 7) | public int minCameraCover(TreeNode root) {
    method dfs (line 12) | private int dfs (TreeNode root){

FILE: 97-interleaving-string/97-interleaving-string.java
  class Solution (line 1) | class Solution {
    method isInterleave (line 2) | public boolean isInterleave(String s1, String s2, String s3) {
    method isInterleaveHelper (line 7) | private boolean isInterleaveHelper(String s1, String s2, String s3, in...

FILE: 98-validate-binary-search-tree/98-validate-binary-search-tree.java
  class Solution (line 16) | class Solution {
    method isValidBST (line 17) | public boolean isValidBST(TreeNode root) {
    method dfs (line 20) | boolean dfs(TreeNode root,long lower,long upper){

FILE: 981-time-based-key-value-store/981-time-based-key-value-store.java
  class TimeValue (line 1) | class TimeValue {
    method TimeValue (line 6) | public TimeValue(int time, String value) {
    method toString (line 12) | public String toString() {
  class TimeMap (line 19) | class TimeMap {
    method TimeMap (line 23) | public TimeMap() {
    method set (line 27) | public void set(String key, String value, int timestamp) {
    method get (line 43) | public String get(String key, int timestamp) {

FILE: 985 Sum of Even Numbers After Queries lc med.cpp
  class Solution (line 4) | class Solution {
    method sumEvenAfterQueries (line 6) | vector<int> sumEvenAfterQueries(vector<int>& nums, vector<vector<int>>...

FILE: 985-sum-of-even-numbers-after-queries/985-sum-of-even-numbers-after-queries.java
  class Solution (line 1) | class Solution {
    method sumEvenAfterQueries (line 2) | public int[] sumEvenAfterQueries(int[] nums, int[][] queries) {

FILE: 987-vertical-order-traversal-of-a-binary-tree/987-vertical-order-traversal-of-a-binary-tree.java
  class Solution (line 16) | class Solution {
    method verticalTraversal (line 19) | public List<List<Integer>> verticalTraversal(TreeNode root) {
    method dfs (line 35) | void dfs(TreeNode root,int row,int col){
    class Pair (line 60) | class Pair{
      method Pair (line 65) | Pair(TreeNode value,int hdist){
    method verticalTraversal (line 71) | public List<List<Integer>> verticalTraversal(TreeNode root) {
  class Solution (line 58) | class Solution {
    method verticalTraversal (line 19) | public List<List<Integer>> verticalTraversal(TreeNode root) {
    method dfs (line 35) | void dfs(TreeNode root,int row,int col){
    class Pair (line 60) | class Pair{
      method Pair (line 65) | Pair(TreeNode value,int hdist){
    method verticalTraversal (line 71) | public List<List<Integer>> verticalTraversal(TreeNode root) {

FILE: 99-recover-binary-search-tree/99-recover-binary-search-tree.java
  class Solution (line 1) | class Solution {
    method recoverTree (line 5) | public void recoverTree(TreeNode root) {
    method swap (line 9) | public void swap(TreeNode a, TreeNode b) {
    method inorder (line 14) | public void inorder(TreeNode root) {

FILE: 990-satisfiability-of-equality-equations/990-satisfiability-of-equality-equations.java
  class Solution (line 1) | class Solution {
    method find (line 3) | public int find(int x) {
    method equationsPossible (line 13) | public boolean equationsPossible(String[] equations) {

FILE: 991-broken-calculator/991-broken-calculator.java
  class Solution (line 1) | class Solution {
    method brokenCalc (line 2) | public int brokenCalc(int startValue, int target) {

FILE: Add 1 to linked list.java
  class Solution (line 1) | class Solution
    method addOne (line 3) | public static Node addOne(Node head)
    method reverse (line 23) | public static Node reverse(Node head){

FILE: Add Binary Strings.java
  class Solution (line 2) | public class Solution {
    method addBinary (line 3) | public String addBinary(String A, String B) {
    method addBinary (line 13) | public String addBinary(String A, String B) {
  class Solution (line 12) | public class Solution {
    method addBinary (line 3) | public String addBinary(String A, String B) {
    method addBinary (line 13) | public String addBinary(String A, String B) {

FILE: Add Digits.java
  class Solution (line 1) | class Solution {
    method addDigits (line 2) | public int addDigits(int num) {

FILE: Add One To Array.java
  class Solution (line 1) | public class Solution {
    method plusOne (line 2) | public int[] plusOne(int[] a) {
    method allNines (line 35) | public boolean allNines(int[]a){

FILE: Add Two Numbers.java
  class Solution (line 1) | class Solution {
    method addTwoNumbers (line 2) | public ListNode addTwoNumbers(ListNode l1, ListNode l2) {

FILE: Add all greater values to every node in a BST.java
  class Solution (line 1) | class Solution{
    method modify (line 4) | public Node modify(Node root){
    method mod (line 9) | public void mod(Node node,int increment){
    method sum (line 16) | public int sum(Node node){

FILE: Add binary.java
  class Solution (line 1) | class Solution {
    method addBinary (line 2) | public String addBinary(String a, String b) {

FILE: Adding Array Elements.java
  class Solution (line 1) | class Solution {
    method minOperations (line 2) | int minOperations(int[] arr, int n, int k) {

FILE: Adventure in a Maze - GFG/adventure-in-a-maze.java
  class GFG (line 7) | class GFG
    method main (line 9) | public static void main(String[] args) throws IOException
  class Solution (line 37) | class Solution{
    method FindWays (line 39) | public int[] FindWays(int[][] matrix){

FILE: Alien Dictionary - GFG/Alien Dictionary.cpp
  class Solution (line 10) | class Solution{
    method solve (line 11) | void solve(int i,vector<vector<int>> v,vector<int> &vis,string &res){
    method string (line 24) | string findOrder(string dict[], int n, int k) {
  function f (line 55) | bool f(string a, string b) {
  function main (line 69) | int main() {

FILE: All Elements in Two Binary Search Trees.java
  class Solution (line 1) | class Solution {
    method getAllElements (line 2) | public List<Integer> getAllElements(TreeNode root1, TreeNode root2) {
    method dfs (line 13) | private void dfs(TreeNode node, LinkedList<Integer> ret) {
    method dfs2 (line 20) | private void dfs2(TreeNode node, List<Integer> ret, LinkedList<Integer...

FILE: All Factors.py
  class Solution (line 1) | class Solution:
    method allFactors (line 4) | def allFactors(self, A):

FILE: All Possible Combinations.java
  class Solution (line 1) | public class Solution {
    method specialStrings (line 2) | public ArrayList<String> specialStrings(ArrayList<String> A) {
    method dfs (line 7) | void dfs(ArrayList<String> ans,ArrayList<String> arr,StringBuilder sb){

FILE: All Unique Permutations.java
  class Solution (line 1) | public class Solution {
    method permute (line 5) | public ArrayList<ArrayList<Integer>> permute(ArrayList<Integer> nums) {
    method permuteUnique (line 13) | private void permuteUnique(ArrayList<Integer> nums, List<Integer> list) {

FILE: Allocate minimum number of pages.cpp
  class Solution (line 2) | class Solution
    method allocationPoss (line 6) | bool allocationPoss(int p,int M,int A[],int n){
    method findPages (line 20) | int findPages(int A[], int N, int M)

FILE: Alternate positive and negative numbers.cpp
  class Solution (line 1) | class Solution{
    method rearrange (line 4) | void rearrange(int arr[], int n) {

FILE: Alternate positive and negative numbers.java
  class Solution (line 1) | class Solution {
    method rearrange (line 2) | void rearrange(int arr[], int n) {

FILE: Anagram of String.java
  class GfG (line 1) | class GfG
    method remAnagrams (line 3) | public int remAnagrams(String s,String s1){

FILE: Anagrams.java
  class Solution (line 1) | public class Solution {
    method anagrams (line 3) | public ArrayList<ArrayList<Integer>> anagrams(final List<String> A) {

FILE: Anti Diagonals.py
  class Solution (line 1) | class Solution:
    method diagonal (line 2) | def diagonal(self, A):

FILE: Arithmetic Slices.java
  class Solution (line 1) | class Solution {
    method numberOfArithmeticSlices (line 2) | public int numberOfArithmeticSlices(int[] nums) {

FILE: Array 3 Pointers.java
  class Solution (line 1) | public class Solution {
    method minimize (line 3) | public int minimize(final List<Integer> A, final List<Integer> B, fina...
    method abs (line 38) | public int abs(int a){

FILE: Array Partition - GFG/array-partition.java
  class GFG (line 8) | class GFG {
    method main (line 9) | public static void main(String args[]) throws IOException {
  class Solution (line 36) | class Solution{
    method rec (line 37) | boolean rec( int start , int[] A , int K , int M ){
    method partitionArray (line 50) | boolean partitionArray(int N, int K, int M, int [] A){

FILE: Array Sum.java
  class Solution (line 1) | public class Solution {
    method addArrays (line 2) | public int[] addArrays(int[] A, int[] B) {

FILE: Array to BST - GFG/array-to-bst.java
  class GFG (line 7) | class GFG
    method main (line 9) | public static void main(String[] args) throws IOException
  class Solution (line 34) | class Solution{
    method fillArray (line 35) | public void fillArray(int[] res,int[] n, int s, int e, int[] i){
    method sortedArrayToBST (line 43) | public int[] sortedArrayToBST(int[] n){

FILE: Assign Mice to Holes.java
  class Solution (line 1) | public class Solution {
    method mice (line 2) | public int mice(int[] A, int[] B) {

FILE: Assignment Problem - GFG/assignment-problem.cpp
  class Solution (line 6) | class Solution {
    method init_labels (line 19) | void init_labels()
    method update_labels (line 29) | void update_labels()
    method add_to_tree (line 48) | void add_to_tree(int x, int prev_iousx)
    method augment (line 64) | void augment() //main function of the algorithm
    method hungarian (line 157) | int hungarian()
    method assignmentProblem (line 172) | int assignmentProblem(int Arr[], int N) {
  function main (line 186) | int main() {

FILE: Assignment Problem - GFG/assignment-problem.java
  class GFG (line 7) | class GFG {
    method main (line 8) | public static void main(String args[]) throws IOException {
  class Solution (line 38) | class Solution {
    method assignmentProblem (line 39) | static int assignmentProblem(int a[], int n) {
    method dfs (line 54) | static int[] dfs(int[][]mat,int n){

FILE: Assignment Problem - GFG/assignment-problem.py
  class Solution (line 3) | class Solution:
    method assignmentProblem (line 4) | def assignmentProblem(self, Arr, N):

FILE: Assignment Problem - GFG/hungarian_java(not_accepted).java
  class Solution (line 2) | class Solution {
    method main (line 8) | public static void main(String[] args) {
    method assignmentProblem (line 12) | static int assignmentProblem(int Arr[], int N) {
    method makeMat (line 75) | static void makeMat(int[] Arr, int[][] mat, int N) {
    method copy (line 85) | static void copy(int[][] mat, int[][] temp, int N) {
    method reduction (line 94) | static void reduction(int[][] temp, int N) {
    method optimisation (line 119) | static void optimisation(int[][] temp, int[][] sign, int N) {
    method deleteRow (line 148) | static void deleteRow(int[][] sign, int rowDel, int n) {
    method indexInCol (line 158) | static int indexInCol(int[][] temp,int[][]sign, int col, int n) {
    method countInCol (line 167) | static int countInCol(int[][] temp,int[][]sign, int col, int n) {
    method deleteCol (line 176) | static void deleteCol(int[][] sign, int delCol,int N) {
    method indexInRow (line 185) | static int indexInRow(int[][] temp,int[][]sign, int row, int N) {
    method countInRow (line 194) | static int countInRow(int[][] temp,int[][]sign, int row,int N) {

FILE: Average of level in Binary tree.cpp
  class Solution (line 16) | class Solution {
    method averageOfLevels (line 18) | vector<double> averageOfLevels(TreeNode* root) {

FILE: Average of levels in binary tree.java
  class Solution (line 1) | class Solution {
    method averageOfLevels (line 2) | public List<Double> averageOfLevels(TreeNode root) {

FILE: BST To Max Heap.cpp
  class Solution (line 1) | class Solution{
    method recur (line 4) | void recur(Node *root,priority_queue<int>&pq)
    method change (line 14) | void change(Node *root,priority_queue<int>&pq)
    method convertToMaxHeapUtil (line 25) | void convertToMaxHeapUtil(Node* root)

FILE: BST to greater sum tree - GFG/bst-to-greater-sum-tree.java
  class Node (line 9) | class Node{
    method Node (line 13) | Node(int data){
  class Tree (line 20) | class Tree {
    method buildTree (line 22) | static Node buildTree(String str){
    method inOrder (line 78) | static void inOrder(Node root)
    method main (line 90) | public static void main (String[] args) throws IOException{
  class Solution (line 127) | class Solution
    method transformTree (line 130) | public static void transformTree (Node root)
    method dfs (line 136) | static void dfs(Node root){

FILE: BST to max heap GFG/BstToMaxHeap.cpp
  function helper1 (line 2) | void helper1(Node *root,vector<int>&ans){
  function helper2 (line 11) | void helper2(Node *root,vector<int>&ans,int &index){
  function convertToMaxHeapUtil (line 20) | void convertToMaxHeapUtil(Node* root)

FILE: BST to max heap gfg med.cpp
  type Node (line 7) | struct Node {
  function Node (line 15) | Node* newNode(int val)
  function Node (line 25) | Node* buildTree(string str)
  function postorderTraversal (line 87) | void postorderTraversal(Node* root)
  class Solution (line 101) | class Solution{
    method postorder (line 105) | void postorder(Node* root){
    method inorder (line 111) | void inorder(Node *root){
    method convertToMaxHeapUtil (line 117) | void convertToMaxHeapUtil(Node* root)
  function main (line 124) | int main()

FILE: BST-to-max-Heap/BSTtoMaxHeap.java
  class Solution (line 1) | class Solution
    method convertToMaxHeapUtil (line 4) | public static void convertToMaxHeapUtil(Node root)
    method inOrder (line 12) | public static void inOrder(Node root, ArrayList<Integer> nodes) {

FILE: BST-to-max-Heap/Solution.cpp
  class Solution (line 1) | class Solution{
    method Node (line 5) | Node* helper(Node* root){
    method convertToMaxHeapUtil (line 39) | void convertToMaxHeapUtil(Node* root)

FILE: Bag Of Tokens.java
  class Solution (line 1) | class Solution {
    method bagOfTokensScore (line 2) | public int bagOfTokensScore(int[] tokens, int power) {

FILE: Balanced Binary Tree.java
  class Solution (line 1) | public class Solution {
    method isBalanced (line 2) | public int isBalanced(TreeNode A) {
    method getHeight (line 21) | int getHeight(TreeNode root){

FILE: Balanced Parantheses!.java
  class Solution (line 1) | public class Solution {
    method solve (line 2) | public int solve(String A) {

FILE: Ball Coloring.cpp
  class Solution (line 1) | class Solution {
    method noOfWays (line 3) | unsigned long long int noOfWays(unsigned long long int n){

FILE: Ball coloring.cpp
  class Solution (line 1) | class Solution {
    method noOfWays (line 3) | unsigned long long int noOfWays(unsigned long long int n){

FILE: Ball coloring.java
  class Solution (line 1) | class Solution {
    method noOfWays (line 2) | static long noOfWays(long n){

FILE: Ball coloring.py
  class Solution (line 1) | class Solution:
    method noOfWays (line 2) | def noOfWays (self, n):

FILE: Ball-Coloring/ball_coloring.java
  class Solution (line 1) | class Solution{
    method noOfWays (line 2) | static long noOfWays(long n){

FILE: Best Time to Buy and Sell Stock IV.java
  class Solution (line 1) | class Solution {
    method maxProfit (line 2) | public int maxProfit(int k, int[] prices) {
    method maximumProfit (line 11) | public int maximumProfit(int[] prices, int k, int ind, int buy, int []...

FILE: Best Time to Buy and Sell Stock.java
  class Solution (line 1) | class Solution {
    method maxProfit (line 2) | public int maxProfit(int[] prices) {

FILE: Biconnected Graph.java
  class Solution (line 1) | class Solution {
    method biGraph (line 2) | static int biGraph(int[] arr, int n, int e) {

FILE: Bike Racing - GFG/bike-racing.java
  class GFG (line 7) | class GFG{
    method main (line 8) | public static void main(String args[])throws IOException{
  class Solution (line 33) | class Solution{
    method check (line 34) | static boolean check(long T, long L, long S[], long A[], long N, long M){
    method buzzTime (line 49) | static long buzzTime(long N, long M, long L, long H[], long A[])

FILE: Binary Matrix with at most K 1s.java
  class Solution (line 1) | class Solution {
    method largestSquare (line 2) | static ArrayList<Integer> largestSquare(ArrayList<ArrayList<Integer>> ...

FILE: Binary Tree Pruning lc.cpp
  class Solution (line 4) | class Solution {
    method TreeNode (line 9) | TreeNode* pruneTree(TreeNode* root) {

FILE: Binary Tree Pruning.java
  class Solution (line 1) | class Solution {
    method pruneTree (line 2) | public TreeNode pruneTree(TreeNode root) {
    method make (line 7) | public boolean make(TreeNode root) {

FILE: Bipartite Graph - GFG/bipartite-graph.java
  class GFG (line 5) | class GFG
    method main (line 7) | public static void main(String[] args) throws IOException
  class Solution (line 37) | class Solution
    method isBipartite (line 39) | public boolean isBipartite(int V, ArrayList<ArrayList<Integer>>adj)

FILE: Bit Difference - GFG/Bit Difference.cpp
  class Solution (line 10) | class Solution{
    method countBits (line 12) | int countBits(int N, long long int A[])
  function main (line 33) | int main(){

FILE: Bitwise AND of the Array.java
  class Solution (line 1) | class Solution {
    method count (line 2) | int count(int N, int A[], int X){

FILE: Black Shapes.java
  class Solution (line 1) | public class Solution {
    method black (line 3) | public int black(String[] A) {
    method dfs (line 19) | void dfs(char[][]arr,int i,int j){

FILE: Book_Allcoation_Problem.cpp
  function isPossible (line 34) | bool isPossible(int arr[],int m,int n,int mid)
  function allocatedBooK (line 57) | int allocatedBooK(int arr[],int m,int n)
  function main (line 84) | int main()

FILE: Brackets in Matrix Chain Multiplication - GFG/brackets-in-matrix-chain-multiplication.cpp
  class Solution (line 10) | class Solution {
    method string (line 16) | string matrixChainOrder(int A[], int n) {
    method matrixChainOrderUtil (line 20) | pair<int, string> matrixChainOrderUtil(int p[], int l, int r) {
  function main (line 49) | int main(){

FILE: Brackets in Matrix Chain Multiplication - GFG/brackets-in-matrix-chain-multiplication.java
  class GFG (line 7) | class GFG{
    method main (line 8) | public static void main(String args[])throws IOException
  class Solution (line 28) | class Solution{
    method matrixChainOrder (line 31) | static String matrixChainOrder(int p[], int n){
    method dfs (line 53) | static void dfs(int i,int j,int[][]path){

FILE: Brain Game - GFG/brain-game.cpp
  class Solution (line 6) | class Solution{
    method brainGame (line 8) | bool brainGame(vector<int>nums) {
  function main (line 28) | int main(){

FILE: Brain Game - GFG/brain-game.java
  class GFG (line 7) | class GFG
    method main (line 9) | public static void main(String[] args) throws IOException
  class Solution (line 42) | class Solution
    method brainGame (line 44) | public boolean brainGame(int[] nums)
    method primeFactors (line 53) | int primeFactors(int n)
    method isPrime (line 68) | boolean isPrime(int n){

FILE: Breadth first search.cpp
  function bfs (line 6) | void bfs(int node,vector<int>* adj,vector<int>* visited)
  function main (line 30) | int main()

FILE: Broken blocks - GFG/broken-blocks.java
  class GFG (line 7) | class GFG
    method main (line 9) | public static void main(String[] args) throws IOException
  class Solution (line 36) | class Solution
    method MaxGold (line 39) | public int MaxGold(int[][] a){
    method dfs (line 47) | public int dfs(int[][]a,int i,int j){
    method valid (line 54) | public boolean valid(int[][]a,int i,int j){

FILE: Burning Tree.cpp
  class Solution (line 1) | class Solution {
    method minTime (line 4) | int minTime(Node* root, int target)

FILE: Can Make Triangle.java
  class Solution (line 1) | class Solution
    method canMakeTriangle (line 3) | int[] canMakeTriangle(int A[], int N)
    method isTriangle (line 14) | boolean isTriangle(int a,int b,int c){

FILE: Can Place Flowers.java
  class Solution (line 1) | class Solution {
    method canPlaceFlowers (line 2) | public boolean canPlaceFlowers(int[] flowerbed, int n) {

FILE: Capacity To Ship Packages Within D Days.java
  class Solution (line 1) | class Solution {
    method leastWeightCapacity (line 2) | static int leastWeightCapacity(int[] a, int n, int d) {
    method isValid (line 18) | static boolean isValid(int[]a,int k,int res){
    method sum (line 30) | static int sum(int[]a){
    method largest (line 37) | static int largest(int[]arr)

FILE: Case-specific Sorting of Strings.java
  class Solution (line 1) | class Solution
    method caseSort (line 5) | public static String caseSort(String str)

FILE: Case-specific Sorting of Strings.py
  class Solution (line 1) | class Solution:
    method caseSort (line 4) | def caseSort(self,s,n):

FILE: Case-specific Sorting string.cpp
  class Solution (line 6) | class Solution
    method string (line 10) | string caseSort(string str, int n)
  function main (line 50) | int main()

FILE: Ceil in BST.java
  class Tree (line 1) | class Tree {
    method findCeil (line 4) | int findCeil(Node root, int key) {
    method dfs (line 11) | void dfs(Node root,int key){

FILE: Champagne Tower.java
  class Solution (line 1) | class Solution {
    method champagneTower (line 2) | public double champagneTower(int poured, int query_row, int query_glas...
    method champagneTower (line 25) | public double champagneTower(int poured, int queryRow, int queryGlass) {
  class Solution (line 24) | class Solution {
    method champagneTower (line 2) | public double champagneTower(int poured, int query_row, int query_glas...
    method champagneTower (line 25) | public double champagneTower(int poured, int queryRow, int queryGlass) {

FILE: Change Bits - GFG/change-bits.java
  class GFG (line 7) | class GFG {
    method main (line 8) | public static void main(String args[]) throws IOException {
  class Solution (line 25) | class Solution {
    method changeBits (line 26) | static int[] changeBits(int N) {

FILE: Check Mirror in N-ary tree.java
  class Solution (line 1) | class Solution {
    method checkMirrorTree (line 2) | static int checkMirrorTree(int n, int e, int[] A, int[] B) {

FILE: Check Palindrome!.java
  class Solution (line 1) | public class Solution {
    method solve (line 2) | public int solve(String s) {

FILE: Chips Factory.java
  class Solution (line 1) | public class Solution {
    method solve (line 2) | public int[] solve(int[] A) {

FILE: Chocolate_Distribution_Problem_gfg.cpp
  class Solution (line 5) | class Solution{
    method findMinDiff (line 7) | long long findMinDiff(vector<long long> a, long long n, long long m){

FILE: Choose and Swap - GFG/choose-and-swap.java
  class GFG (line 9) | class GFG
    method main (line 11) | public static void main(String args[])throws IOException
  class Solution (line 34) | class Solution{
    method chooseandswap (line 35) | String chooseandswap(String A){

FILE: Climbing Stairs.java
  class Solution (line 1) | public class Solution {
    method solve (line 2) | public int solve(ArrayList<Integer> A) {

FILE: Clone Graph.java
  class Solution (line 1) | class Solution {
    method cloneGraph (line 3) | public Node cloneGraph(Node node) {
    method cloneGraph (line 19) | public Node cloneGraph(Node node) {
  class Solution (line 18) | class Solution {
    method cloneGraph (line 3) | public Node cloneGraph(Node node) {
    method cloneGraph (line 19) | public Node cloneGraph(Node node) {

FILE: Closest Palindrome - GFG/closest-palindrome.java
  class GFG (line 7) | class GFG
    method main (line 9) | public static void main(String[] args) throws IOException
  class Solution (line 27) | class Solution
    method closestPalindrome (line 29) | public long closestPalindrome(long num)
    method toPal (line 87) | private long toPal(String num, boolean isEven)
    method isPalindrome (line 97) | private boolean isPalindrome(String num)

FILE: Coin Piles - GFG/coin-piles.java
  class GFG (line 7) | class GFG {
    method main (line 8) | public static void main(String args[]) throws IOException {
  class Solution (line 32) | class Solution {
    method minSteps (line 33) | static int minSteps(int[] arr, int n, int k) {
    method findUpper (line 58) | static int findUpper(int[] arr , int target,  int s , int e){

FILE: Coins of Geekland.java
  class Solution (line 1) | class Solution
    method Maximum_Sum (line 3) | public int Maximum_Sum(int mat[][],int N,int K){
    method sum (line 13) | public int sum(int[][]arr,int row, int col, int k){

FILE: Combination Sum II.java
  class Solution (line 1) | public class Solution {
    method combinationSum (line 5) | public ArrayList<ArrayList<Integer>> combinationSum(ArrayList<Integer>...
    method dfs (line 13) | void dfs(int idx,ArrayList<Integer> a,ArrayList<Integer> curr,int sum){

FILE: Combination Sum.java
  class Solution (line 1) | public class Solution {
    method combinationSum (line 5) | public ArrayList<ArrayList<Integer>> combinationSum(ArrayList<Integer>...
    method dfs (line 13) | public void dfs(int sum,int index,ArrayList<Integer> curr){

FILE: Combinations.java
  class Solution (line 1) | public class Solution {
    method combine (line 5) | public ArrayList<ArrayList<Integer>> combine(int n, int k) {
    method dfs (line 12) | public void dfs(int curr,ArrayList<Integer> curList){

FILE: Compare Version Numbers.java
  class Solution (line 1) | class Solution {
    method compareVersion (line 2) | public int compareVersion(String version1, String version2) {
    method compareVersion (line 20) | public int compareVersion(String version1, String version2) {
  class Solution (line 19) | public class Solution {
    method compareVersion (line 2) | public int compareVersion(String version1, String version2) {
    method compareVersion (line 20) | public int compareVersion(String version1, String version2) {

FILE: Complete Binary Tree.java
  class GfG (line 1) | class GfG
    method isCompleteBT (line 3) | boolean isCompleteBT(Node root)

FILE: Composite And Prime.java
  class Solution (line 5) | class Solution
    method isPrime (line 10) | public boolean isPrime(int a){
    method Count (line 29) | public int Count(int l, int r)

FILE: Composite and Prime gfg med s18.cpp
  class Solution (line 4) | class Solution {
    method isPrime (line 8) | void isPrime(int n){
    method Count (line 24) | int Count(int L, int R){
  function main (line 35) | int main(){

FILE: Composite and Prime.cpp
  class Solution (line 6) | class Solution {
    method Count (line 8) | int Count(int L, int R){
  function main (line 36) | int main(){

FILE: Composite and Prime.java
  class Solution (line 1) | class Solution
    method Count (line 3) | public int Count(int L, int R)

FILE: Composite and Prime.py
  class Solution (line 3) | class Solution:
    method Count (line 4) | def Count(self, l, r):

FILE: Composite-and-prime.cpp
  class Solution (line 1) | class Solution{
    method isPrime (line 3) | bool isPrime(int num){
    method Count (line 12) | int Count(int L, int R){

FILE: Compute Before Matrix.java
  class Solution (line 1) | class Solution{
    method computeBeforeMatrix (line 2) | public int[][] computeBeforeMatrix(int N, int M,int[][] after ){

FILE: Concatenate two numbers.java
  class Solution (line 1) | class Solution
    method countPairs (line 3) | long countPairs(int N, int X, int numbers[])

FILE: Connect Ropes.java
  class Solution (line 1) | public class Solution {
    method solve (line 2) | public int solve(ArrayList<Integer> A) {

FILE: Consecutive Parent - Child.java
  class Solution (line 14) | public class Solution {
    method consecutiveNodes (line 15) | public int consecutiveNodes(TreeNode A) {

FILE: Construct BST from Preorder.java
  class Solution (line 14) | public class Solution {
    method constructBST (line 16) | public TreeNode constructBST(int[] A) {
    method bstFromPreOrder (line 20) | public TreeNode bstFromPreOrder(int[] preorder ,int bound){

FILE: Construct Binary Tree From Inorder And Preorder.java
  class Solution (line 10) | public class Solution {
    method buildTree (line 14) | public TreeNode buildTree(ArrayList<Integer> preorder, ArrayList<Integ...
    method rec (line 30) | private TreeNode rec(int start, int end, int index) {

FILE: Construct String With Repeat Limit.java
  class Solution (line 1) | class Solution {
    method repeatLimitedString (line 2) | public String repeatLimitedString(String s, int repeatLimit) {

FILE: Construct String from Binary Tree lc easy.cpp
  class Solution (line 15) | class Solution {
    method recur (line 18) | void recur(TreeNode* root){
    method string (line 31) | string tree2str(TreeNode* root) {

FILE: Construct String from Binary Tree.java
  class Solution (line 1) | class Solution {
    method tree2str (line 3) | public String tree2str(TreeNode root) {
    method str (line 7) | public void str(TreeNode root) {

FILE: Container With Most Water.java
  class Solution (line 1) | public class Solution {
    method maxArea (line 2) | public int maxArea(int[] A) {

FILE: Contiguous Binary Array.java
  class Solution (line 2) | public class Solution {
    method findMaxLength (line 3) | public int findMaxLength(int[] nums) {
    method findMaxLength (line 27) | public int findMaxLength(int[] nums) {
  class Solution (line 25) | public class Solution {
    method findMaxLength (line 3) | public int findMaxLength(int[] nums) {
    method findMaxLength (line 27) | public int findMaxLength(int[] nums) {

FILE: Convert Sorted List to Binary Search Tree.java
  class Solution (line 18) | public class Solution {
    method sortedListToBST (line 19) | public TreeNode sortedListToBST(ListNode a) {
    method dfs (line 22) | public TreeNode dfs(ListNode a){

FILE: Convert the amount in number to words.java
  class Solution (line 1) | public class Solution {
    class Place (line 2) | private static class Place {
      method Place (line 6) | public Place (int unit, String name) {
    method f (line 55) | private String f(long amount) {
    method solve (line 98) | public int solve(String A, String B) {

FILE: Convert to Palindrome.java
  class Solution (line 1) | public class Solution {
    method solve (line 2) | public int solve(String A) {

FILE: Copy List with Random Pointer.java
  class Solution (line 1) | class Solution {
    method copyRandomList (line 2) | public Node copyRandomList(Node head) {

FILE: Corona Vaccine.java
  class Solution (line 1) | class Solution{
    method dfs (line 3) | public static int dfs(Node root){
    method supplyVaccine (line 16) | public static int supplyVaccine(Node root){

FILE: Count All Valid Pickup and Delivery Options.java
  class Solution (line 1) | class Solution {
    method countOrders (line 2) | public int countOrders(int n) {

FILE: Count And Say.java
  class Solution (line 1) | public class Solution {
    method countAndSay (line 2) | public String countAndSay(int n) {

FILE: Count BST nodes that lie in a given range - GFG/count-bst-nodes-that-lie-in-a-given-range.java
  class Node (line 9) | class Node{
    method Node (line 13) | Node(int data){
  class GfG (line 20) | class GfG {
    method buildTree (line 22) | static Node buildTree(String str){
    method printInorder (line 78) | static void printInorder(Node root)
    method main (line 89) | public static void main (String[] args) throws IOException{
  class Solution (line 115) | class Solution
    method getCount (line 119) | int getCount(Node root,int l, int h)
    method dfs (line 126) | void dfs(Node root,int l,int h){

FILE: Count Integers With Even Digit Sum.py
  function getSum (line 1) | def getSum(n):
  class Solution (line 7) | class Solution:
    method countEven (line 8) | def countEven(self, num: int) -> int:

FILE: Count Operations to Obtain Zero.java
  class Solution (line 1) | class Solution {
    method countOperations (line 2) | public int countOperations(int num1, int num2) {

FILE: Count Palindromic  Subsequence.cpp
  class Solution (line 5) | class Solution{
    method ll (line 10) | ll solve(string& s,int i,int j,vector<vector<ll>> &dp){
    method ll (line 37) | ll  countPS(string str)
  function main (line 52) | int main()

FILE: Count Palindromic Subsequences.java
  class Solution (line 1) | class Solution
    method countPS (line 6) | long countPS(String str)
    method dfs (line 13) | long dfs(String s,int i,int j){

FILE: Count Smaller elements.java
  class Solution (line 1) | class Solution {
    method constructLowerArray (line 2) | int[] constructLowerArray(int[] a, int n) {
    method dfs (line 16) | int dfs(List<Integer> arr,int key,int l,int h){

FILE: Count digit groupings of a number - GFG/count-digit-groupings-of-a-number.java
  class GFG (line 7) | class GFG
    method main (line 9) | public static void main(String[] args) throws IOException
  class Solution (line 26) | class Solution{
    method TotalCount (line 27) | public int TotalCount(String str){
    method backtrack (line 38) | public int backtrack(String str, int currsum, int index, int[][]dp){

FILE: Count occurrences of a given word in a 2-d array(dynamic programming).cpp
  class Solution (line 1) | class Solution{
    method solve (line 3) | void solve(int i, int j, vector<vector<char> > &mat, string target,int...
    method findOccurrence (line 20) | int findOccurrence(vector<vector<char> > &mat, string target){

FILE: Count occurrences of a given word in a 2-d array.cpp
  class Solution (line 1) | class Solution{
    method isSafe (line 4) | bool isSafe(int i,int j,int m,int n,int x,vector<vector<char>> &mat,st...
    method solve (line 12) | void solve(int i,int j,int m,int n,int x,vector<vector<char>> &mat,str...
    method findOccurrence (line 39) | int findOccurrence(vector<vector<char> > &mat, string target){

FILE: Count occurrences of a given word in a 2-d array.java
  class Solution (line 1) | class Solution
    method findOccurrence (line 4) | public int findOccurrence(char mat[][], String target)
    method dfs (line 14) | void dfs(char[][]mat,int i,int j,String target,int idx){

FILE: Count occurrences of a given word in a 2-d array.py
  class Solution (line 1) | class Solution:
    method findOccurrence (line 2) | def findOccurrence(self,mat,target):

FILE: Count pairs in array divisible by K - GFG/count-pairs-in-array-divisible-by-k.java
  class GFG (line 6) | class GFG
    method main (line 8) | public static void main (String[] args) throws IOException {
  class Solution (line 31) | class Solution
    method countKdivPairs (line 33) | public static long countKdivPairs(int arr[], int n, int k)

FILE: Count possible ways to construct buildings - GFG/count-possible-ways-to-construct-buildings.java
  class GFG (line 7) | class GFG
    method main (line 9) | public static void main(String[] args) throws IOException
  class Solution (line 27) | class Solution
    method TotalWays (line 29) | public int TotalWays(int N)

FILE: Count subsequences of type a^i, b^j, c^k - GFG/count-subsequences-of-type-ai-bj-ck.java
  class GFG (line 7) | class GFG {
    method main (line 8) | public static void main (String[] args) {
  class Solution (line 29) | class Solution{
    method fun (line 30) | public int fun(String s){

FILE: Count the paths - GFG/count-the-paths.java
  class GFG (line 7) | class GFG
    method main (line 9) | public static void main(String[] args) throws IOException
  class Solution (line 37) | class Solution
    method possible_paths (line 42) | public int possible_paths(int[][] edges, int n, int s, int d)
    method dfs (line 57) | void dfs(int curr){

FILE: Count-occurrences-of-a-given-string-in-2d-array.cpp
  class Solution (line 2) | class Solution{
    method dfs (line 6) | void dfs(int i, int j, vector<vector<char>> &mat, string target, int i...
    method findOccurrence (line 24) | int findOccurrence(vector<vector<char> > &mat, string target){

FILE: Count_occurences_of_a_given_word_in_a_2-d_array/Solution.java
  class Solution (line 1) | class Solution
    method isSafe (line 5) | boolean isSafe(char mat[][],int r,int c)
    method dfs (line 12) | public void dfs(char mat[][],int i,int r, int c,String target)
    method findOccurrence (line 34) | public int findOccurrence(char mat[][], String target)

FILE: Counting Bits.java
  class Solution (line 1) | class Solution {
    method countBits (line 2) | public int[] countBits(int n) {

FILE: Counts Zeros Xor Pairs - GFG/counts-zeros-xor-pairs.java
  class Array (line 18) | class Array {
    method main (line 21) | public static void main (String[] args) throws IOException{
  class Complete (line 58) | class Complete{
    method calculate (line 62) | public static long calculate (int arr[], int n) {

FILE: Course Schedule - GFG/course-schedule.java
  class Main (line 8) | class Main {
    method main (line 9) | public static void main(String[] args) throws IOException {
    method check (line 48) | static boolean check(ArrayList<ArrayList<Integer>> list, int V, int[] ...
  class Solution (line 63) | class Solution{
    method findOrder (line 64) | static int[] findOrder(int n, int m, ArrayList<ArrayList<Integer>> pre...

FILE: Cousins of a given node.java
  class Solution (line 1) | class Solution
    method printCousins (line 3) | public static ArrayList<Integer> printCousins(Node root, Node find)

FILE: Covered-Uncovered Nodes.java
  class Solution (line 14) | public class Solution {
    method coveredNodes (line 15) | public Long coveredNodes(TreeNode A) {

FILE: Create number of weak characters in game.java
  class Solution (line 1) | class Solution {
    method numberOfWeakCharacters (line 2) | public int numberOfWeakCharacters(int[][] properties) {

FILE: Delete and Earn.java
  class Solution (line 1) | class Solution {
    method maxPoints (line 5) | private int maxPoints(int num) {
    method deleteAndEarn (line 25) | public int deleteAndEarn(int[] nums) {
    method deleteAndEarn (line 40) | public int deleteAndEarn(int[] nums) {
  class Solution (line 39) | class Solution {
    method maxPoints (line 5) | private int maxPoints(int num) {
    method deleteAndEarn (line 25) | public int deleteAndEarn(int[] nums) {
    method deleteAndEarn (line 40) | public int deleteAndEarn(int[] nums) {

FILE: Delete nodes greater than k.java
  class Solution (line 1) | class Solution
    method deleteNode (line 3) | public Node deleteNode(Node root,int k)

FILE: Deserialize.java
  class Solution (line 1) | public class Solution {
    method deserialize (line 2) | public ArrayList<String> deserialize(String A) {

FILE: Design Add and Search Words Data Structure.java
  class WordDictionary (line 1) | class WordDictionary {
    method WordDictionary (line 5) | public WordDictionary() {
    method addWord (line 11) | public void addWord(String word) {
    method search (line 22) | public boolean search(String word) {

FILE: Design Bitset.java
  class Bitset (line 1) | class Bitset {
    method Bitset (line 5) | public Bitset(int size) {
    method fix (line 10) | public void fix(int idx) {
    method unfix (line 15) | public void unfix(int idx) {
    method flip (line 20) | public void flip() {
    method all (line 26) | public boolean all() {
    method one (line 30) | public boolean one() {
    method count (line 34) | public int count() {
    method toString (line 38) | public String toString() {

FILE: Design Browser History/Design-Browser-History.cpp
  class BrowserHistory (line 2) | class BrowserHistory {
    method BrowserHistory (line 39) | BrowserHistory(string homepage) {
    method visit (line 43) | void visit(string url) {
    method string (line 49) | string back(int steps) {
    method string (line 55) | string forward(int steps) {

FILE: Diagonal Traversal of Binary Tree - GFG/diagonal-traversal-of-binary-tree.java
  class Node (line 10) | class Node{
    method Node (line 14) | Node(int data){
  class GfG (line 20) | class GfG {
    method buildTree (line 22) | static Node buildTree(String str){
    method printInorder (line 78) | static void printInorder(Node root)
    method main (line 89) | public static void main (String[] args) throws IOException{
  class Tree (line 124) | class Tree
    method diagonal (line 126) | public ArrayList<Integer> diagonal(Node root)

FILE: Different Bits Sum Pairwise.java
  class Solution (line 1) | public class Solution {
    method cntBits (line 2) | public int cntBits(ArrayList<Integer> A) {

FILE: Diffk II.java
  class Solution (line 1) | public class Solution {
    method diffPossible (line 3) | public int diffPossible(final int[] A, int B) {

FILE: Diffk.java
  class Solution (line 1) | public class Solution {
    method diffPossible (line 2) | public int diffPossible(int[] a, int k) {

FILE: Digital Root.java
  class Solution (line 1) | public class Solution {
    method solve (line 2) | public int solve(int A) {

FILE: Dijkstra’s_Algorithm_Shortest_distance.cpp
  function dij (line 3) | void dij(vector<pair<int, int>> adj[], int n, int src)
  function main (line 35) | int main()

FILE: Distance from the Source (Bellman-Ford Algorithm).java
  class Solution (line 3) | class Solution
    method bellman_ford (line 5) | static int[] bellman_ford(int V, ArrayList<ArrayList<Integer>> adj, in...

FILE: Distinct Numbers in Window.java
  class Solution (line 1) | public class Solution {
    method dNums (line 2) | public ArrayList<Integer> dNums(ArrayList<Integer> a, int B) {

FILE: Distinct Subsequences.java
  class Solution (line 1) | public class Solution {
    method numDistinct (line 2) | public int numDistinct(String s1, String s2) {

FILE: Distinct palindromic substrings.java
  class Solution (line 1) | class Solution {
    method palindromeSubStrs (line 2) | int palindromeSubStrs(String s) {

FILE: Distribute in Circle!.java
  class Solution (line 1) | public class Solution {
    method solve (line 2) | public int solve(int A, int B, int C) {

FILE: Divisible by 60.java
  class Solution (line 1) | public class Solution {
    method divisibleBy60 (line 2) | public int divisibleBy60(ArrayList<Integer> A) {

FILE: Dungeon Princess.java
  class Solution (line 1) | public class Solution {
    method calculateMinimumHP (line 2) | public int calculateMinimumHP(int[][] A) {

FILE: Earthquake and the Paint Shop - GFG/earthquake-and-the-paint-shop.java
  class GFG (line 7) | class GFG {
    method main (line 8) | public static void main(String args[]) throws IOException {
  class alphanumeric (line 28) | class alphanumeric {
    method alphanumeric (line 31) | alphanumeric(String name, int count) {
  class Solution (line 36) | class Solution {
    method sortedStrings (line 37) | alphanumeric[] sortedStrings(int N, String A[]) {

FILE: Egg Dropping Puzzle.java
  class Solution (line 1) | class Solution
    method eggDrop (line 5) | static int eggDrop(int n, int k)

FILE: Elements in the Range.java
  class Solution (line 1) | class Solution
    method check_elements (line 3) | boolean check_elements(int arr[], int n, int A, int B)

FILE: Equivalent Sub-Arrays - GFG/equivalent-sub-arrays.java
  class Solution (line 16) | class Solution
    method countDistinctSubarray (line 19) | static int countDistinctSubarray(int arr[], int n)
  class Array (line 53) | class Array {
    method main (line 56) | public static void main (String[] args) throws IOException{

FILE: Escape the Forbidden Forest.java
  class Sol (line 1) | class Sol
    method build_bridges (line 3) | public static int build_bridges(String str1 , String str2)

FILE: Eulerian Path in an Undirected Graph - GFG/eulerian-path-in-an-undirected-graph.java
  class GFG (line 7) | class GFG{
    method main (line 8) | public static void main(String args[])throws IOException
  class Solution (line 30) | class Solution{
    method eulerPath (line 31) | static int eulerPath(int n, int arr[][]){

FILE: Evaluate Expression To True.java
  class Solution (line 1) | public class Solution {
    method cnttrue (line 7) | public int cnttrue(String A) {
    method solveTrue (line 13) | int solveTrue(String A, int i, int j){
    method solveFalse (line 47) | int solveFalse(String A, int i, int j){

FILE: Evaluate Expression(Postfix).java
  class Solution (line 1) | public class Solution {
    method evalRPN (line 2) | public int evalRPN(String[] A) {

FILE: Even and Odd - GFG/even-and-odd.java
  class GFG (line 5) | class GFG {
    method main (line 6) | public static void main(String args[]) throws IOException {
    method check (line 25) | static int check(int arr[], int n)
  class Solution (line 62) | class Solution {
    method reArrange (line 63) | static void reArrange(int arr[], int N) {

FILE: Exactly one swap.java
  class Solution (line 1) | class Solution
    method countStrings (line 3) | long countStrings(String s)

FILE: Excel Column Title.java
  class Solution (line 1) | public class Solution {
    method convertToTitle (line 2) | public String convertToTitle(int n) {

FILE: Excel Sheet Column Number.java
  class Solution (line 1) | class Solution {
    method titleToNumber (line 2) | public int titleToNumber(String columnTitle) {
    method titleToNumber (line 14) | public int titleToNumber(String columnTitle) {
  class Solution (line 13) | class Solution {
    method titleToNumber (line 2) | public int titleToNumber(String columnTitle) {
    method titleToNumber (line 14) | public int titleToNumber(String columnTitle) {

FILE: Exceptionally odd.java
  class Solution (line 2) | class Solution {
    method getOddOccurrence (line 3) | int getOddOccurrence(int[] arr, int n) {

FILE: Fact Digit Sum.cpp
  class Solution (line 1) | class Solution{
    method FactDigit (line 3) | vector<int> FactDigit(int N)

FILE: Fact Digit Sum.java
  class Solution (line 1) | class Solution
    method FactDigit (line 3) | ArrayList<Integer> FactDigit(int N)

FILE: Fact Digit Sum/Fact-Digit-Sum.cpp
  class Solution (line 1) | class Solution{
    method factorial (line 3) | long factorial(long n){
    method FactDigit (line 7) | vector<int> FactDigit(int N)

FILE: Farthest number - GFG/farthest-number.java
  class GFG (line 7) | class GFG{
    method main (line 8) | public static void main(String args[]) throws IOException {
  class Solution (line 42) | class Solution
    method farNumber (line 44) | static int[] farNumber(int N, int a[]){

FILE: File Search.java
  class Solution (line 1) | public class Solution {
    method breakRecords (line 3) | public int breakRecords(int A, int[][] B) {
  class UnionFind (line 13) | class UnionFind {
    method UnionFind (line 19) | public UnionFind(int size) {
    method find (line 30) | public int find(int x) {
    method union (line 36) | public void union(int x, int y) {
    method getSets (line 53) | public int getSets() {

FILE: Fill the Tank - GFG/fill-the-tank.java
  class GFG (line 5) | class GFG
    method main (line 7) | public static void main(String args[])throws IOException
  class Solution (line 38) | class Solution
    method minimum_amount (line 40) | long minimum_amount(int [][]Edges, int N, int S, int []cap)
    method ans (line 54) | long ans(ArrayList<ArrayList<Integer>> adj, int s, int[] cap, boolean[...

FILE: Filling Bucket - GFG/filling-bucket.java
  class GFG (line 7) | class GFG {
    method main (line 8) | public static void main(String args[]) throws IOException {
  class Solution (line 25) | class Solution {
    method fillingBucket (line 26) | static int fillingBucket(int N) {

FILE: Find All Anagrams in a String.java
  class Solution (line 1) | class Solution {
    method findAnagrams (line 2) | public List<Integer> findAnagrams(String s, String p) {

FILE: Find Last Digit.java
  class Solution (line 2) | public class Solution {
    method solve (line 3) | public int solve(String A, String B) {

FILE: Find Missing And Repeating.java
  class Solve (line 1) | class Solve {
    method findTwoElement (line 2) | int[] findTwoElement(int arr[], int n) {

FILE: Find Original Array From Doubled Array.java
  class Solution (line 1) | class Solution {
    method findOriginalArray (line 2) | public int[] findOriginalArray(int[] changed) {

FILE: Find Prime numbers in a range.java
  class Solution (line 1) | class Solution {
    method primeRange (line 2) | ArrayList<Integer> primeRange(int M, int N) {
    method isPrime (line 10) | boolean isPrime(int n){

FILE: Find Second Smallest and Second Largest Element in an array without sorting/Find-Second-Smallest-and-Second-Largest-Element-in-an-array-with-out-sorting.cpp
  function main (line 5) | int main()

FILE: Find Three Consecutive Integers That Sum to a Given Number.py
  class Solution (line 1) | class Solution:
    method sumOfThree (line 2) | def sumOfThree(self, num: int) -> List[int]:

FILE: Find Transition Point - GFG/find-transition-point.java
  class Sorted_Array (line 4) | class Sorted_Array {
    method main (line 5) | public static void main(String args[]) {
  class GfG (line 22) | class GfG {
    method transitionPoint (line 23) | int transitionPoint(int arr[], int n){

FILE: Find a peak element.java
  class Solution (line 1) | public class Solution {
    method solve (line 2) | public int solve(ArrayList<Integer> A) {

FILE: Find all distinct subset (or subsequence) sums - GFG/Find all distinct subset (or subsequence) sums.cpp
  class Solution (line 5) | class Solution {
    method DistinctSum (line 9) | vector<int> DistinctSum(vector<int>nums){
    method solve (line 19) | void solve(int sum, vector<int>& nums, int n) {
    method DistinctSum (line 35) | vector<int> DistinctSum(vector<int> nums){
  class Solution (line 33) | class Solution {
    method DistinctSum (line 9) | vector<int> DistinctSum(vector<int>nums){
    method solve (line 19) | void solve(int sum, vector<int>& nums, int n) {
    method DistinctSum (line 35) | vector<int> DistinctSum(vector<int> nums){

FILE: Find all distinct subset (or subsequence) sums.java
  class Solution (line 1) | class Solution
    method DistinctSum (line 3) | public int[] DistinctSum(int[] nums)
    method dfs (line 18) | void dfs(int[]nums,int i,int sum,Set<Integer> set,boolean[][]dp){

FILE: Find all possible paths from top to bottom - GFG/find-all-possible-paths-from-top-to-bottom.java
  class IntArray (line 6) | class IntArray
    method input (line 8) | public static int[] input(BufferedReader br, int n) throws IOException
    method print (line 18) | public static void print(int[] a)
    method print (line 25) | public static void print(ArrayList<Integer> a)
  class IntMatrix (line 34) | class IntMatrix
    method input (line 36) | public static int[][] input(BufferedReader br, int n, int m) throws IO...
    method print (line 51) | public static void print(int[][] m)
    method print (line 61) | public static void print(ArrayList<ArrayList<Integer>> m)
  class GFG (line 72) | class GFG {
    method main (line 73) | public static void main(String[] args) throws IOException {
  class Solution (line 95) | class Solution {
    method findAllPossiblePaths (line 96) | public static ArrayList<ArrayList<Integer>> findAllPossiblePaths(int n...
    method dfs (line 106) | static void dfs(ArrayList<ArrayList<Integer>> ans,ArrayList<Integer>cu...
    method valid (line 124) | static boolean valid(int i,int j,int[][]grid){

FILE: Find an Replace in String - GFG/find-an-replace-in-string.java
  class GFG (line 5) | class GFG {
    method main (line 6) | public static void main(String args[]) throws IOException {
  class Solution (line 38) | class Solution {
    method findAndReplace (line 39) | static String findAndReplace(String s, int q, int[] ind, String[] src,...

FILE: Find length of Loop - GFG/find-length-of-loop.java
  class Node (line 8) | class Node
    method Node (line 13) | Node(int x)
  class GFG (line 20) | class GFG
    method makeLoop (line 22) | public static void makeLoop(Node head, Node tail, int x){
    method main (line 32) | public static void main (String[] args){
  class Solution (line 75) | class Solution
    method countNodesinLoop (line 78) | static int countNodesinLoop(Node head){

FILE: Find pairs with given sum in doubly linked list.cpp
  class Solution (line 1) | class Solution
    method findPairsWithGivenSum (line 4) | vector<pair<int, int>> findPairsWithGivenSum(Node *head, int target)

FILE: Find pairs with given sum in doubly linked list.java
  class Solution (line 2) | class Solution {
    method findPairsWithGivenSum (line 3) | public static ArrayList<ArrayList<Integer>> findPairsWithGivenSum(int ...

FILE: Find rectangle with corners as 1.java
  class Solution (line 1) | public class Solution {
    method ValidCorner (line 2) | static boolean ValidCorner(int mat[][]) {

FILE: Find the Difference.java
  class Solution (line 1) | class Solution {
    method findTheDifference (line 2) | public char findTheDifference(String s, String t) {

FILE: Find the Maximum Flow - GFG/find-the-maximum-flow.java
  class GFG (line 5) | class GFG{
    method main (line 6) | public static void main(String args[]) throws IOException {
  class Solution (line 35) | class Solution
    method bfs (line 37) | int bfs(int[][] g,int[] p,int source,int sink,int n){
    method ford (line 63) | int ford(int[][] g,int source,int sink,int n){
    method solve (line 80) | int solve(int N, int M, ArrayList<ArrayList<Integer>> Edges)

FILE: Find the nearest smaller number in left.cpp
  class Solution (line 3) | class Solution{
    method leftSmaller (line 5) | vector<int> leftSmaller(int n, int a[]){

FILE: Find the number of islands.java
  class axis (line 1) | class axis{
    method axis (line 4) | public axis(int x,int y){
    method equals (line 8) | @Override
  class Solution (line 18) | class Solution {
    method numIslands (line 20) | public int numIslands(char[][] grid) {
    method clearIsland (line 34) | public void clearIsland(char[][]grid,axis ax){

FILE: Find whether path exist - GFG/find-whether-path-exist.java
  class GFG (line 5) | class GFG
    method main (line 7) | public static void main(String[] args) throws IOException
  class Solution (line 34) | class Solution
    method is_Possible (line 38) | public boolean is_Possible(int[][] grid){
    method bfs (line 52) | public void bfs(int[][]a,boolean[][]vis,int i,int j){
    method valid (line 65) | public boolean valid(int[][]a,boolean[][]vis,int i,int j){

FILE: Find-Pattern/find_patter.java
  class GFG (line 3) | class GFG{
    method findPattern (line 5) | public static int findPattern(String s, String p){

FILE: Finding Profession - GFG/finding-profession.java
  class GFG (line 7) | class GFG{
    method main (line 8) | public static void main(String args[])throws IOException
  class Solution (line 28) | class Solution{
    method countSetBits (line 29) | static int countSetBits(int n)
    method profession (line 39) | static char profession(int level, int pos){

FILE: Firing employees.java
  class Solution (line 1) | class Solution {
    method firingEmployees (line 2) | static int firingEmployees(int arr[], int n) {
    method dfs (line 15) | static int dfs(int[]arr,int ind,int[]dp){
    method isPrime (line 22) | static boolean isPrime(int n)

FILE: First Missing Integer.java
  class Solution (line 1) | public class Solution {
    method firstMissingPositive (line 2) | public int firstMissingPositive(ArrayList<Integer> A) {

FILE: First Repeating element.java
  class Solution (line 1) | public class Solution {
    method solve (line 2) | public int solve(ArrayList<Integer> A) {

FILE: Flip.java
  class Solution (line 1) | public class Solution {
    method flip (line 2) | public ArrayList<Integer> flip(String A) {

FILE: Foldable Binary Tree.cpp
  function HEAD (line 1) | HEAD
  function checkMirror (line 31) | bool checkMirror(Node* root1, Node* root2)

FILE: Foldable Binary Tree.java
  class Tree (line 1) | class Tree
    method IsFoldable (line 4) | boolean IsFoldable(Node node)
    method dfs (line 10) | boolean dfs(Node a,Node b){

FILE: Form a palindrome - GFG/form-a-palindrome.java
  class GFG (line 7) | class GFG
    method main (line 9) | public static void main(String args[])throws IOException
  class Solution (line 26) | class Solution{
    method find (line 28) | private static int find(int l, int r, String s){
    method findMinInsertions (line 43) | int findMinInsertions(String S){

FILE: Form coils in a matrix - GFG/form-coils-in-a-matrix.java
  class GFG (line 7) | class GFG {
    method main (line 8) | public static void main(String args[]) throws IOException {
  class Solution (line 33) | class Solution{
    method formCoils (line 34) | static int[][] formCoils(int n){

FILE: Fraction Trouble - GFG/fraction-trouble.java
  class GFG (line 6) | class GFG
    method main (line 8) | public static void main(String[] args) throws IOException
  class Solution (line 31) | class Solution
    method numAndDen (line 33) | public int[] numAndDen(int n, int d)
    method gcdnumber (line 51) | static int gcdnumber(int a, int b)

FILE: Fraction.java
  class Solution (line 1) | public class Solution {
    method fractionToDecimal (line 2) | public String fractionToDecimal(int numerator, int denominator) {

FILE: Friends Pairing Problem DP.java
  class Solution (line 1) | class Solution
    method countFriendsPairings (line 3) | public long countFriendsPairings(int n)
    method helper (line 9) | long helper(int n,long[] dp,long mod){

FILE: Friends Pairing Problem.cpp
  class Solution (line 1) | class Solution
    method countFriendsPairings (line 8) | int countFriendsPairings(int n)

FILE: Friends Pairing Problem.java
  class Solution (line 1) | class Solution
    method countFriendsPairings (line 3) | public long countFriendsPairings(int n)

FILE: GFG/0 -1 Knapsack Problem/0 - 1 Knapsack Problem.java
  class Solution (line 1) | class Solution
    method myfunc (line 7) | static int myfunc(int w, int wt[], int val[], int n, int[][] ans){
    method knapSack (line 16) | static int knapSack(int W, int wt[], int val[], int n)

FILE: GFG/2D Hopscotch/2D Hopscotch.java
  class Solution (line 1) | class Solution{
    method hopscotch (line 2) | static int hopscotch(int n, int m, int mat[][], int ty, int i, int j)
    method isValid (line 47) | static boolean isValid(int i,int j,int n,int m){

FILE: GFG/3 Divisors/3 Divisors.java
  class Solution (line 1) | class Solution{
    method threeDivisors (line 2) | static ArrayList<Integer> threeDivisors(ArrayList<Long> query, int qn){

FILE: GFG/A Game of LCM/A Game of LCM.java
  class Solution (line 2) | class Solution {
    method maxGcd (line 3) | long maxGcd(int N) {
    method solve (line 7) | long solve(int n){
    method gcd (line 19) | long gcd(long a,long b){

FILE: GFG/A difference of values and indexes/A difference of values and indexes.java
  class Solution (line 1) | class Solution{
    method maxDistance (line 5) | public static int maxDistance (int arr[], int n) {

FILE: GFG/Absolute List Sorting/Absolute List Sorting.java
  class Solution (line 1) | class Solution
    method sortList (line 3) | Node sortList(Node head) {

FILE: GFG/Absolute difference divisible by K/Absolute difference divisible by K.java
  class Solution (line 1) | class Solution {
    method countPairs (line 2) | static long countPairs(int n, int[] arr, int k) {

FILE: GFG/Add Binary Strings/Add Binary Strings.java
  class Solution (line 1) | class Solution {
    method addBinary (line 2) | String addBinary(String A, String B) {

FILE: GFG/Aggressive Cows/Aggressive Cows.java
  class Solution (line 1) | class Solution {
    method solve (line 2) | public static int solve(int n, int k, int[] stalls) {
    method isPossible (line 16) | static boolean isPossible(int k,int[]arr,int minDis){

FILE: GFG/Akku and Binary Numbers/Akku and Binary Numbers.java
  class Solution (line 1) | class Solution{
    method precompute (line 3) | void precompute(){
    method solve (line 6) | long solve(long L, long R){

FILE: GFG/Alex Travelling/Alex Travelling.cpp
  class Solution (line 1) | class Solution {
    method minimumCost (line 4) | int minimumCost(vector<vector<int>>& flights, int n, int k) {

FILE: GFG/Alex Travelling/Alex Travelling.java
  class Solution (line 1) | class Solution {
    class Pair (line 2) | class Pair{
      method Pair (line 5) | Pair(int n,int w){
    method minimumCost (line 10) | int minimumCost(int[][] flights, int n, int k) {

FILE: GFG/Alternate Vowel and Consonant String/Alternate Vowel and Consonant String.java
  class Solution (line 1) | class Solution{
    method rearrange (line 2) | public String rearrange(String S, int N){
    method rearrange (line 63) | public String rearrange(String S, int N){
    method getRes (line 112) | public String getRes(int []f, int i, int j, StringBuilder sb) {
    method getNextVowel (line 146) | public int getNextVowel(int f[]) {
    method countVowels (line 154) | public int countVowels(String s, boolean isVowel) {
  class Solution (line 62) | class Solution{
    method rearrange (line 2) | public String rearrange(String S, int N){
    method rearrange (line 63) | public String rearrange(String S, int N){
    method getRes (line 112) | public String getRes(int []f, int i, int j, StringBuilder sb) {
    method getNextVowel (line 146) | public int getNextVowel(int f[]) {
    method countVowels (line 154) | public int countVowels(String s, boolean isVowel) {

FILE: GFG/Array Pair Sum Divisibility Problem/Array Pair Sum Divisibility Problem.java
  class Solution (line 1) | class Solution {
    method canPair (line 2) | public boolean canPair(int[] nums, int k) {

FILE: GFG/Array Removals/Array Removals.cpp
  class Solution (line 1) | class Solution{
    method removals (line 3) | int removals(vector<int>& arr, int k){

FILE: GFG/Array Removals/Array Removals.java
  class Solution (line 1) | class Solution {
    method removals (line 2) | int removals(int[] arr, int n, int k) {

FILE: GFG/Articulation Point - I/Articulation Point - I.java
  class Solution (line 1) | class Solution
    method articulationPoints (line 5) | public ArrayList<Integer> articulationPoints(int V,ArrayList<ArrayList...
    method dfs (line 30) | void dfs(int u,boolean[]ap,ArrayList<ArrayList<Integer>> adj,int[]pare...

FILE: GFG/Asteroid Collision/Asteroid Collision.cpp
  class Solution (line 1) | class Solution {
    method asteroidCollision (line 3) | vector<int> asteroidCollision(int N, vector<int> &asteroids) {

FILE: GFG/Asteroid Collision/Asteroid Collision.java
  class Solution (line 2) | class Solution {
    method asteroidCollision (line 3) | public static int[] asteroidCollision(int N, int[] arr) {

FILE: GFG/Balanced string/Balanced string.java
  class Solution (line 1) | class Solution {
    method BalancedString (line 2) | static String BalancedString(int N) {

FILE: GFG/Base Equivalance/Base Equivalence.java
  class Solution (line 20) | class Solution
    method baseEquiv (line 22) | String baseEquiv(int n, int m)
    method calculateDigits (line 36) | public int calculateDigits(int n, int m) {

FILE: GFG/Base Equivalence/Base Equivalence.java
  class Solution (line 2) | class Solution
    method baseEquiv (line 4) | String baseEquiv(int n, int m)

FILE: GFG/Binary Tree to DLL/Binary Tree to DLL.cpp
  function Node (line 8) | Node * bToDLL(Node *root)
    type Node (line 58) | struct Node
    type Node (line 59) | struct Node
    method Node (line 61) | Node(int x){
  type Node (line 55) | struct Node
    type Node (line 58) | struct Node
    type Node (line 59) | struct Node
    method Node (line 61) | Node(int x){
  class Solution (line 68) | class Solution
    method inorder (line 72) | void inorder(Node* root){
    method Node (line 80) | Node * bToDLL(Node *root)

FILE: GFG/Binary Tree to DLL/Binary Tree to DLL.java
  class Solution (line 1) | class Solution
    method bToDLL (line 4) | Node bToDLL(Node root)
    method dfs (line 10) | Node[] dfs(Node root){
    method bToDLL (line 51) | Node bToDLL(Node root)
    method inorder (line 94) | public void inorder(Node root,ArrayList<Node> al){
  class Solution (line 49) | class Solution
    method bToDLL (line 4) | Node bToDLL(Node root)
    method dfs (line 10) | Node[] dfs(Node root){
    method bToDLL (line 51) | Node bToDLL(Node root)
    method inorder (line 94) | public void inorder(Node root,ArrayList<Node> al){

FILE: GFG/Black and White/Black and White.java
  class BlackAndWhite (line 1) | class BlackAndWhite
    method numOfWays (line 5) | static long numOfWays(int N, int M)
    method valid (line 24) | static boolean valid(int i,int j,int n,int m){

FILE: GFG/Break a number/Break a number.java
  class Solution (line 1) | class Solution{
    method waysToBreakNumber (line 2) | int waysToBreakNumber(int N){

FILE: GFG/Build the smallest/Build the smallest.java
  class Solution (line 1) | class Solution {
    method buildLowestNumber (line 2) | static String buildLowestNumber(String str, int k) {

FILE: GFG/Burst Balloons/Burst Balloons.java
  class Solution (line 1) | class Solution {
    method maxCoins (line 3) | public static int maxCoins(int N, int[] arr) {
    method dfs (line 14) | static int dfs(int l,int r,int[]arr){

FILE: GFG/Check for BST/Check for BST.java
  class Solution (line 1) | public class Solution
    method isBST (line 4) | boolean isBST(Node root, int minValue, int maxValue) {
    method isBST (line 9) | boolean isBST(Node root)

FILE: GFG/Check if all levels of two trees are anagrams or not/Check if all levels of two trees are anagrams or not.java
  class Solution (line 1) | class Solution {
    method areAnagrams (line 2) | public static boolean areAnagrams(Node node1, Node node2) {

FILE: GFG/Check if it is possible to convert one string into another with given constraints/Check if it is possible to convert one string into another with given constraints.java
  class Solution (line 1) | class Solution {
    method isItPossible (line 2) | int isItPossible(String S, String T, int M, int N) {

FILE: GFG/Chicks in a Zoo/Chicks in a Zoo.cpp
  class solution (line 1) | class solution{
    method NoOfChicks (line 3) | long long int NoOfChicks(int n){

FILE: GFG/Chicks in a Zoo/Chicks in a Zoo.java
  class Solution (line 1) | class Solution
    method NoOfChicks (line 3) | public long NoOfChicks(int N)

FILE: GFG/Complement/Complement.java
  class Solve (line 4) | class Solve {
    method findRange (line 6) | Vector<Integer> findRange(String str, int n) {

FILE: GFG/Construct Binary Tree from String with bracket representation/Construct Binary Tree from String with bracket representation.cpp
  class Solution (line 1) | class Solution{
    method Node (line 4) | Node* solve(string str)
    method Node (line 54) | Node *treeFromString(string str){

FILE: GFG/Construct Binary Tree from String with bracket representation/Construct Binary Tree from String with bracket representation.java
  class Solution (line 1) | class Solution {
    method treeFromString (line 2) | public static Node treeFromString(String s) {
    method dfs (line 7) | static Node dfs(int[] idx,String s){

FILE: GFG/Container With Most Water/Container With Most Water.cpp
  function maxArea (line 1) | long long maxArea(long long A[], int len)

FILE: GFG/Container With Most Water/Container With Most Water.java
  class Solve (line 2) | class Solve{
    method maxArea (line 4) | long maxArea(int A[], int len){

FILE: GFG/Count Lucky Permutations/Count Lucky Permutations.java
  class Solution (line 5) | class Solution {
    method luckyPermutations (line 6) | long luckyPermutations(int N, int M, int arr[], int[][] graph) {

FILE: GFG/Count all possible paths from top left to bottom right/Count all possible paths from top left to bottom right oc4.cpp
  class Solution (line 3) | class Solution {
    method mem (line 6) | long long int mem(int i, int j, int m, int n, vector<vector<long long ...
    method numberOfPaths (line 13) | long long int numberOfPaths(int m, int n){
  function main (line 20) | int main() {

FILE: GFG/Count all possible paths from top left to bottom right/Count all possible paths from top left to bottom right.cpp
  class Solution (line 1) | class Solution {
    method numberOfPaths (line 3) | long long int numberOfPaths(int m, int n){

FILE: GFG/Count even length/Count even length.java
  class Solution (line 1) | class Solution
    method compute_value (line 4) | public int  compute_value(int n)
    method power (line 22) | long power(long a,long b){

FILE: GFG/Count of Subarrays/Count of Subarrays.cpp
  class Solution (line 1) | class Solution{
    method ll (line 5) | ll countSubarray(int arr[], int n, int k) {

FILE: GFG/Count of Subarrays/Count of Subarrays.java
  class Solution (line 1) | class Solution {
    method countSubarray (line 3) | long countSubarray(int arr[], int n, int k) {
    method countSubarray (line 27) | long countSubarray(int arr[], int n, int k) {
  class Solution (line 25) | class Solution {
    method countSubarray (line 3) | long countSubarray(int arr[], int n, int k) {
    method countSubarray (line 27) | long countSubarray(int arr[], int n, int k) {

FILE: GFG/Count the Substring/Count the Substring.cpp
  class Solution (line 1) | class Solution{
    method countSubstring (line 3) | long long countSubstring(string s){

FILE: GFG/Count the Substring/Count the Substring.java
  class Solution (line 1) | class Solution {
    method countSubstring (line 2) | long countSubstring(String S){

FILE: GFG/Counting Elements in Two Arrays/Counting Elements in Two Arrays.cpp
  class Solution (line 1) | class Solution{
    method countEleLessThanOrEqual (line 3) | vector<int> countEleLessThanOrEqual(int arr1[], int arr2[], int m, int n)

FILE: GFG/Counting Elements in Two Arrays/Counting Elements in Two Arrays.java
  class Solution (line 1) | class Solution
    method countEleLessThanOrEqual (line 3) | public static ArrayList<Integer> countEleLessThanOrEqual(int arr1[], i...
    method binarySearch (line 13) | static int binarySearch(int[]arr,int target,int i,int j){

FILE: GFG/Counting Elements in Two Arrays/Counting Elements in Two Arrays.py
  class Solution (line 2) | class Solution:
    method countEleLessThanOrEqual (line 3) | def countEleLessThanOrEqual(self,arr1,n1,arr2,n2):

FILE: GFG/Cycle in Directed Graph/Cycle in Directed Graph.java
  class Solution (line 1) | public class Solution {
    method solve (line 2) | public int solve(int vtces, ArrayList<ArrayList<Integer>> B) {
    method isCycle (line 26) | public static boolean isCycle(ArrayList<Edge> [] graph,int src,boolean...
  class Edge (line 41) | class Edge{
    method Edge (line 44) | Edge(int src,int nbr){

FILE: GFG/Cycle in Undirected Graph/Cycle in Undirected Graph.java
  class Solution (line 1) | public class Solution {
    method solve (line 2) | public int solve(int A, ArrayList<ArrayList<Integer>> B) {
    method dfs (line 19) | public boolean dfs(ArrayList<ArrayList<Integer>> adj, boolean vis[],in...

FILE: GFG/Decode the string/Decode the string.cpp
  class Solution (line 1) | class Solution{
    method string (line 3) | string decodedString(string s){

FILE: GFG/Decode the string/Decode the string.java
  class Solution (line 1) | class Solution{
    method decodedString (line 2) | static String decodedString(String s){
    method decodedString (line 49) | static String decodedString(String s){
  class Solution (line 48) | class Solution{
    method decodedString (line 2) | static String decodedString(String s){
    method decodedString (line 49) | static String decodedString(String s){

FILE: GFG/Distance of nearest cell having 1/Distance of nearest cell having 1.java
  class Solution (line 1) | class Solution
    method nearest (line 4) | public int[][] nearest(int[][] grid)

FILE: GFG/Earthquake and the Paint Shop/Earthquake and the Paint Shop.cpp
  type alphanumeric (line 1) | struct alphanumeric {
  class Solution (line 5) | class Solution {
    method sortedStrings (line 7) | vector<alphanumeric> sortedStrings(int N, vector<string> A) {

FILE: GFG/Enemy/Enemy.cpp
  class Solution (line 1) | class Solution
    method largestArea (line 4) | int largestArea(int n,int m,int k,vector<vector<int>> &enemy)

FILE: GFG/Enemy/Enemy.java
  class Solution (line 1) | class Solution {
    method largestArea (line 2) | public static int largestArea(int n,int m,int k,int[][] enemy) {

FILE: GFG/Fill up buckets/Fill up buckets.cpp
  class Solution (line 8) | class Solution{
    method totalWays (line 10) | int totalWays(int n, vector<int>capacity) {

FILE: GFG/Fill up buckets/Fill up buckets.java
  class Solution (line 1) | class Solution{
    method totalWays (line 2) | public int totalWays(int n, int[] arr) {

FILE: GFG/Filling Bucket/Filling Bucket.cpp
  class Solution (line 1) | class Solution {
    method fillingBucket (line 3) | int fillingBucket(int N) {

FILE: GFG/Filling Bucket/Filling Bucket.java
  class Solution (line 1) | class Solution {
    method fillingBucket (line 2) | static int fillingBucket(int N) {

FILE: GFG/Find The Safe Position/Find The Safe Position s30.cpp
  class Solution (line 3) | class Solution {
    method safePos (line 5) | int safePos(int n, int k) {
  function main (line 12) | int main() {

FILE: GFG/Find The Safe Position/Find the Safe Position.java
  class Solution (line 1) | class Solution {
    method safePos (line 2) | static int safePos(int n, int k) {

FILE: GFG/Find minimum number of Laptops required/Find minimum number of Laptops required.cpp
  class Solution (line 1) | class Solution {
    method minLaptops (line 3) | int minLaptops(int N, int start[], int end[]) {

FILE: GFG/Find minimum number of Laptops required/Find minimum number of Laptops required.java
  class Solution (line 5) | class Solution {
    method minLaptops (line 6) | public int minLaptops(int n, int[] start, int[] end) {

FILE: GFG/Find patterns/Find patterns.cpp
  class Solution (line 1) | class Solution{
    method numberOfSubsequences (line 3) | int numberOfSubsequences(string S, string W){

FILE: GFG/Find patterns/Find patterns.java
  class Solution (line 1) | class Solution{
    method numberOfSubsequences (line 2) | static int numberOfSubsequences(String S, String W){

FILE: GFG/Find the N-th character/Find the N-th character.cpp
  class Solution (line 1) | class Solution{
    method nthCharacter (line 3) | char nthCharacter(string S, int R, int N) {

FILE: GFG/Find the first node of loop in linked list/Find the first node of loop in linked list.java
  class Solution (line 1) | class Solution {
    method findFirstNode (line 3) | public static int findFirstNode(Node head){

FILE: GFG/Find the longest string/Find the longest string.java
  class TrieNode (line 1) | class TrieNode{
    method TrieNode (line 4) | TrieNode(){
  class Solution (line 11) | class Solution {
    method longestString (line 13) | public static String longestString(int n, String[] arr) {
    method isPresent (line 39) | static boolean isPresent(String s){
    method insert (line 49) | static void insert(String s){

FILE: GFG/Find the maximum GCD of the siblings of a Binary Tree/Find the maximum GCD of the siblings of a Binary Tree.java
  class Solution (line 1) | class Solution {
    method maxGCD (line 4) | int maxGCD(Node root) {
    method dfs (line 11) | int dfs(Node root){
    method gcd (line 26) | int gcd(int a,int b){

FILE: GFG/Fitting The Array/Fitting The Array s28.cpp
  class Solution (line 3) | class Solution{
    method isFit (line 6) | bool isFit(int arr[], int brr[], int n){
  function main (line 18) | int main()

FILE: GFG/Fitting The Array/Fitting The Array.cpp
  class Solution (line 1) | class Solution{
    method isFit (line 4) | bool isFit(int arr[], int brr[], int n){

FILE: GFG/Fitting The Array/Fitting The Array.java
  class Solution (line 1) | class Solution{
    method isFit (line 5) | public static boolean isFit (int arr[], int brr[], int n) {

FILE: GFG/Flatten binary tree to linked list/Flatten binary tree to linked list.java
  class Solution (line 1) | class Solution
    method flatten (line 4) | public static void flatten(Node root)
    method dfs (line 10) | static void dfs(Node root){

FILE: GFG/Flattening a Linked List/Flattening a Linked List.java
  class GfG (line 1) | class GfG
    method flatten (line 3) | Node flatten(Node root)
    method merge (line 15) | Node merge(Node l1,Node l2){

FILE: GFG/Floyd Warshall/Floyd Warshall.java
  class Solution (line 1) | class Solution
    method shortest_distance (line 3) | public void shortest_distance(int[][] mat)

FILE: GFG/Floyd Warshall/FloydWarshall.cpp
  class Solution (line 1) | class Solution {

FILE: GFG/Form a palindrome/Form a palindrome.py
  class Solution (line 3) | class Solution:
    method countMin (line 4) | def countMin(self, Str):

FILE: GFG/GCD Array/GCD Array.java
  class Solution (line 1) | class Solution {
    method solve (line 2) | public static int solve(int N, int K, int[] arr) {

FILE: GFG/Geek and Number String/Geek and Number Str.cpp
  function minLength (line 1) | int minLength(string s, int n) {

FILE: GFG/Geek and Strings/Geek and Strings.java
  class Solution (line 1) | class Solution{
    class Trie (line 2) | static class Trie {
    method prefixCount (line 6) | static List<Integer> prefixCount(int N, int Q, String li[], String que...

FILE: GFG/Geek in a Maze/Geek in a maze.java
  class Pair (line 9) | class Pair
    method Pair (line 13) | Pair(int x, int y, int u_left, int d_left)
  class Solution (line 23) | class Solution
    method isValid (line 26) | private static boolean isValid(int x, int y, boolean visited[][], char...
    method numberOfCells (line 33) | public static int numberOfCells(int n, int m, int r, int c, int u, int...
  class GFG (line 91) | public class GFG {
    method main (line 92) | public static void main (String[] args) {

FILE: GFG/Grouping Of Numbers/Grouping Of Numbers.java
  class Solution (line 1) | class Solution {
    method maxGroupSize (line 2) | static int maxGroupSize(int[] a, int N, int k) {
    method maxGroupSize (line 31) | static int maxGroupSize(int[] arr, int N, int K) {
  class Solution (line 30) | class Solution {
    method maxGroupSize (line 2) | static int maxGroupSize(int[] a, int N, int k) {
    method maxGroupSize (line 31) | static int maxGroupSize(int[] arr, int N, int K) {

FILE: GFG/Hamiltonian Path/Hamiltonian Path.java
  class Solution (line 1) | class Solution
    method check (line 4) | boolean check(int N, int M, ArrayList<ArrayList<Integer>> Edges)
    method dfs (line 26) | boolean dfs(int curr,Set<Integer> set,Map<Integer,ArrayList<Integer>> ...

FILE: GFG/Help Ishaan/Help Ishaan.cpp
  function NthTerm (line 25) | int NthTerm(int N){

FILE: GFG/Help Ishaan/Help Ishaan.java
  class Solution (line 1) | class Solution
    method isPrime (line 3) | public static boolean isPrime(int n){
    method NthTerm (line 23) | public int NthTerm(int n)
    method isPrime (line 55) | public static boolean isPrime(int num){
    method NthTerm (line 66) | public int NthTerm(int n)
  class Solution (line 53) | class Solution
    method isPrime (line 3) | public static boolean isPrime(int n){
    method NthTerm (line 23) | public int NthTerm(int n)
    method isPrime (line 55) | public static boolean isPrime(int num){
    method NthTerm (line 66) | public int NthTerm(int n)

FILE: GFG/Help a Thief/Help a thief.cpp
  class Solution (line 10) | class Solution
    method maxCoins (line 13) | int maxCoins(int A[], int B[], int T, int N)
  function main (line 38) | int main() {

FILE: GFG/Help the Old Man/Help the old man.java
  class GFG (line 7) | class GFG{
    method main (line 8) | public static void main(String args[])throws IOException
  class Solution (line 25) | class Solution{
    method hanoi (line 26) | public static void hanoi(int N,int A,int B,int C,ArrayList<ArrayList<I...
    method shiftPile (line 35) | static List<Integer> shiftPile(int N, int n){

FILE: GFG/Hungry Pizza Lovers/Hungry pizza lovers.java
  class Array (line 12) | class Array {
    method main (line 15) | public static void main (String[] args) throws IOException{
  class Complete (line 51) | class Complete{
    method permute (line 55) | public static ArrayList<Integer> permute (int arr[][], int n) {

FILE: GFG/IPL 2021 - Match Day 2/IPL 2021 - Match Day 2 gfg med s22.cpp
  class Solution (line 4) | class Solution {
    method max_of_subarrays (line 6) | vector<int> max_of_subarrays(vector<int> arr, int n, int k) {
  function main (line 23) | int main() {

FILE: GFG/IPL/IPL.cpp
  function max_of_subarrays (line 1) | vector<int> max_of_subarrays(vector<int> arr, int n, int k) {

FILE: GFG/Ishaan Loves Chocolates/Ishaan loves chocolates.py
  function chocolates (line 3) | def chocolates (arr, n):

FILE: GFG/Josephus problem/Josephus problem.java
  class Solution (line 1) | class Solution
    method josephus (line 3) | public int josephus(int n, int k)

FILE: GFG/Jump Game/Jump game.java
  class GFG (line 5) | class GFG {
    method main (line 6) | public static void main(String args[]) throws IOException {
  class Solution (line 29) | class Solution {
    method canReach (line 30) | static int canReach(int A[], int N) {

FILE: GFG/Jumping Numbers/Jumping Numbers.cpp
  class Solution (line 1) | class Solution {
    method jumpingNums (line 3) | long long jumpingNums(long long x) {

FILE: GFG/Knight Walk/Knight Walk.cpp
  class Solution (line 6) | class Solution {
    method minStepToReachTarget (line 8) | int minStepToReachTarget(vector<int>&KnightPos, vector<int>&TargetPos,...
    method isValid (line 60) | bool isValid(int r, int c, int n){
    method minStepToReachTarget (line 64) | int minStepToReachTarget(vector<int>&KnightPos, vector<int>&TargetPos,...
  class Solution (line 58) | class Solution {
    method minStepToReachTarget (line 8) | int minStepToReachTarget(vector<int>&KnightPos, vector<int>&TargetPos,...
    method isValid (line 60) | bool isValid(int r, int c, int n){
    method minStepToReachTarget (line 64) | int minStepToReachTarget(vector<int>&KnightPos, vector<int>&TargetPos,...

FILE: GFG/Knight Walk/Knight Walk.java
  class Pair (line 1) | class Pair{
    method Pair (line 5) | Pair(int i,int j,int d){
  class Solution (line 11) | class Solution
    method minStepToReachTarget (line 13) | public int minStepToReachTarget(int KnightPos[], int TargetPos[], int N)
    method isValid (line 41) | boolean isValid(int i,int j,boolean[][]vis,int N){

FILE: GFG/Kth smallest element/Kth smallest element.py
  class Solution (line 4) | class Solution:
    method kthSmallest (line 5) | def kthSmallest(self,arr, l, r, k):

FILE: GFG/LCM Triplet/LCM Triplet.java
  class Solution (line 1) | class Solution {
    method lcmTriplets (line 2) | long lcmTriplets(long N) {

FILE: GFG/Largest subtree sum in a tree/Largest subtree sum in a tree.cpp
  class Solution (line 1) | class Solution {
    method subtree (line 3) | int subtree(Node* root, int& ans){
    method findLargestSubtreeSum (line 13) | int findLargestSubtreeSum(Node* root){

FILE: GFG/Largest subtree sum in a tree/Largest subtree sum in a tree.java
  class Solution (line 1) | class Solution {
    method findLargestSubtreeSum (line 3) | public static int findLargestSubtreeSum(Node root) {
    method dfs (line 9) | static int dfs(Node root){

FILE: GFG/Last modified ball/Last modified ball.java
  class Solution (line 1) | class Solution {
    method solve (line 2) | int solve(int N, int[] A) {

FILE: GFG/Longest Bitonic subsequence/Longest Bitonic subsequence.java
  class Solution (line 1) | class Solution
    method LongestBitonicSequence (line 3) | public int LongestBitonicSequence(int[] nums)

FILE: GFG/Longest Perfect Piece/Longest Perfect Piece.java
  class Solution (line 1) | class Solution {
    method longestPerfectPiece (line 2) | static int longestPerfectPiece(int[] arr, int N) {

FILE: GFG/Magic Triplets/Magic Triplets.java
  class Solution (line 1) | class Solution{
    method countTriplets (line 2) | public int countTriplets(int[] nums){

FILE: GFG/Majority Element/Majority Element.java
  class Solution (line 3) | class Solution {
    method majorityElement (line 4) | public int majorityElement(int[] nums) {
    method majorityElement (line 24) | public int majorityElement(int[] nums) {
    method recurse (line 28) | public int recurse(int[] nums, int start){
    method majorityElement (line 48) | public int majorityElement(int[] nums) {
  class Solution (line 22) | class Solution {
    method majorityElement (line 4) | public int majorityElement(int[] nums) {
    method majorityElement (line 24) | public int majorityElement(int[] nums) {
    method recurse (line 28) | public int recurse(int[] nums, int start){
    method majorityElement (line 48) | public int majorityElement(int[] nums) {
  class Solution (line 47) | class Solution {
    method majorityElement (line 4) | public int majorityElement(int[] nums) {
    method majorityElement (line 24) | public int majorityElement(int[] nums) {
    method recurse (line 28) | public int recurse(int[] nums, int start){
    method majorityElement (line 48) | public int majorityElement(int[] nums) {

FILE: GFG/Majority Element/Majority Element.py
  class Solution (line 4) | class Solution:
    method majorityElement (line 5) | def majorityElement(self, arr, n):

FILE: GFG/Make array elements unique/Make array elements unique.java
  class Solution (line 1) | class Solution {
    method minIncrements (line 2) | public long minIncrements(int[] arr, int N) {

FILE: GFG/Max Min/Max Min.cpp
  class Solution (line 1) | class Solution
    method findSum (line 4) | int findSum(int A[], int N)

FILE: GFG/Max Min/Max Min.java
  class Solution (line 2) | class Solution
    method findSum (line 4) | public static int findSum(int A[],int N)

FILE: GFG/Max Min/Max Min.py
  class Solution (line 1) | class Solution:
    method findSum (line 2) | def findSum(self,A,N):

FILE: GFG/Maximize the sum of selected numbers from an array to make it empty/Maximize the sum of selected numbers from a sorted array to make it empty.cpp
  class Solution (line 1) | class Solution{
    method maximizeSum (line 3) | int maximizeSum(int a[], int n)

FILE: GFG/Maximize the sum of selected numbers from an array to make it empty/Maximize the sum of selected numbers from an array to make it empty.java
  class Complete (line 1) | class Complete{
    method maximizeSum (line 5) | public static int maximizeSum (int arr[], int n) {

FILE: GFG/Maximum Number of Toys/Maximum Number of Toys.java
  class Pair (line 3) | class Pair<K,V>{
    method Pair (line 6) | public Pair(K a,V b){
    method getCost (line 10) | public K getCost(){
    method getIndex (line 13) | public V getIndex(){
  class Solution (line 19) | class Solution {
    method maximumToys (line 20) | ArrayList<Integer> maximumToys(int N, int A[],

FILE: GFG/Maximum Profit By Choosing A Subset Of Intervals/Maximum Profit By Choosing A Subset Of Intervals.java
  class Solution (line 1) | class Solution {
    method maximum_profit (line 2) | public static int maximum_profit(int n, int[][] arr) {
    method rec (line 11) | static int rec(int index,int[][]arr,int n,int[]dp){
    method findNext (line 19) | static int findNext(int i,int prevEnd,int[][]arr,int n){

FILE: GFG/Maximum Sub Array/Maximum Sub Array.java
  class Solution (line 1) | class Solution {
    method findSubarray (line 3) | ArrayList<Integer> findSubarray(int a[], int n) {

FILE: GFG/Maximum Sub-String after at most K changes/Maximum Sub-String after at most K changes.cpp
  class Solution (line 1) | class Solution {
    method characterReplacement (line 3) | int characterReplacement(string s, int k){

FILE: GFG/Maximum Sub-String after at most K changes/Maximum Sub-String after at most K changes.java
  class Solution (line 1) | class Solution
    method characterReplacement (line 3) | public int characterReplacement(String s, int k)
    method find (line 21) | int find(int[]arr,int k){

FILE: GFG/Maximum Sum LCM/Maximum Sum LCM.java
  class Solution (line 2) | class Solution {
    method maxSumLCM (line 3) | static long maxSumLCM(int n) {

FILE: GFG/Maximum Value/Maximum Value.java
  class Solution (line 1) | class Solution {
    method maximumValue (line 2) | ArrayList<Integer> maximumValue(Node node) {

FILE: GFG/Maximum of all subarrays of size k/Maximum of all subarrays of size k.java
  class Solution (line 1) | class Solution
    method max_of_subarrays (line 4) | static ArrayList <Integer> max_of_subarrays(int arr[], int n, int k)

FILE: GFG/Median in a row-wise sorted Matrix/Median in a row-wise sorted Matrix.java
  class Solution (line 1) | class Solution {
    method median (line 2) | int median(int matrix[][], int R, int C) {

FILE: GFG/Merge Sort/Merge Sort.java
  class Solution (line 3) | class Solution
    method merge (line 5) | void merge(int arr[], int l, int m, int r)
    method mergeSort (line 29) | void mergeSort(int arr[], int l, int r)

FILE: GFG/Merge two BST 's/Merge two BST.cpp
  class Solution (line 4) | class Solution
    method inorder1 (line 9) | void inorder1(Node* root, vector<int> &v1){
    method inorder2 (line 18) | void inorder2(Node* root, vector<int> &v1){
    method merge (line 25) | vector<int> merge(Node *root1, Node *root2)

FILE: GFG/Min operations/Min operations.java
  class Solution (line 1) | class Solution {
    method solve (line 3) | public static int solve(int a, int b) {

FILE: GFG/Minimize number of Students to be removed/Minimize number of Students to be removed.java
  class Solution (line 1) | class Solution {
    method removeStudents (line 2) | public int removeStudents(int[] H, int n) {
    method binarySearch (line 15) | int binarySearch(int ele,ArrayList<Integer> arr){

FILE: GFG/Minimize the sum/Minimize the sum.java
  class Solution (line 1) | class Solution {
    method minimizeSum (line 2) | long minimizeSum(int N, int arr[]) {

FILE: GFG/Minimum Cost of ropes/Minimum Cost of ropes.java
  class Solution (line 1) | class Solution
    method minCost (line 4) | long minCost(long arr[], int n)

FILE: GFG/Minimum Costs of Ropes/Minimum Costs of Ropes.cpp
  class Solution (line 4) | class Solution
    method minCost (line 8) | long long minCost(long long arr[], long long n) {
  function main (line 33) | int main() {

FILE: GFG/Minimum characters to be added at front to make string palindrome/Minimum characters to be added at front to make string palindrome oc2.cpp
  class Solution (line 3) | class Solution {
    method minChar (line 5) | int minChar(string str){
  function main (line 23) | int main()

FILE: GFG/Minimum characters to be added at front to make string palindrome/Minimum characters to be added at front to make string palindrome.cpp
  class Solution (line 1) | class Solution {
    method minChar (line 3) | int minChar(string str){

FILE: GFG/Minimum characters to be added at front to make string palindrome/Minimum characters to be added at front to make string palindrome.java
  class Solution (line 1) | class Solution {
    method minChar (line 2) | public static int minChar(String str) {

FILE: GFG/Minimum characters to be added at front to make string palindrome/Minimum characters to be added at front to make string palindrome.py
  class Solution (line 1) | class Solution:
    method minChar (line 2) | def minChar(self,str):

FILE: GFG/Minimum number of Coins/Minimum number of Coins.cpp
  class Solution (line 1) | class Solution{
    method minPartition (line 3) | vector<int> minPartition(int N)

FILE: GFG/Minimum number of Coins/Minimum number of Coins.java
  class Solution (line 1) | class Solution{
    method minPartition (line 2) | static List<Integer> minPartition(int N)

FILE: GFG/Minimum sum partition/Minimum sum partition.java
  class Solution (line 1) | class Solution
    method minDifference (line 4) | public int minDifference(int arr[], int n)
    method dfs (line 10) | public int dfs(int[]arr,int n,int s1,int s2,Map<String,Integer> map){

FILE: GFG/Missing number in matrix.java/Missing number in matrix.java
  class Solution (line 1) | class Solution
    method MissingNo (line 3) | public long  MissingNo(int[][] mat)

FILE: GFG/Modified Numbers and Queries/Modified Numbers And Queries.java
  class Solution (line 1) | class Solution
    method sumOfAll (line 3) | public int sumOfAll(int l, int r)

FILE: GFG/Modified Numbers and Queries/Modified Numbers and Queries oc3.cpp
  class Solution (line 4) | class Solution {
    method Sieve (line 5) | void Sieve(vector<int> &Primes, int n){
    method sumOfAll (line 13) | int sumOfAll(int l, int r){
  function main (line 23) | int main() {

FILE: GFG/Modified Numbers and Queries/Modified Numbers and Queries.py
  class Solution (line 1) | class Solution:
    method sumOfAll (line 2) | def sumOfAll(self, l, r):

FILE: GFG/Move Last Element to Front of a Linked List/Move Last Element to Front of a Linked List 2 different approaches.java
  class Solution (line 10) | class Solution {
    method moveToFront (line 11) | public static Node moveToFront(Node head) {
    method moveToFront (line 53) | public static Node moveToFront(Node head) {
  class Solution (line 52) | class Solution {
    method moveToFront (line 11) | public static Node moveToFront(Node head) {
    method moveToFront (line 53) | public static Node moveToFront(Node head) {

FILE: GFG/Move Last Element to Front of a Linked List/Move Last Element to Front of a Linked List.cpp
  class Solution (line 1) | class Solution{
    method ListNode (line 3) | ListNode *moveToFront(ListNode *head){

FILE: GFG/Move Last Element to Front of a Linked List/Move Last Element to Front of a Linked List.java
  class Solution (line 1) | class Solution {
    method moveToFront (line 2) | public static Node moveToFront(Node head) {

FILE: GFG/Next Greater Element/Next Greater Element.java
  class Solution (line 1) | class Solution{
    method nextLargerElement (line 2) | public static long[] nextLargerElement(long[] arr, int n) {

FILE: GFG/Next Happy Number/Next Happy Number.java
  class Solution (line 1) | class Solution{
    method nextHappy (line 3) | static int nextHappy(int N){
    method isHappyNumber (line 14) | public static boolean isHappyNumber(int n, ArrayList<Integer> ar)
    method findSquareNumber (line 29) | public static int findSquareNumber(int n)

FILE: GFG/Nine Divisors/Nine Divisors.cpp
  class Solution (line 1) | class Solution{
    method nineDivisors (line 3) | long long int nineDivisors(long long int N){

FILE: GFG/Nine Divisors/Nine Divisors.java
  class Solution (line 1) | class Solution{
    method nineDivisors (line 2) | static long nineDivisors(long N){

FILE: GFG/Number Formation/Number Formation.cpp
  class Solution (line 1) | class Solution {
    method getSum (line 7) | int getSum(int X, int Y, int Z) {

FILE: GFG/Number Formation/Number Formation.java
  class Solution (line 1) | class Solution {
    method getSum (line 3) | public int getSum(int X, int Y, int Z) {

FILE: GFG/Number Of Islands/Number Of Islands.cpp
  class Solution (line 1) | class Solution {
    method dfs (line 6) | void dfs(vector<vector<int>>&v,int l,int i,int j,int n,int m){
    method numOfIslands (line 36) | vector<int> numOfIslands(int n, int m, vector<vector<int>> &operators) {

FILE: GFG/Number Of Islands/Number Of Islands.java
  class UnionFind (line 1) | class UnionFind{
    method UnionFind (line 4) | UnionFind(int row,int col){
    method union (line 11) | void union(int x,int y){
    method findParent (line 16) | int findParent(int x){
    method count (line 20) | int count(int [][]mat){
  class Solution (line 36) | class Solution {
    method numOfIslands (line 38) | public List<Integer> numOfIslands(int rows, int cols, int[][] operator...

FILE: GFG/Number Of Open Doors/Number Of Open Doors.java
  class Solution (line 1) | class Solution {
    method noOfOpenDoors (line 2) | static int noOfOpenDoors(Long N) {

FILE: GFG/Number of Distinct Islands/Number of Distinct Islands oct1.cpp
  class Solution (line 4) | class Solution {
    method dfs (line 6) | void dfs(vector<vector<int>>& grid, int i, int j, int xi, int xj, int ...
    method countDistinctIslands (line 17) | int countDistinctIslands(vector<vector<int>>& grid) {
    method dfs (line 62) | void dfs(int i,int j,int r,int c,vector<vector<int>> &vis, vector<vect...
    method countDistinctIslands (line 75) | int countDistinctIslands(vector<vector<int>>& grid) {
  function main (line 33) | int main() {
  class Solution (line 60) | class Solution {
    method dfs (line 6) | void dfs(vector<vector<int>>& grid, int i, int j, int xi, int xj, int ...
    method countDistinctIslands (line 17) | int countDistinctIslands(vector<vector<int>>& grid) {
    method dfs (line 62) | void dfs(int i,int j,int r,int c,vector<vector<int>> &vis, vector<vect...
    method countDistinctIslands (line 75) | int countDistinctIslands(vector<vector<int>>& grid) {

FILE: GFG/Number of Distinct Islands/Number of Distinct Islands.py
  class Solution (line 2) | class Solution:
    method countDistinctIslands (line 4) | def countDistinctIslands(self, grid : List[List[int]]) -> int:

FILE: GFG/Number of turns in binary tree/Number of turns in binary tree.cpp
  class Solution (line 7) | class Solution{
    method NumberOFTurns (line 11) | int NumberOFTurns(struct Node* root, int first, int second)
    method Node (line 28) | Node* lca(Node* root ,int n1 ,int n2 )
    method countTurns (line 55) | int countTurns(Node* root, int n, char d)
    method traverseHelper (line 89) | void traverseHelper(Node* root, int first, int second, vector<char> &F...
    method NumberOFTurns (line 112) | int NumberOFTurns(struct Node* root, int first, int second)
  class Solution (line 87) | class Solution{
    method NumberOFTurns (line 11) | int NumberOFTurns(struct Node* root, int first, int second)
    method Node (line 28) | Node* lca(Node* root ,int n1 ,int n2 )
    method countTurns (line 55) | int countTurns(Node* root, int n, char d)
    method traverseHelper (line 89) | void traverseHelper(Node* root, int f
Condensed preview — 2230 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (2,552K chars).
[
  {
    "path": ".github/ISSUE_TEMPLATE/custom.md",
    "chars": 126,
    "preview": "---\nname: Custom issue template\nabout: Describe this issue template's purpose here.\ntitle: ''\nlabels: ''\nassignees: ''\n\n"
  },
  {
    "path": ".github/pull_request_template.md",
    "chars": 1283,
    "preview": "**Please fill the details before contributing.**\n\n<!-- These are the comment to assist you better, anything you put insi"
  },
  {
    "path": "0012-integer-to-roman/0012-integer-to-roman.java",
    "chars": 599,
    "preview": "class Solution {\n    \n   \n    public String intToRoman(int num) {\n       \n         int[] val = { 1000, 900, 500, 400, 10"
  },
  {
    "path": "0012-integer-to-roman/0012-integer-to-roman.py",
    "chars": 333,
    "preview": "class Solution:\n    def intToRoman(self, num: int) -> str:\n        d = {1000: 'M', 900: 'CM', 500: 'D', 400: 'CD', 100: "
  },
  {
    "path": "0012-integer-to-roman/NOTES.md",
    "chars": 1,
    "preview": "​"
  },
  {
    "path": "0012-integer-to-roman/README.md",
    "chars": 2308,
    "preview": "<h2><a href=\"https://leetcode.com/problems/integer-to-roman/\">12. Integer to Roman</a></h2><h3>Medium</h3><hr><div><p>Ro"
  },
  {
    "path": "0026-remove-duplicates-from-sorted-array/0026-remove-duplicates-from-sorted-array.java",
    "chars": 395,
    "preview": "class Solution {\n    public int removeDuplicates(int[] nums) {\n        int idx=0;\n        int i=0;\n        while(i<nums."
  },
  {
    "path": "0026-remove-duplicates-from-sorted-array/0026-remove-duplicates-from-sorted-array.py",
    "chars": 297,
    "preview": "class Solution(object):\n    def removeDuplicates(self, nums):\n        \"\"\"\n        :type nums: List[int]\n        :rtype: "
  },
  {
    "path": "0026-remove-duplicates-from-sorted-array/NOTES.md",
    "chars": 1,
    "preview": "​"
  },
  {
    "path": "0026-remove-duplicates-from-sorted-array/README.md",
    "chars": 2903,
    "preview": "<h2><a href=\"https://leetcode.com/problems/remove-duplicates-from-sorted-array/\">26. Remove Duplicates from Sorted Array"
  },
  {
    "path": "0036-valid-sudoku/0036-valid-sudoku.java",
    "chars": 873,
    "preview": "class Solution {\n    public static boolean isCorrect(char[][] board,int x,int y){\n        for(int i=0;i<board.length;i++"
  },
  {
    "path": "0036-valid-sudoku/0036-valid-sudoku.py",
    "chars": 265,
    "preview": "class Solution:\n    def isValidSudoku(self, board) -> bool:\n        seen = sum(([(c, i), (j, c), (i//3, j//3, c)]\n      "
  },
  {
    "path": "0036-valid-sudoku/NOTES.md",
    "chars": 1,
    "preview": "​"
  },
  {
    "path": "0036-valid-sudoku/README.md",
    "chars": 2450,
    "preview": "<h2><a href=\"https://leetcode.com/problems/valid-sudoku/\">36. Valid Sudoku</a></h2><h3>Medium</h3><hr><div><p>Determine "
  },
  {
    "path": "0037-sudoku-solver/0037-sudoku-solver.java",
    "chars": 2106,
    "preview": "class Solution {\n    public void solveSudoku(char[][] board) {\n        dfs(0,0,board);\n    }\n    boolean dfs(int i,int j"
  },
  {
    "path": "0037-sudoku-solver/NOTES.md",
    "chars": 1,
    "preview": "​"
  },
  {
    "path": "0037-sudoku-solver/README.md",
    "chars": 2235,
    "preview": "<h2><a href=\"https://leetcode.com/problems/sudoku-solver/\">37. Sudoku Solver</a></h2><h3>Hard</h3><hr><div><p>Write a pr"
  },
  {
    "path": "0038-count-and-say/0038-count-and-say.java",
    "chars": 692,
    "preview": "class Solution {\n    public String countAndSay(int n) {\n        StringBuilder sb = new StringBuilder(\"1\");\n        for ("
  },
  {
    "path": "0038-count-and-say/0038-count-and-say.py",
    "chars": 213,
    "preview": "import re\nclass Solution:\n    def countAndSay(self, n: int) -> str:\n        s = '1'\n        for _ in range(n - 1):\n     "
  },
  {
    "path": "0038-count-and-say/README.md",
    "chars": 1750,
    "preview": "<h2><a href=\"https://leetcode.com/problems/count-and-say/\">38. Count and Say</a></h2><h3>Medium</h3><hr><div><p>The <str"
  },
  {
    "path": "0049-group-anagrams/0049-group-anagrams.java",
    "chars": 790,
    "preview": "class Solution {\n    public List<List<String>> groupAnagrams(String[] strs) {\n        Set<Map<Character,Integer>> set=ne"
  },
  {
    "path": "0049-group-anagrams/0049-group-anagrams.py",
    "chars": 268,
    "preview": "from collections import defaultdict\n\nclass Solution:\n    def groupAnagrams(self, strs):\n        letters_to_words = defau"
  },
  {
    "path": "0049-group-anagrams/README.md",
    "chars": 1179,
    "preview": "<h2><a href=\"https://leetcode.com/problems/group-anagrams/\">49. Group Anagrams</a></h2><h3>Medium</h3><hr><div><p>Given "
  },
  {
    "path": "0055-jump-game/0055-jump-game.java",
    "chars": 344,
    "preview": "class Solution {\n    public boolean canJump(int[] nums) {\n        int maxReachableDistance=nums[0];\n        int i=1;\n   "
  },
  {
    "path": "0055-jump-game/0055-jump-game.py",
    "chars": 441,
    "preview": "class Solution:\n    def canJump(self, nums: List[int]) -> bool:\n        if len(nums) <= 1:\n            return True\n     "
  },
  {
    "path": "0055-jump-game/NOTES.md",
    "chars": 1,
    "preview": "​"
  },
  {
    "path": "0055-jump-game/README.md",
    "chars": 1172,
    "preview": "<h2><a href=\"https://leetcode.com/problems/jump-game/\">55. Jump Game</a></h2><h3>Medium</h3><hr><div><p>You are given an"
  },
  {
    "path": "0057-insert-interval/0057-insert-interval.java",
    "chars": 842,
    "preview": "class Solution {\n    public int[][] insert(int[][] intervals, int[] newInterval) {\n        List<int[]> inter = new Array"
  },
  {
    "path": "0057-insert-interval/0057-insert-interval.py",
    "chars": 571,
    "preview": "class Solution:\n    def insert(self, intervals, newInterval):\n        res = []\n        i = 0\n        n = len(intervals)\n"
  },
  {
    "path": "0057-insert-interval/NOTES.md",
    "chars": 1,
    "preview": "​"
  },
  {
    "path": "0057-insert-interval/README.md",
    "chars": 1911,
    "preview": "<h2><a href=\"https://leetcode.com/problems/insert-interval/\">57. Insert Interval</a></h2><h3>Medium</h3><hr><div><p>You "
  },
  {
    "path": "0070-climbing-stairs/0070-climbing-stairs.java",
    "chars": 303,
    "preview": "class Solution {\n    public int climbStairs(int n) {\n        if (n < 3) return n;\n        int oneStep = 1, twoStep = 2;\n"
  },
  {
    "path": "0070-climbing-stairs/NOTES.md",
    "chars": 1,
    "preview": "​"
  },
  {
    "path": "0070-climbing-stairs/README.md",
    "chars": 937,
    "preview": "<h2><a href=\"https://leetcode.com/problems/climbing-stairs/\">70. Climbing Stairs</a></h2><h3>Easy</h3><hr><div><p>You ar"
  },
  {
    "path": "0076-minimum-window-substring/0076-minimum-window-substring.java",
    "chars": 755,
    "preview": "class Solution {\n    public String minWindow(String s, String t) {\n        int[] cs = new int[256];\n        for (char ch"
  },
  {
    "path": "0076-minimum-window-substring/NOTES.md",
    "chars": 1,
    "preview": "​"
  },
  {
    "path": "0076-minimum-window-substring/README.md",
    "chars": 1916,
    "preview": "<h2><a href=\"https://leetcode.com/problems/minimum-window-substring/\">76. Minimum Window Substring</a></h2><h3>Hard</h3>"
  },
  {
    "path": "0079-word-search/0079-word-search.java",
    "chars": 1912,
    "preview": "class Solution {\n    int[][] dirs = new int[][] {{0, 1}, {1, 0}, {0, -1}, {-1, 0}};\n    \n    public boolean exist(char[]"
  },
  {
    "path": "0079-word-search/NOTES.md",
    "chars": 1,
    "preview": "​"
  },
  {
    "path": "0079-word-search/README.md",
    "chars": 1941,
    "preview": "<h2><a href=\"https://leetcode.com/problems/word-search/\">79. Word Search</a></h2><h3>Medium</h3><hr><div><p>Given an <co"
  },
  {
    "path": "0093-restore-ip-addresses/0093-restore-ip-addresses.java",
    "chars": 1816,
    "preview": "class Solution {\n    private boolean valid(String s, int start, int length) {\n        return length == 1 || \n           "
  },
  {
    "path": "0093-restore-ip-addresses/README.md",
    "chars": 1617,
    "preview": "<h2><a href=\"https://leetcode.com/problems/restore-ip-addresses/\">93. Restore IP Addresses</a></h2><h3>Medium</h3><hr><d"
  },
  {
    "path": "0100-same-tree/0100-same-tree.java",
    "chars": 1377,
    "preview": "class Solution {\n    public boolean isSameTree(TreeNode p, TreeNode q) {\n        // return recursive traversal of tree\n "
  },
  {
    "path": "0100-same-tree/NOTES.md",
    "chars": 1,
    "preview": "​"
  },
  {
    "path": "0100-same-tree/README.md",
    "chars": 1360,
    "preview": "<h2><a href=\"https://leetcode.com/problems/same-tree/\">100. Same Tree</a></h2><h3>Easy</h3><hr><div><p>Given the roots o"
  },
  {
    "path": "0124-binary-tree-maximum-path-sum/0124-binary-tree-maximum-path-sum.java",
    "chars": 1108,
    "preview": "\nclass Solution {\n    public int maxPathSum(TreeNode root) {\n        maxSum = Integer.MIN_VALUE;\n        gainFromSubtree"
  },
  {
    "path": "0124-binary-tree-maximum-path-sum/NOTES.md",
    "chars": 1,
    "preview": "​"
  },
  {
    "path": "0124-binary-tree-maximum-path-sum/README.md",
    "chars": 1568,
    "preview": "<h2><a href=\"https://leetcode.com/problems/binary-tree-maximum-path-sum/\">124. Binary Tree Maximum Path Sum</a></h2><h3>"
  },
  {
    "path": "0125-valid-palindrome/0125-valid-palindrome.java",
    "chars": 779,
    "preview": "class Solution {\n    public boolean isPalindrome(String s) {\n        int i=0;\n        int j= s.length()-1;\n        while"
  },
  {
    "path": "0125-valid-palindrome/NOTES.md",
    "chars": 1,
    "preview": "​"
  },
  {
    "path": "0125-valid-palindrome/README.md",
    "chars": 1472,
    "preview": "<h2><a href=\"https://leetcode.com/problems/valid-palindrome/\">125. Valid Palindrome</a></h2><h3>Easy</h3><hr><div><p>A p"
  },
  {
    "path": "0131-palindrome-partitioning/0131-palindrome-partitioning.java",
    "chars": 1159,
    "preview": "class Solution {\n     public List<List<String>> partition(String s) {\n        List<List<String>> Al1 = new ArrayList<>()"
  },
  {
    "path": "0131-palindrome-partitioning/NOTES.md",
    "chars": 1,
    "preview": "​"
  },
  {
    "path": "0131-palindrome-partitioning/README.md",
    "chars": 910,
    "preview": "<h2><a href=\"https://leetcode.com/problems/palindrome-partitioning/\">131. Palindrome Partitioning</a></h2><h3>Medium</h3"
  },
  {
    "path": "0134-gas-station/0134-gas-station.java",
    "chars": 493,
    "preview": "class Solution {\n    public int canCompleteCircuit(int[] gas, int[] cost) {\n        int sum = 0, n = gas.length;\n       "
  },
  {
    "path": "0134-gas-station/NOTES.md",
    "chars": 1,
    "preview": "​"
  },
  {
    "path": "0134-gas-station/README.md",
    "chars": 2310,
    "preview": "<h2><a href=\"https://leetcode.com/problems/gas-station/\">134. Gas Station</a></h2><h3>Medium</h3><hr><div><p>There are <"
  },
  {
    "path": "0144-binary-tree-preorder-traversal/0144-binary-tree-preorder-traversal.java",
    "chars": 728,
    "preview": "/**\n * Definition for a binary tree node.\n * public class TreeNode {\n *     int val;\n *     TreeNode left;\n *     TreeNo"
  },
  {
    "path": "0144-binary-tree-preorder-traversal/NOTES.md",
    "chars": 1,
    "preview": "​"
  },
  {
    "path": "0144-binary-tree-preorder-traversal/README.md",
    "chars": 1098,
    "preview": "<h2><a href=\"https://leetcode.com/problems/binary-tree-preorder-traversal/\">144. Binary Tree Preorder Traversal</a></h2>"
  },
  {
    "path": "0149-max-points-on-a-line/0149-max-points-on-a-line.java",
    "chars": 620,
    "preview": "class Solution {\n    public int maxPoints(int[][] points) {\n        int n = points.length;\n        if (n == 1) {\n       "
  },
  {
    "path": "0149-max-points-on-a-line/NOTES.md",
    "chars": 1,
    "preview": "​"
  },
  {
    "path": "0149-max-points-on-a-line/README.md",
    "chars": 1244,
    "preview": "<h2><a href=\"https://leetcode.com/problems/max-points-on-a-line/\">149. Max Points on a Line</a></h2><h3>Hard</h3><hr><di"
  },
  {
    "path": "0150-evaluate-reverse-polish-notation/0150-evaluate-reverse-polish-notation.java",
    "chars": 932,
    "preview": "class Solution {\n    public int evalRPN(String[] tokens) {\n                  int[] nxtPos = new int[1];\n\n          retur"
  },
  {
    "path": "0150-evaluate-reverse-polish-notation/NOTES.md",
    "chars": 1,
    "preview": "​"
  },
  {
    "path": "0150-evaluate-reverse-polish-notation/README.md",
    "chars": 1843,
    "preview": "<h2><a href=\"https://leetcode.com/problems/evaluate-reverse-polish-notation/\">150. Evaluate Reverse Polish Notation</a><"
  },
  {
    "path": "0151-reverse-words-in-a-string/0151-reverse-words-in-a-string.java",
    "chars": 823,
    "preview": "class Solution {\n    public String reverseWords(String s) {\n        List<StringBuilder> arr=new ArrayList<>();\n        S"
  },
  {
    "path": "0151-reverse-words-in-a-string/NOTES.md",
    "chars": 1,
    "preview": "​"
  },
  {
    "path": "0151-reverse-words-in-a-string/README.md",
    "chars": 2003,
    "preview": "<h2><a href=\"https://leetcode.com/problems/reverse-words-in-a-string/\">151. Reverse Words in a String</a></h2><h3>Medium"
  },
  {
    "path": "0198-house-robber/0198-house-robber.java",
    "chars": 378,
    "preview": "class Solution {\n    public int rob(int[] nums) {\n        \n        int n = nums.length;\n        \n        if(n == 1) retu"
  },
  {
    "path": "0198-house-robber/README.md",
    "chars": 1389,
    "preview": "<h2><a href=\"https://leetcode.com/problems/house-robber/\">198. House Robber</a></h2><h3>Medium</h3><hr><div><p>You are a"
  },
  {
    "path": "0212-word-search-ii/0212-word-search-ii.java",
    "chars": 2412,
    "preview": "class Solution {\n    private static final char HASH_TAG = '#';\n    private Tree root = new Tree();\n    \n    public List<"
  },
  {
    "path": "0212-word-search-ii/NOTES.md",
    "chars": 1,
    "preview": "​"
  },
  {
    "path": "0212-word-search-ii/README.md",
    "chars": 1670,
    "preview": "<h2><a href=\"https://leetcode.com/problems/word-search-ii/\">212. Word Search II</a></h2><h3>Hard</h3><hr><div><p>Given a"
  },
  {
    "path": "0219-contains-duplicate-ii/0219-contains-duplicate-ii.java",
    "chars": 439,
    "preview": "class Solution {\n    public boolean containsNearbyDuplicate(int[] nums, int k) {\n        Map<Integer, Integer> list = ne"
  },
  {
    "path": "0219-contains-duplicate-ii/NOTES.md",
    "chars": 1,
    "preview": "​"
  },
  {
    "path": "0219-contains-duplicate-ii/README.md",
    "chars": 1115,
    "preview": "<h2><a href=\"https://leetcode.com/problems/contains-duplicate-ii/\">219. Contains Duplicate II</a></h2><h3>Easy</h3><hr><"
  },
  {
    "path": "0222-count-complete-tree-nodes/0222-count-complete-tree-nodes.java",
    "chars": 621,
    "preview": "class Solution {\n    public int countNodes(TreeNode root) {\n        if(root ==  null){\n            return 0;\n        }\n "
  },
  {
    "path": "0222-count-complete-tree-nodes/NOTES.md",
    "chars": 1,
    "preview": "​"
  },
  {
    "path": "0222-count-complete-tree-nodes/README.md",
    "chars": 1602,
    "preview": "<h2><a href=\"https://leetcode.com/problems/count-complete-tree-nodes/\">222. Count Complete Tree Nodes</a></h2><h3>Medium"
  },
  {
    "path": "0223-rectangle-area/0223-rectangle-area.java",
    "chars": 1044,
    "preview": "class Solution {\n    public int computeArea(int ax1, int ay1, int ax2, int ay2, int bx1, int by1, int bx2, int by2) {\n  "
  },
  {
    "path": "0223-rectangle-area/NOTES.md",
    "chars": 1,
    "preview": "​"
  },
  {
    "path": "0223-rectangle-area/README.md",
    "chars": 1534,
    "preview": "<h2><a href=\"https://leetcode.com/problems/rectangle-area/\">223. Rectangle Area</a></h2><h3>Medium</h3><hr><div><p>Given"
  },
  {
    "path": "0224-basic-calculator/0224-basic-calculator.java",
    "chars": 937,
    "preview": "class Solution {\n    int idx; // this index traverse the string in one pass, between different level of recursion\n    pu"
  },
  {
    "path": "0224-basic-calculator/NOTES.md",
    "chars": 1,
    "preview": "​"
  },
  {
    "path": "0224-basic-calculator/README.md",
    "chars": 1625,
    "preview": "<h2><a href=\"https://leetcode.com/problems/basic-calculator/\">224. Basic Calculator</a></h2><h3>Hard</h3><hr><div><p>Giv"
  },
  {
    "path": "0232-implement-queue-using-stacks/0232-implement-queue-using-stacks.java",
    "chars": 1099,
    "preview": "class MyQueue {\n    private Stack<Integer> s1 = new Stack<>();\n    private Stack<Integer> s2 = new Stack<>();\n\n    /** I"
  },
  {
    "path": "0232-implement-queue-using-stacks/NOTES.md",
    "chars": 1,
    "preview": "​"
  },
  {
    "path": "0232-implement-queue-using-stacks/README.md",
    "chars": 2499,
    "preview": "<h2><a href=\"https://leetcode.com/problems/implement-queue-using-stacks/\">232. Implement Queue using Stacks</a></h2><h3>"
  },
  {
    "path": "0236-lowest-common-ancestor-of-a-binary-tree/0236-lowest-common-ancestor-of-a-binary-tree.java",
    "chars": 399,
    "preview": "class Solution {\n    public TreeNode lowestCommonAncestor(TreeNode root, TreeNode p, TreeNode q) {\n        if (root == n"
  },
  {
    "path": "0236-lowest-common-ancestor-of-a-binary-tree/NOTES.md",
    "chars": 1,
    "preview": "​"
  },
  {
    "path": "0236-lowest-common-ancestor-of-a-binary-tree/README.md",
    "chars": 1976,
    "preview": "<h2><a href=\"https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree/\">236. Lowest Common Ancestor of a Bi"
  },
  {
    "path": "0237-delete-node-in-a-linked-list/0237-delete-node-in-a-linked-list.java",
    "chars": 324,
    "preview": "class Solution {\n    public void deleteNode(ListNode node) {\n        // Since we know input node is not last node, so ne"
  },
  {
    "path": "0237-delete-node-in-a-linked-list/NOTES.md",
    "chars": 1,
    "preview": "​"
  },
  {
    "path": "0237-delete-node-in-a-linked-list/README.md",
    "chars": 2677,
    "preview": "<h2><a href=\"https://leetcode.com/problems/delete-node-in-a-linked-list/\">237. Delete Node in a Linked List</a></h2><h3>"
  },
  {
    "path": "0242-valid-anagram/0242-valid-anagram.cpp",
    "chars": 190,
    "preview": "class Solution {\npublic:\n    bool isAnagram(string s, string t) {\n    sort(s.begin(),s.end());\n    sort(t.begin(),t.end("
  },
  {
    "path": "0242-valid-anagram/0242-valid-anagram.java",
    "chars": 530,
    "preview": "class Solution {\n    public boolean isAnagram(String a, String b) {\n        int[] arr=new int[128]; //O(1)\n        if(a."
  },
  {
    "path": "0242-valid-anagram/NOTES.md",
    "chars": 1,
    "preview": "​"
  },
  {
    "path": "0242-valid-anagram/README.md",
    "chars": 1162,
    "preview": "<h2><a href=\"https://leetcode.com/problems/valid-anagram/\">242. Valid Anagram</a></h2><h3>Easy</h3><hr><div><p>Given two"
  },
  {
    "path": "0263-ugly-number/0263-ugly-number.java",
    "chars": 440,
    "preview": "class Solution {\n    public boolean isUgly(int n) {\n        while(n!=0){\n            if(n==1 || n==2 || n==3 || n==5){\n "
  },
  {
    "path": "0263-ugly-number/NOTES.md",
    "chars": 1,
    "preview": "​"
  },
  {
    "path": "0263-ugly-number/README.md",
    "chars": 1163,
    "preview": "<h2><a href=\"https://leetcode.com/problems/ugly-number/\">263. Ugly Number</a></h2><h3>Easy</h3><hr><div><p>An <strong>ug"
  },
  {
    "path": "0279-perfect-squares/0279-perfect-squares.java",
    "chars": 414,
    "preview": "class Solution {\n    public int numSquares(int n) {\n\tint sqrt = (int) Math.sqrt(n);\n\n\tif (sqrt * sqrt == n) // Perfect s"
  },
  {
    "path": "0279-perfect-squares/NOTES.md",
    "chars": 1,
    "preview": "​"
  },
  {
    "path": "0279-perfect-squares/README.md",
    "chars": 1017,
    "preview": "<h2><a href=\"https://leetcode.com/problems/perfect-squares/\">279. Perfect Squares</a></h2><h3>Medium</h3><hr><div><p>Giv"
  },
  {
    "path": "0290-word-pattern/0290-word-pattern.java",
    "chars": 913,
    "preview": "class Solution {\n    public boolean wordPattern(String pattern, String s) {\n        String[] words = s.split(\" \");\n     "
  },
  {
    "path": "0290-word-pattern/README.md",
    "chars": 1412,
    "preview": "<h2><a href=\"https://leetcode.com/problems/word-pattern/\">290. Word Pattern</a></h2><h3>Easy</h3><hr><div><p>Given a <co"
  },
  {
    "path": "0295-find-median-from-data-stream/0295-find-median-from-data-stream.java",
    "chars": 721,
    "preview": "class MedianFinder {\n    \n    ArrayList<Integer> list;\n\n    public MedianFinder() {\n        list = new ArrayList<>();\n  "
  },
  {
    "path": "0295-find-median-from-data-stream/NOTES.md",
    "chars": 1,
    "preview": "​"
  },
  {
    "path": "0295-find-median-from-data-stream/README.md",
    "chars": 2236,
    "preview": "<h2><a href=\"https://leetcode.com/problems/find-median-from-data-stream/\">295. Find Median from Data Stream</a></h2><h3>"
  },
  {
    "path": "0309-best-time-to-buy-and-sell-stock-with-cooldown/0309-best-time-to-buy-and-sell-stock-with-cooldown.java",
    "chars": 651,
    "preview": "class Solution {\n    public int maxProfit(int[] prices) {\n        if (prices == null || prices.length <= 1) {\n          "
  },
  {
    "path": "0309-best-time-to-buy-and-sell-stock-with-cooldown/NOTES.md",
    "chars": 1,
    "preview": "​"
  },
  {
    "path": "0309-best-time-to-buy-and-sell-stock-with-cooldown/README.md",
    "chars": 1310,
    "preview": "<h2><a href=\"https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-cooldown/\">309. Best Time to Buy and Sel"
  },
  {
    "path": "0328-odd-even-linked-list/0328-odd-even-linked-list.java",
    "chars": 808,
    "preview": "/**\n * Definition for singly-linked list.\n * public class ListNode {\n *     int val;\n *     ListNode next;\n *     ListNo"
  },
  {
    "path": "0328-odd-even-linked-list/NOTES.md",
    "chars": 1,
    "preview": "​"
  },
  {
    "path": "0328-odd-even-linked-list/README.md",
    "chars": 1509,
    "preview": "<h2><a href=\"https://leetcode.com/problems/odd-even-linked-list/\">328. Odd Even Linked List</a></h2><h3>Medium</h3><hr><"
  },
  {
    "path": "0334-increasing-triplet-subsequence/0334-increasing-triplet-subsequence.java",
    "chars": 482,
    "preview": "class Solution {\n    public boolean increasingTriplet(int[] nums) {\n        int first_num = Integer.MAX_VALUE;\n        i"
  },
  {
    "path": "0334-increasing-triplet-subsequence/NOTES.md",
    "chars": 1,
    "preview": "​"
  },
  {
    "path": "0334-increasing-triplet-subsequence/README.md",
    "chars": 1498,
    "preview": "<h2><a href=\"https://leetcode.com/problems/increasing-triplet-subsequence/\">334. Increasing Triplet Subsequence</a></h2>"
  },
  {
    "path": "0345-reverse-vowels-of-a-string/0345-reverse-vowels-of-a-string.java",
    "chars": 628,
    "preview": "class Solution {\n    public String reverseVowels(String s) {\n        int i=0;\n        int j=s.length()-1;\n        char[]"
  },
  {
    "path": "0345-reverse-vowels-of-a-string/NOTES.md",
    "chars": 1,
    "preview": "​"
  },
  {
    "path": "0345-reverse-vowels-of-a-string/README.md",
    "chars": 912,
    "preview": "<h2><a href=\"https://leetcode.com/problems/reverse-vowels-of-a-string/\">345. Reverse Vowels of a String</a></h2><h3>Easy"
  },
  {
    "path": "0374-guess-number-higher-or-lower/0374-guess-number-higher-or-lower.java",
    "chars": 888,
    "preview": "/* The guess API is defined in the parent class GuessGame.\n   @param num, your guess\n   @return -1 if my number is lower"
  },
  {
    "path": "0374-guess-number-higher-or-lower/NOTES.md",
    "chars": 1,
    "preview": "​"
  },
  {
    "path": "0374-guess-number-higher-or-lower/README.md",
    "chars": 1487,
    "preview": "<h2><a href=\"https://leetcode.com/problems/guess-number-higher-or-lower/\">374. Guess Number Higher or Lower</a></h2><h3>"
  },
  {
    "path": "0380-insert-delete-getrandom-o1/0380-insert-delete-getrandom-o1.java",
    "chars": 1176,
    "preview": "class RandomizedSet {\n    List<Integer> list;\n    HashMap<Integer,Integer> map;\n    \n    public RandomizedSet() {\n      "
  },
  {
    "path": "0380-insert-delete-getrandom-o1/NOTES.md",
    "chars": 1,
    "preview": "​"
  },
  {
    "path": "0380-insert-delete-getrandom-o1/README.md",
    "chars": 2487,
    "preview": "<h2><a href=\"https://leetcode.com/problems/insert-delete-getrandom-o1/\">380. Insert Delete GetRandom O(1)</a></h2><h3>Me"
  },
  {
    "path": "0409-longest-palindrome/0409-longest-palindrome.java",
    "chars": 426,
    "preview": "class Solution {\n    public int longestPalindrome(String s) {\n        int[]freq=new int[123];\n        for(char c:s.toCha"
  },
  {
    "path": "0409-longest-palindrome/NOTES.md",
    "chars": 1,
    "preview": "​"
  },
  {
    "path": "0409-longest-palindrome/README.md",
    "chars": 1144,
    "preview": "<h2><a href=\"https://leetcode.com/problems/longest-palindrome/\">409. Longest Palindrome</a></h2><h3>Easy</h3><hr><div><p"
  },
  {
    "path": "0446-arithmetic-slices-ii-subsequence/0446-arithmetic-slices-ii-subsequence.java",
    "chars": 764,
    "preview": "\nclass Solution {\n    public int numberOfArithmeticSlices(int[] A) {\n        int n = A.length;\n        long ans = 0;\n   "
  },
  {
    "path": "0446-arithmetic-slices-ii-subsequence/NOTES.md",
    "chars": 1,
    "preview": "​"
  },
  {
    "path": "0446-arithmetic-slices-ii-subsequence/README.md",
    "chars": 1839,
    "preview": "<h2><a href=\"https://leetcode.com/problems/arithmetic-slices-ii-subsequence/\">446. Arithmetic Slices II - Subsequence</a"
  },
  {
    "path": "0451-sort-characters-by-frequency/0451-sort-characters-by-frequency.java",
    "chars": 597,
    "preview": "class Solution {\n    public String frequencySort(String s) {\n        int[] a = new int[750];\n        \n        for(int i="
  },
  {
    "path": "0451-sort-characters-by-frequency/NOTES.md",
    "chars": 1,
    "preview": "​"
  },
  {
    "path": "0451-sort-characters-by-frequency/README.md",
    "chars": 1626,
    "preview": "<h2><a href=\"https://leetcode.com/problems/sort-characters-by-frequency/\">451. Sort Characters By Frequency</a></h2><h3>"
  },
  {
    "path": "0452-minimum-number-of-arrows-to-burst-balloons/0452-minimum-number-of-arrows-to-burst-balloons.java",
    "chars": 1930,
    "preview": "class Solution {\n    public int findMinArrowShots(int[][] points) {\n        \n        // This Problem is similar to Non O"
  },
  {
    "path": "0452-minimum-number-of-arrows-to-burst-balloons/NOTES.md",
    "chars": 1,
    "preview": "​"
  },
  {
    "path": "0452-minimum-number-of-arrows-to-burst-balloons/README.md",
    "chars": 2513,
    "preview": "<h2><a href=\"https://leetcode.com/problems/minimum-number-of-arrows-to-burst-balloons/\">452. Minimum Number of Arrows to"
  },
  {
    "path": "0491-non-decreasing-subsequences/0491-non-decreasing-subsequences.java",
    "chars": 1220,
    "preview": "class Solution {\n    private void backtrack(int[] nums, int index, List<Integer> sequence,\n            Set<List<Integer>"
  },
  {
    "path": "0491-non-decreasing-subsequences/NOTES.md",
    "chars": 1,
    "preview": "​"
  },
  {
    "path": "0491-non-decreasing-subsequences/README.md",
    "chars": 882,
    "preview": "<h2><a href=\"https://leetcode.com/problems/non-decreasing-subsequences/\">491. Non-decreasing Subsequences</a></h2><h3>Me"
  },
  {
    "path": "0520-detect-capital/0520-detect-capital.java",
    "chars": 741,
    "preview": "class Solution {\n    public boolean detectCapitalUse(String word) {\n        int n = word.length();\n        if (n == 1) {"
  },
  {
    "path": "0520-detect-capital/NOTES.md",
    "chars": 1,
    "preview": "​"
  },
  {
    "path": "0523-continuous-subarray-sum/0523-continuous-subarray-sum.java",
    "chars": 945,
    "preview": "class Solution \n{\n    public boolean checkSubarraySum(int[] nums, int k) \n    {\n        int prefixSum = 0;\n        \n    "
  },
  {
    "path": "0523-continuous-subarray-sum/NOTES.md",
    "chars": 1,
    "preview": "​"
  },
  {
    "path": "0523-continuous-subarray-sum/README.md",
    "chars": 1720,
    "preview": "<h2><a href=\"https://leetcode.com/problems/continuous-subarray-sum/\">523. Continuous Subarray Sum</a></h2><h3>Medium</h3"
  },
  {
    "path": "0587-erect-the-fence/0587-erect-the-fence.java",
    "chars": 1127,
    "preview": "public class Solution {\n    public int orientation(int[] p, int[] q, int[] r) {\n        return (q[1] - p[1]) * (r[0] - q"
  },
  {
    "path": "0587-erect-the-fence/README.md",
    "chars": 1459,
    "preview": "<h2><a href=\"https://leetcode.com/problems/erect-the-fence/\">587. Erect the Fence</a></h2><h3>Hard</h3><hr><div><p>You a"
  },
  {
    "path": "0645-set-mismatch/0645-set-mismatch.java",
    "chars": 921,
    "preview": "class Solution {\n    public int[] findErrorNums(int[] nums) {\n        /** Assume m is the missing and d is the duplicate"
  },
  {
    "path": "0645-set-mismatch/NOTES.md",
    "chars": 215,
    "preview": "x-repeat\ny-missing\n​\n(sum-realSum)=(x-y)\n(sqrSum-realSqrSum)=(x+y)(x-y)\n​\n​\n(x-y)=(sum-realSum)\n(x+y)=(sqrSum-realSqrSum"
  },
  {
    "path": "0645-set-mismatch/README.md",
    "chars": 1168,
    "preview": "<h2><a href=\"https://leetcode.com/problems/set-mismatch/\">645. Set Mismatch</a></h2><h3>Easy</h3><hr><div><p>You have a "
  },
  {
    "path": "0692-top-k-frequent-words/0692-top-k-frequent-words.java",
    "chars": 699,
    "preview": "class Solution {\n    public List<String> topKFrequent(String[] words, int k) {\n        Map<String,Integer> map = new Has"
  },
  {
    "path": "0692-top-k-frequent-words/NOTES.md",
    "chars": 1,
    "preview": "​"
  },
  {
    "path": "0692-top-k-frequent-words/README.md",
    "chars": 1689,
    "preview": "<h2><a href=\"https://leetcode.com/problems/top-k-frequent-words/\">692. Top K Frequent Words</a></h2><h3>Medium</h3><hr><"
  },
  {
    "path": "0739-daily-temperatures/0739-daily-temperatures.java",
    "chars": 460,
    "preview": "class Solution {\n    public int[] dailyTemperatures(int[] a) {\n        Deque<Integer> s=new ArrayDeque<>();\n        int["
  },
  {
    "path": "0739-daily-temperatures/README.md",
    "chars": 1216,
    "preview": "<h2><a href=\"https://leetcode.com/problems/daily-temperatures/\">739. Daily Temperatures</a></h2><h3>Medium</h3><hr><div>"
  },
  {
    "path": "0766-toeplitz-matrix/0766-toeplitz-matrix.java",
    "chars": 333,
    "preview": "class Solution {\n    public boolean isToeplitzMatrix(int[][] matrix) {\n        for(int i=0;i<matrix.length-1;i++){\n     "
  },
  {
    "path": "0766-toeplitz-matrix/README.md",
    "chars": 1813,
    "preview": "<h2><a href=\"https://leetcode.com/problems/toeplitz-matrix/\">766. Toeplitz Matrix</a></h2><h3>Easy</h3><hr><div><p>Given"
  },
  {
    "path": "0787-cheapest-flights-within-k-stops/0787-cheapest-flights-within-k-stops.java",
    "chars": 1353,
    "preview": "class Solution {\n    public int findCheapestPrice(int n, int[][] flights, int src, int dst, int k) {\n        Map<Integer"
  },
  {
    "path": "0787-cheapest-flights-within-k-stops/NOTES.md",
    "chars": 1,
    "preview": "​"
  },
  {
    "path": "0787-cheapest-flights-within-k-stops/README.md",
    "chars": 2994,
    "preview": "<h2><a href=\"https://leetcode.com/problems/cheapest-flights-within-k-stops/\">787. Cheapest Flights Within K Stops</a></h"
  },
  {
    "path": "0790-domino-and-tromino-tiling/0790-domino-and-tromino-tiling.java",
    "chars": 355,
    "preview": "class Solution {\n    public int numTilings(int n) {\n        int dp[] = new int[n+4];\n        \n        int mod = (int)(Ma"
  },
  {
    "path": "0790-domino-and-tromino-tiling/NOTES.md",
    "chars": 1,
    "preview": "​"
  },
  {
    "path": "0790-domino-and-tromino-tiling/README.md",
    "chars": 1375,
    "preview": "<h2><a href=\"https://leetcode.com/problems/domino-and-tromino-tiling/\">790. Domino and Tromino Tiling</a></h2><h3>Medium"
  },
  {
    "path": "0797-all-paths-from-source-to-target/0797-all-paths-from-source-to-target.java",
    "chars": 661,
    "preview": "class Solution {\n    public List<List<Integer>> allPathsSourceTarget(int[][] graph) {\n        \n        List<List<Integer"
  },
  {
    "path": "0797-all-paths-from-source-to-target/NOTES.md",
    "chars": 1,
    "preview": "​"
  },
  {
    "path": "0797-all-paths-from-source-to-target/README.md",
    "chars": 1754,
    "preview": "<h2><a href=\"https://leetcode.com/problems/all-paths-from-source-to-target/\">797. All Paths From Source to Target</a></h"
  },
  {
    "path": "0834-sum-of-distances-in-tree/0834-sum-of-distances-in-tree.java",
    "chars": 2492,
    "preview": "class Solution {\n    public int[] sumOfDistancesInTree(int n, int[][] edges) {\n        final int[] parents = buildParent"
  },
  {
    "path": "0834-sum-of-distances-in-tree/NOTES.md",
    "chars": 1,
    "preview": "​"
  },
  {
    "path": "0834-sum-of-distances-in-tree/README.md",
    "chars": 2150,
    "preview": "<h2><a href=\"https://leetcode.com/problems/sum-of-distances-in-tree/\">834. Sum of Distances in Tree</a></h2><h3>Hard</h3"
  },
  {
    "path": "0835-image-overlap/0835-image-overlap.java",
    "chars": 941,
    "preview": "class Solution {\n\n    protected int convolute(int[][] A, int[][] kernel, int xShift, int yShift) {\n        int result = "
  },
  {
    "path": "0835-image-overlap/NOTES.md",
    "chars": 1,
    "preview": "​"
  },
  {
    "path": "0835-image-overlap/README.md",
    "chars": 2287,
    "preview": "<h2><a href=\"https://leetcode.com/problems/image-overlap/\">835. Image Overlap</a></h2><h3>Medium</h3><hr><div><p>You are"
  },
  {
    "path": "0841-keys-and-rooms/0841-keys-and-rooms.java",
    "chars": 620,
    "preview": "class Solution {\n    public boolean canVisitAllRooms(List<List<Integer>> rooms) {\n        boolean[] visited = new boolea"
  },
  {
    "path": "0841-keys-and-rooms/NOTES.md",
    "chars": 1,
    "preview": "​"
  },
  {
    "path": "0841-keys-and-rooms/README.md",
    "chars": 1906,
    "preview": "<h2><a href=\"https://leetcode.com/problems/keys-and-rooms/\">841. Keys and Rooms</a></h2><h3>Medium</h3><hr><div><p>There"
  },
  {
    "path": "0872-leaf-similar-trees/0872-leaf-similar-trees.java",
    "chars": 1269,
    "preview": "/**\n * Definition for a binary tree node.\n * public class TreeNode {\n *     int val;\n *     TreeNode left;\n *     TreeNo"
  },
  {
    "path": "0872-leaf-similar-trees/NOTES.md",
    "chars": 1,
    "preview": "​"
  },
  {
    "path": "0872-leaf-similar-trees/README.md",
    "chars": 1639,
    "preview": "<h2><a href=\"https://leetcode.com/problems/leaf-similar-trees/\">872. Leaf-Similar Trees</a></h2><h3>Easy</h3><hr><div><p"
  },
  {
    "path": "0876-middle-of-the-linked-list/0876-middle-of-the-linked-list.java",
    "chars": 263,
    "preview": "class Solution {\n    public ListNode middleNode(ListNode head) {\n        ListNode slow = head, fast = head;\n        whil"
  },
  {
    "path": "0876-middle-of-the-linked-list/NOTES.md",
    "chars": 1,
    "preview": "​"
  },
  {
    "path": "0876-middle-of-the-linked-list/README.md",
    "chars": 1246,
    "preview": "<h2><a href=\"https://leetcode.com/problems/middle-of-the-linked-list/\">876. Middle of the Linked List</a></h2><h3>Easy</"
  },
  {
    "path": "0886-possible-bipartition/0886-possible-bipartition.java",
    "chars": 1308,
    "preview": "class Solution {\n    public boolean possibleBipartition(int n, int[][] dislikes) {\n        int[] colour = new int[n+1];\n"
  },
  {
    "path": "0886-possible-bipartition/NOTES.md",
    "chars": 1,
    "preview": "​"
  },
  {
    "path": "0886-possible-bipartition/README.md",
    "chars": 1701,
    "preview": "<h2><a href=\"https://leetcode.com/problems/possible-bipartition/\">886. Possible Bipartition</a></h2><h3>Medium</h3><hr><"
  },
  {
    "path": "0899-orderly-queue/0899-orderly-queue.java",
    "chars": 517,
    "preview": "class Solution {\n    public String orderlyQueue(String s, int k) {\n        if (k == 1) {\n            String ans = s;\n   "
  },
  {
    "path": "0899-orderly-queue/NOTES.md",
    "chars": 1,
    "preview": "​"
  },
  {
    "path": "0899-orderly-queue/README.md",
    "chars": 1394,
    "preview": "<h2><a href=\"https://leetcode.com/problems/orderly-queue/\">899. Orderly Queue</a></h2><h3>Hard</h3><hr><div><p>You are g"
  },
  {
    "path": "0901-online-stock-span/0901-online-stock-span.java",
    "chars": 462,
    "preview": "class StockSpanner {\n    Stack<int[]> stack = new Stack<>();\n    \n    public int next(int price) {\n        int ans = 1;\n"
  },
  {
    "path": "0901-online-stock-span/NOTES.md",
    "chars": 1,
    "preview": "​"
  },
  {
    "path": "0901-online-stock-span/README.md",
    "chars": 1901,
    "preview": "<h2><a href=\"https://leetcode.com/problems/online-stock-span/\">901. Online Stock Span</a></h2><h3>Medium</h3><hr><div><p"
  },
  {
    "path": "0907-sum-of-subarray-minimums/0907-sum-of-subarray-minimums.java",
    "chars": 1351,
    "preview": "\nclass Solution {\n    public int sumSubarrayMins(int[] arr) {\n        int MOD = 1000000007;\n\n        Stack<Integer> stac"
  },
  {
    "path": "0907-sum-of-subarray-minimums/NOTES.md",
    "chars": 1,
    "preview": "​"
  },
  {
    "path": "0907-sum-of-subarray-minimums/README.md",
    "chars": 1053,
    "preview": "<h2><a href=\"https://leetcode.com/problems/sum-of-subarray-minimums/\">907. Sum of Subarray Minimums</a></h2><h3>Medium</"
  },
  {
    "path": "0909-snakes-and-ladders/0909-snakes-and-ladders.java",
    "chars": 1233,
    "preview": "class Solution {\n    public int snakesAndLadders(int[][] board) {\n        int n = board.length;\n        Pair<Integer, In"
  },
  {
    "path": "0909-snakes-and-ladders/NOTES.md",
    "chars": 1,
    "preview": "​"
  },
  {
    "path": "0909-snakes-and-ladders/README.md",
    "chars": 3551,
    "preview": "<h2><a href=\"https://leetcode.com/problems/snakes-and-ladders/\">909. Snakes and Ladders</a></h2><h3>Medium</h3><hr><div>"
  },
  {
    "path": "0918-maximum-sum-circular-subarray/0918-maximum-sum-circular-subarray.java",
    "chars": 486,
    "preview": "class Solution {\n    public int maxSubarraySumCircular(int[] nums) {\n        int curMax = 0, curMin = 0, sum = 0, maxSum"
  }
]

// ... and 2030 more files (download for full content)

About this extraction

This page contains the full source code of the Sagar0-0/DSA GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 2230 files (2.2 MB), approximately 691.9k tokens, and a symbol index with 3946 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!