Skip to content
Navigation Menu
Sign in
Appearance settings
Platform
AI CODE CREATION
GitHub Copilot
Write better code with AI
GitHub Copilot app
Direct agents from issue to merge
MCP Registry
Integrate external tools
DEVELOPER WORKFLOWS
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
Code Quality
Enforce quality at merge
APPLICATION SECURITY
GitHub Advanced Security
Find and fix vulnerabilities
Code security
Secure your code as you build
Secret protection
Stop leaks before they start
EXPLORE
Why GitHub
Documentation
Blog
Changelog
Marketplace
View all features
Solutions
BY COMPANY SIZE
Enterprises
Small and medium teams
Startups
Nonprofits
BY USE CASE
App Modernization
DevSecOps
DevOps
CI/CD
View all use cases
BY INDUSTRY
Healthcare
Financial services
Manufacturing
Government
View all industries
View all solutions
Resources
EXPLORE BY TOPIC
AI
Software Development
DevOps
Security
View all topics
EXPLORE BY TYPE
Customer stories
Events & webinars
Ebooks & reports
Business insights
GitHub Skills
SUPPORT & SERVICES
Documentation
Customer support
Community forum
Trust center
Partners
View all resources
Open Source
COMMUNITY
GitHub Sponsors
Fund open source developers
PROGRAMS
Security Lab
Maintainer Community
Accelerator
GitHub Stars
Archive Program
REPOSITORIES
Topics
Trending
Collections
Enterprise
ENTERPRISE SOLUTIONS
Enterprise platform
AI-powered developer platform
AVAILABLE ADD-ONS
GitHub Advanced Security
Enterprise-grade security features
Copilot for Business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Pricing
Type
/
to 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 }}
whwei
/
LeetCode
Public
Notifications
You must be signed in to change notification settings
Fork
4
Star
2
Code
Issues
0
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
master
Branches
Tags
Go to file
Code
Open more actions menu
Folders and files
Name
Name
Last commit message
Last commit date
Latest commit
History
241 Commits
241 Commits
3sum-closest
3sum-closest
3sum
3sum
4sum
4sum
add-and-search-word
add-and-search-word
add-binary
add-binary
add-digits
add-digits
add-two-numbers
add-two-numbers
balanced-binary-tree
balanced-binary-tree
basic-calculator-ii
basic-calculator-ii
basic-calculator
basic-calculator
best-time-to-buy-and-sell-stock-ii
best-time-to-buy-and-sell-stock-ii
best-time-to-buy-and-sell-stock-iii
best-time-to-buy-and-sell-stock-iii
best-time-to-buy-and-sell-stock-iv
best-time-to-buy-and-sell-stock-iv
best-time-to-buy-and-sell-stock
best-time-to-buy-and-sell-stock
binary-search-tree-iterator
binary-search-tree-iterator
binary-tree-inorder-traversal
binary-tree-inorder-traversal
binary-tree-level-order-traversal-ii
binary-tree-level-order-traversal-ii
binary-tree-level-order-traversal
binary-tree-level-order-traversal
binary-tree-maximum-path-sum
binary-tree-maximum-path-sum
binary-tree-paths
binary-tree-paths
binary-tree-postorder-traversal
binary-tree-postorder-traversal
binary-tree-preorder-traversal
binary-tree-preorder-traversal
binary-tree-right-side-view
binary-tree-right-side-view
binary-tree-zigzag-level-order-traversal
binary-tree-zigzag-level-order-traversal
bitwise-and-of-number-range
bitwise-and-of-number-range
candy
candy
climbing-stairs
climbing-stairs
clone-graph
clone-graph
combination-sum-ii
combination-sum-ii
combination-sum-iii
combination-sum-iii
combination-sum
combination-sum
combinations
combinations
compare-version-numbers
compare-version-numbers
construct-binary-tree-from-inorder-and-postorder-traversal
construct-binary-tree-from-inorder-and-postorder-traversal
construct-binary-tree-from-preorder-and-inorder-traversal
construct-binary-tree-from-preorder-and-inorder-traversal
container-with-most-water
container-with-most-water
contains-duplicate-ii
contains-duplicate-ii
contains-duplicate-iii
contains-duplicate-iii
contains-duplicate
contains-duplicate
convert-sorted-array-to-binary-search-tree
convert-sorted-array-to-binary-search-tree
convert-sorted-list-to-binary-search-tree
convert-sorted-list-to-binary-search-tree
copy-list-with-random-pointer
copy-list-with-random-pointer
count-and-say
count-and-say
count-complete-tree-nodes
count-complete-tree-nodes
count-primes
count-primes
decode-ways
decode-ways
delete-node-in-a-linked-list
delete-node-in-a-linked-list
different-ways-to-add-parentheses
different-ways-to-add-parentheses
distinct-subsequences
distinct-subsequences
divide-two-integers
divide-two-integers
edit-distance
edit-distance
evaluate-reverse-polish-notation
evaluate-reverse-polish-notation
excel-sheet-column-number
excel-sheet-column-number
excel-sheet-column-title
excel-sheet-column-title
factorial-trailing-zeroes
factorial-trailing-zeroes
find-median-from-data-stream
find-median-from-data-stream
find-minimum-in-rotated-sorted-array-ii
find-minimum-in-rotated-sorted-array-ii
find-minimum-in-rotated-sorted-array
find-minimum-in-rotated-sorted-array
find-peak-element
find-peak-element
find-the-duplicate-number
find-the-duplicate-number
first-bad-version
first-bad-version
first-missing-positive
first-missing-positive
flatten-binary-tree-to-linked-list
flatten-binary-tree-to-linked-list
fraction-to-recurring-decimal
fraction-to-recurring-decimal
game-of-life
game-of-life
gas-station
gas-station
generate-parentheses
generate-parentheses
gray-code
gray-code
group-anagrams
group-anagrams
h-index-ii
h-index-ii
h-index
h-index
happy-number
happy-number
house-robber-ii
house-robber-ii
house-robber
house-robber
implement-queue-using-stacks
implement-queue-using-stacks
implement-stack-using-queue
implement-stack-using-queue
implement-strstr
implement-strstr
implement-trie
implement-trie
insert-sort-list
insert-sort-list
integer-to-roman
integer-to-roman
interleaving-string
interleaving-string
intersection-of-two-linked-list
intersection-of-two-linked-list
invert-binary-tree
invert-binary-tree
isomorphic-strings
isomorphic-strings
jump-game-ii
jump-game-ii
jump-game
jump-game
kth-largest-element-in-an-array
kth-largest-element-in-an-array
kth-smallest-element-in-a-bst
kth-smallest-element-in-a-bst
largest-number
largest-number
length-of-last-word
length-of-last-word
letter-combinations-of-phone-numbers
letter-combinations-of-phone-numbers
linked-list-cycle-ii
linked-list-cycle-ii
linked-list-cycle
linked-list-cycle
longest-common-prefix
longest-common-prefix
longest-consecutive-sequence
longest-consecutive-sequence
longest-increasing-subsequence
longest-increasing-subsequence
longest-palindromic-substring
longest-palindromic-substring
longest-substring-without-repeating-characters
longest-substring-without-repeating-characters
longest-valid-parentheses
longest-valid-parentheses
lowest-common-ancestor-of-a-binary-search-tree
lowest-common-ancestor-of-a-binary-search-tree
View all files
About
my LeetCode solution
Activity
Stars
2
stars
Watchers
1
watching
Forks
4
forks
Report repository
Releases
Packages
Used by
Contributors
Languages
You can’t perform that action at this time.