Skip to content
leetcode solutions in C++ 微信公众号:曲奇泡芙 (互联网&智能汽车技术)
C++
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
0001-two-sum.cpp
0002-add-two-numbers.cpp
0003-longest-substring-without-repeating-characters.cpp
0004-median-of-two-sorted-arrays.cpp
0005-longest-palindromic-substring.cpp
0006-zigzag-conversion.cpp
0007-reverse-integer.cpp
0008-string-to-integer-atoi.cpp
0009-palindrome-number.cpp
0010-regular-expression-matching.cpp
0011-container-with-most-water.cpp
0012-integer-to-roman.cpp
0013-roman-to-integer.cpp
0014-longest-common-prefix.cpp
0015-3sum.cpp
0016-3sum-closest.cpp
0017-letter-combinations-of-a-phone-number.cpp
0018-4sum.cpp
0019-remove-nth-node-from-end-of-list.cpp
0020-valid-parentheses.cpp
0021-merge-two-sorted-lists.cpp
0022-generate-parentheses.cpp
0023-merge-k-sorted-lists.cpp
0024-swap-nodes-in-pairs.cpp
0025-reverse-nodes-in-k-group.cpp
0026-remove-duplicates-from-sorted-array.cpp
0027-remove-element.cpp
0028-implement-strstr.cpp
0029-divide-two-integers.cpp
0030-substring-with-concatenation-of-all-words.cpp
0031-next-permutation.cpp
0032-longest-valid-parentheses.cpp
0033-search-in-rotated-sorted-array.cpp
0034-find-first-and-last-position-of-element-in-sorted-array.cpp
0035-search-insert-position.cpp
0036-valid-sudoku.cpp
0037-sudoku-solver.cpp
0038-count-and-say.cpp
0039-combination-sum.cpp
0040-combination-sum-ii.cpp
0041-first-missing-positive.cpp
0042-trapping-rain-water.cpp
0043-multiply-strings.cpp
0044-wildcard-matching.cpp
0045-jump-game-ii.cpp
0046-permutations.cpp
0047-permutations-ii.cpp
0048-rotate-image.cpp
0049-group-anagrams.cpp
0050-powx-n.cpp
0051-n-queens.cpp
0052-n-queens-ii.cpp
0053-maximum-subarray.cpp
0054-spiral-matrix.cpp
0055-jump-game.cpp
0056-merge-intervals.cpp
0057-insert-interval.cpp
0058-length-of-last-word.cpp
0059-spiral-matrix-ii.cpp
0060-permutation-sequence.cpp
0061-rotate-list.cpp
0062-unique-paths.cpp
0063-unique-paths-ii.cpp
0064-minimum-path-sum.cpp
0065-valid-number.cpp
0066-plus-one.cpp
0067-add-binary.cpp
0068-text-justification.cpp
0069-sqrtx.cpp
0070-climbing-stairs.cpp
0071-simplify-path.cpp
0072-edit-distance.cpp
0073-set-matrix-zeroes.cpp
0074-search-a-2d-matrix.cpp
0075-sort-colors.cpp
0076-minimum-window-substring.cpp
0077-combinations.cpp
0078-subsets.cpp
0079-word-search.cpp
0080-remove-duplicates-from-sorted-array-ii.cpp
0081-search-in-rotated-sorted-array-ii.cpp
0082-remove-duplicates-from-sorted-list-ii.cpp
0083-remove-duplicates-from-sorted-list.cpp
0084-largest-rectangle-in-histogram.cpp
0085-maximal-rectangle.cpp
0086-partition-list.cpp
0087-scramble-string.cpp
0088-merge-sorted-array.cpp
0089-gray-code.cpp
0090-subsets-ii.cpp
0091-decode-ways.cpp
0092-reverse-linked-list-ii.cpp
0093-restore-ip-addresses.cpp
0094-binary-tree-inorder-traversal.cpp
0095-unique-binary-search-trees-ii.cpp
0096-unique-binary-search-trees.cpp
0097-interleaving-string.cpp
0098-validate-binary-search-tree.cpp
0099-recover-binary-search-tree.cpp
0100-same-tree.cpp
0101-symmetric-tree.cpp
0102-binary-tree-level-order-traversal.cpp
0103-binary-tree-zigzag-level-order-traversal.cpp
0104-maximum-depth-of-binary-tree.cpp
0105-construct-binary-tree-from-preorder-and-inorder-traversal.cpp
0106-construct-binary-tree-from-inorder-and-postorder-traversal.cpp
0107-binary-tree-level-order-traversal-ii.cpp
0108-convert-sorted-array-to-binary-search-tree.cpp
0109-convert-sorted-list-to-binary-search-tree.cpp
0110-balanced-binary-tree.cpp
0111-minimum-depth-of-binary-tree.cpp
0112-path-sum.cpp
0113-path-sum-ii.cpp
0114-flatten-binary-tree-to-linked-list.cpp
0115-distinct-subsequences.cpp
0116-populating-next-right-pointers-in-each-node.cpp
0117-populating-next-right-pointers-in-each-node-ii.cpp
0118-pascals-triangle.cpp
0119-pascals-triangle-ii.cpp
0120-triangle.cpp
0121-best-time-to-buy-and-sell-stock.cpp
0122-best-time-to-buy-and-sell-stock-ii.cpp
0123-best-time-to-buy-and-sell-stock-iii.cpp
0124-binary-tree-maximum-path-sum.cpp
0125-valid-palindrome.cpp
0126-word-ladder-ii.cpp
0127-word-ladder.cpp
0128-longest-consecutive-sequence.cpp
0129-sum-root-to-leaf-numbers.cpp
0130-surrounded-regions.cpp
0131-palindrome-partitioning.cpp
0132-palindrome-partitioning-ii.cpp
0133-clone-graph.cpp
0134-gas-station.cpp
0135-candy.cpp
0136-single-number.cpp
0137-single-number-ii.cpp
0138-copy-list-with-random-pointer.cpp
0139-word-break.cpp
0140-word-break-ii.cpp
0141-linked-list-cycle.cpp
0142-linked-list-cycle-ii.cpp
0143-reorder-list.cpp
0144-binary-tree-preorder-traversal.cpp
0145-binary-tree-postorder-traversal.cpp
0146-lru-cache.cpp
0147-insertion-sort-list.cpp
0148-sort-list.cpp
0149-max-points-on-a-line.cpp
0150-evaluate-reverse-polish-notation.cpp
LICENSE
README.md

README.md

leetcode

leetcode solutions in C++
微信公众号:曲奇泡芙 (互联网&车联网技术)

solutions for problems(0001~0100)
./0001-two-sum.cpp
./0002-add-two-numbers.cpp
./0003-longest-substring-without-repeating-characters.cpp
./0004-median-of-two-sorted-arrays.cpp
./0005-longest-palindromic-substring.cpp
./0006-zigzag-conversion.cpp
./0007-reverse-integer.cpp
./0008-string-to-integer-atoi.cpp
./0009-palindrome-number.cpp
./0010-regular-expression-matching.cpp
./0011-container-with-most-water.cpp
./0012-integer-to-roman.cpp
./0013-roman-to-integer.cpp
./0014-longest-common-prefix.cpp
./0015-3sum.cpp
./0016-3sum-closest.cpp
./0017-letter-combinations-of-a-phone-number.cpp
./0018-4sum.cpp
./0019-remove-nth-node-from-end-of-list.cpp
./0020-valid-parentheses.cpp
./0021-merge-two-sorted-lists.cpp
./0022-generate-parentheses.cpp
./0023-merge-k-sorted-lists.cpp
./0024-swap-nodes-in-pairs.cpp
./0025-reverse-nodes-in-k-group.cpp
./0026-remove-duplicates-from-sorted-array.cpp
./0027-remove-element.cpp
./0028-implement-strstr.cpp
./0029-divide-two-integers.cpp
./0030-substring-with-concatenation-of-all-words.cpp
./0031-next-permutation.cpp
./0032-longest-valid-parentheses.cpp
./0033-search-in-rotated-sorted-array.cpp
./0034-find-first-and-last-position-of-element-in-sorted-array.cpp
./0035-search-insert-position.cpp
./0036-valid-sudoku.cpp
./0037-sudoku-solver.cpp
./0038-count-and-say.cpp
./0039-combination-sum.cpp
./0040-combination-sum-ii.cpp
./0041-first-missing-positive.cpp
./0042-trapping-rain-water.cpp
./0043-multiply-strings.cpp
./0044-wildcard-matching.cpp
./0045-jump-game-ii.cpp
./0046-permutations.cpp
./0047-permutations-ii.cpp
./0048-rotate-image.cpp
./0049-group-anagrams.cpp
./0050-powx-n.cpp
./0051-n-queens.cpp
./0052-n-queens-ii.cpp
./0053-maximum-subarray.cpp
./0054-spiral-matrix.cpp
./0055-jump-game.cpp
./0056-merge-intervals.cpp
./0057-insert-interval.cpp
./0058-length-of-last-word.cpp
./0059-spiral-matrix-ii.cpp
./0060-permutation-sequence.cpp
./0061-rotate-list.cpp
./0062-unique-paths.cpp
./0063-unique-paths-ii.cpp
./0064-minimum-path-sum.cpp
./0065-valid-number.cpp
./0066-plus-one.cpp
./0067-add-binary.cpp
./0068-text-justification.cpp
./0069-sqrtx.cpp
./0070-climbing-stairs.cpp
./0071-simplify-path.cpp
./0072-edit-distance.cpp
./0073-set-matrix-zeroes.cpp
./0074-search-a-2d-matrix.cpp
./0075-sort-colors.cpp
./0076-minimum-window-substring.cpp
./0077-combinations.cpp
./0078-subsets.cpp
./0079-word-search.cpp
./0080-remove-duplicates-from-sorted-array-ii.cpp
./0081-search-in-rotated-sorted-array-ii.cpp
./0082-remove-duplicates-from-sorted-list-ii.cpp
./0083-remove-duplicates-from-sorted-list.cpp
./0084-largest-rectangle-in-histogram.cpp
./0085-maximal-rectangle.cpp
./0086-partition-list.cpp
./0087-scramble-string.cpp
./0088-merge-sorted-array.cpp
./0089-gray-code.cpp
./0090-subsets-ii.cpp
./0091-decode-ways.cpp
./0092-reverse-linked-list-ii.cpp
./0093-restore-ip-addresses.cpp
./0094-binary-tree-inorder-traversal.cpp
./0095-unique-binary-search-trees-ii.cpp
./0096-unique-binary-search-trees.cpp
./0097-interleaving-string.cpp
./0098-validate-binary-search-tree.cpp
./0099-recover-binary-search-tree.cpp
./0100-same-tree.cpp
./0101-symmetric-tree.cpp
./0102-binary-tree-level-order-traversal.cpp
./0103-binary-tree-zigzag-level-order-traversal.cpp
./0104-maximum-depth-of-binary-tree.cpp
./0105-construct-binary-tree-from-preorder-and-inorder-traversal.cpp
./0106-construct-binary-tree-from-inorder-and-postorder-traversal.cpp
./0107-binary-tree-level-order-traversal-ii.cpp
./0108-convert-sorted-array-to-binary-search-tree.cpp
./0109-convert-sorted-list-to-binary-search-tree.cpp
./0110-balanced-binary-tree.cpp
./0111-minimum-depth-of-binary-tree.cpp
./0112-path-sum.cpp
./0113-path-sum-ii.cpp
./0114-flatten-binary-tree-to-linked-list.cpp
./0115-distinct-subsequences.cpp
./0116-populating-next-right-pointers-in-each-node.cpp
./0117-populating-next-right-pointers-in-each-node-ii.cpp
./0118-pascals-triangle.cpp
./0119-pascals-triangle-ii.cpp
./0120-triangle.cpp
./0121-best-time-to-buy-and-sell-stock.cpp
./0122-best-time-to-buy-and-sell-stock-ii.cpp
./0123-best-time-to-buy-and-sell-stock-iii.cpp
./0124-binary-tree-maximum-path-sum.cpp
./0125-valid-palindrome.cpp
./0126-word-ladder-ii.cpp
./0127-word-ladder.cpp
./0128-longest-consecutive-sequence.cpp
./0129-sum-root-to-leaf-numbers.cpp
./0130-surrounded-regions.cpp
./0131-palindrome-partitioning.cpp
./0132-palindrome-partitioning-ii.cpp
./0133-clone-graph.cpp
./0134-gas-station.cpp
./0135-candy.cpp
./0136-single-number.cpp
./0137-single-number-ii.cpp
./0138-copy-list-with-random-pointer.cpp
./0139-word-break.cpp
./0140-word-break-ii.cpp
./0141-linked-list-cycle.cpp
./0142-linked-list-cycle-ii.cpp
./0143-reorder-list.cpp
./0144-binary-tree-preorder-traversal.cpp
./0145-binary-tree-postorder-traversal.cpp
./0146-lru-cache.cpp
./0147-insertion-sort-list.cpp
./0148-sort-list.cpp
./0149-max-points-on-a-line.cpp
./0150-evaluate-reverse-polish-notation.cpp

You can’t perform that action at this time.