Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects, and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Developer articles
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
wangshu24
leetcode-solutions
Repository navigation
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
More
items
leetcode-solutions
Public
Notifications
You must be signed in to change notification settings
Fork
0
(
0
)
Star
0
(
0
)
You must be signed in to star a repository
About
A collection of LeetCode solutions
Resources
Readme
Activity
Stars
0
stars
Watchers
1
watching
Forks
0
forks
Report repository
main
Branches
Tags
Go to file
Code
Open more actions menu
Latest commit
History
854 Commits
854 Commits
Folders and files
Name
Name
Last commit message
Last commit date
1-two-sum
1-two-sum
1002-maximum-width-ramp
1002-maximum-width-ramp
1014-k-closest-points-to-origin
1014-k-closest-points-to-origin
1030-smallest-string-starting-from-leaf
1030-smallest-string-starting-from-leaf
1035-cousins-in-binary-tree
1035-cousins-in-binary-tree
108-convert-sorted-array-to-binary-search-tree
108-convert-sorted-array-to-binary-search-tree
1093-recover-a-tree-from-preorder-traversal
1093-recover-a-tree-from-preorder-traversal
11-container-with-most-water
11-container-with-most-water
1133-last-substring-in-lexicographical-order
1133-last-substring-in-lexicographical-order
1146-greatest-common-divisor-of-strings
1146-greatest-common-divisor-of-strings
1147-flip-columns-for-maximum-number-of-equal-rows
1147-flip-columns-for-maximum-number-of-equal-rows
1160-letter-tile-possibilities
1160-letter-tile-possibilities
1170-shortest-common-supersequence
1170-shortest-common-supersequence
119-pascals-triangle-ii
119-pascals-triangle-ii
1197-parsing-a-boolean-expression
1197-parsing-a-boolean-expression
12-integer-to-roman
12-integer-to-roman
1206-corporate-flight-bookings
1206-corporate-flight-bookings
122-best-time-to-buy-and-sell-stock-ii
122-best-time-to-buy-and-sell-stock-ii
1256-rank-transform-of-an-array
1256-rank-transform-of-an-array
13-roman-to-integer
13-roman-to-integer
1302-delete-characters-to-make-fancy-string
1302-delete-characters-to-make-fancy-string
1304-longest-happy-string
1304-longest-happy-string
1350-remove-sub-folders-from-the-filesystem
1350-remove-sub-folders-from-the-filesystem
1364-tuple-with-same-product
1364-tuple-with-same-product
1387-find-elements-in-a-contaminated-binary-tree
1387-find-elements-in-a-contaminated-binary-tree
1396-count-servers-that-communicate
1396-count-servers-that-communicate
14-longest-common-prefix
14-longest-common-prefix
1402-count-square-submatrices-with-all-ones
1402-count-square-submatrices-with-all-ones
143-reorder-list
143-reorder-list
146-lru-cache
146-lru-cache
1468-check-if-n-and-its-double-exist
1468-check-if-n-and-its-double-exist
1477-product-of-the-last-k-numbers
1477-product-of-the-last-k-numbers
1502-construct-k-palindrome-strings
1502-construct-k-palindrome-strings
1516-the-k-th-lexicographical-string-of-all-happy-strings-of-length-n
1516-the-k-th-lexicographical-string-of-all-happy-strings-of-length-n
1528-kids-with-the-greatest-number-of-candies
1528-kids-with-the-greatest-number-of-candies
1548-check-if-all-1s-are-at-least-length-k-places-away
1548-check-if-all-1s-are-at-least-length-k-places-away
1566-check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence
1566-check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence
1570-final-prices-with-a-special-discount-in-a-shop
1570-final-prices-with-a-special-discount-in-a-shop
1605-minimum-number-of-days-to-make-m-bouquets
1605-minimum-number-of-days-to-make-m-bouquets
1620-check-if-array-pairs-are-divisible-by-k
1620-check-if-array-pairs-are-divisible-by-k
1631-number-of-sub-arrays-with-odd-sum
1631-number-of-sub-arrays-with-odd-sum
165-compare-version-numbers
165-compare-version-numbers
1667-find-kth-bit-in-nth-binary-string
1667-find-kth-bit-in-nth-binary-string
1679-shortest-subarray-to-be-removed-to-make-array-sorted
1679-shortest-subarray-to-be-removed-to-make-array-sorted
169-majority-element
169-majority-element
1694-make-sum-divisible-by-p
1694-make-sum-divisible-by-p
17-letter-combinations-of-a-phone-number
17-letter-combinations-of-a-phone-number
1715-split-a-string-into-the-max-number-of-unique-substrings
1715-split-a-string-into-the-max-number-of-unique-substrings
1755-defuse-the-bomb
1755-defuse-the-bomb
179-largest-number
179-largest-number
1819-construct-the-lexicographically-largest-valid-sequence
1819-construct-the-lexicographically-largest-valid-sequence
1849-maximum-absolute-sum-of-any-subarray
1849-maximum-absolute-sum-of-any-subarray
1878-check-if-array-is-sorted-and-rotated
1878-check-if-array-is-sorted-and-rotated
1886-minimum-limit-of-balls-in-a-bag
1886-minimum-limit-of-balls-in-a-bag
189-rotate-array
189-rotate-array
1894-merge-strings-alternately
1894-merge-strings-alternately
19-remove-nth-node-from-end-of-list
19-remove-nth-node-from-end-of-list
1915-check-if-one-string-swap-can-make-strings-equal
1915-check-if-one-string-swap-can-make-strings-equal
1917-maximum-average-pass-ratio
1917-maximum-average-pass-ratio
1923-sentence-similarity-iii
1923-sentence-similarity-iii
1927-maximum-ascending-subarray-sum
1927-maximum-ascending-subarray-sum
1940-maximum-xor-for-each-query
1940-maximum-xor-for-each-query
1972-rotating-the-box
1972-rotating-the-box
1993-sum-of-all-subset-xor-totals
1993-sum-of-all-subset-xor-totals
2-add-two-numbers
2-add-two-numbers
20-valid-parentheses
20-valid-parentheses
2021-remove-all-occurrences-of-a-substring
2021-remove-all-occurrences-of-a-substring
203-remove-linked-list-elements
203-remove-linked-list-elements
2054-the-number-of-the-smallest-unoccupied-chair
2054-the-number-of-the-smallest-unoccupied-chair
207-course-schedule
207-course-schedule
2078-maximum-compatibility-score-sum
2078-maximum-compatibility-score-sum
2089-maximum-matrix-sum
2089-maximum-matrix-sum
2095-minimum-number-of-swaps-to-make-the-string-balanced
2095-minimum-number-of-swaps-to-make-the-string-balanced
21-merge-two-sorted-lists
21-merge-two-sorted-lists
2107-find-unique-binary-string
2107-find-unique-binary-string
215-kth-largest-element-in-an-array
215-kth-largest-element-in-an-array
2155-find-missing-observations
2155-find-missing-observations
2164-two-best-non-overlapping-events
2164-two-best-non-overlapping-events
217-contains-duplicate
217-contains-duplicate
2170-count-number-of-maximum-bitwise-or-subsets
2170-count-number-of-maximum-bitwise-or-subsets
2179-most-beautiful-item-for-each-query
2179-most-beautiful-item-for-each-query
2188-minimized-maximum-of-products-distributed-to-any-store
2188-minimized-maximum-of-products-distributed-to-any-store
219-contains-duplicate-ii
219-contains-duplicate-ii
2190-count-common-words-with-one-occurrence
2190-count-common-words-with-one-occurrence
22-generate-parentheses
22-generate-parentheses
2201-valid-arrangement-of-pairs
2201-valid-arrangement-of-pairs
2220-find-all-possible-recipes-from-given-supplies
2220-find-all-possible-recipes-from-given-supplies
2221-check-if-a-parentheses-string-can-be-valid
2221-check-if-a-parentheses-string-can-be-valid
2265-partition-array-according-to-given-pivot
2265-partition-array-according-to-given-pivot
2284-smallest-value-of-the-rearranged-number
2284-smallest-value-of-the-rearranged-number
230-kth-smallest-element-in-a-bst
230-kth-smallest-element-in-a-bst
2300-construct-string-with-repeat-limit
2300-construct-string-with-repeat-limit
2343-count-unguarded-cells-in-the-grid
2343-count-unguarded-cells-in-the-grid
2356-largest-combination-with-bitwise-and-greater-than-zero
2356-largest-combination-with-bitwise-and-greater-than-zero
236-lowest-common-ancestor-of-a-binary-tree
236-lowest-common-ancestor-of-a-binary-tree
2375-minimum-obstacle-removal-to-reach-corner
2375-minimum-obstacle-removal-to-reach-corner
24-swap-nodes-in-pairs
24-swap-nodes-in-pairs
2414-move-pieces-to-obtain-a-string
2414-move-pieces-to-obtain-a-string
2434-design-a-number-container-system
2434-design-a-number-container-system
2448-count-number-of-bad-pairs
2448-count-number-of-bad-pairs
View all files
Repository files navigation
README
More
items
leetcode-solutions
A collection of LeetCode solutions
About
A collection of LeetCode solutions
Resources
Readme
Activity
Stars
0
stars
Watchers
1
watching
Forks
0
forks
Report repository
Releases
Packages
Used by
Contributors
Languages
You can’t perform that action at this time.