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
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
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 }}
ecgan
/
leetcode
Public
Notifications
You must be signed in to change notification settings
Fork
3
Star
16
Code
Issues
0
Pull requests
13
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Files
Expand file tree
master
Breadcrumbs
leetcode
/
problems
/
Copy path
Directory actions
More options
More options
Directory actions
More options
More options
Latest commit
History
History
History
master
Breadcrumbs
leetcode
/
problems
/
Copy path
Top
Folders and files
Name
Name
Last commit message
Last commit date
parent directory
..
alert-using-same-key-card-three-or-more-times-in-a-one-hour-period
alert-using-same-key-card-three-or-more-times-in-a-one-hour-period
angle-between-hands-of-a-clock
angle-between-hands-of-a-clock
apply-discount-every-n-orders
apply-discount-every-n-orders
arithmetic-slices
arithmetic-slices
array-transformation
array-transformation
as-far-from-land-as-possible
as-far-from-land-as-possible
average-salary-excluding-the-minimum-and-maximum-salary
average-salary-excluding-the-minimum-and-maximum-salary
backspace-string-compare
backspace-string-compare
best-time-to-buy-and-sell-stock-ii
best-time-to-buy-and-sell-stock-ii
best-time-to-buy-and-sell-stock
best-time-to-buy-and-sell-stock
binary-tree-coloring-game
binary-tree-coloring-game
binary-tree-maximum-path-sum
binary-tree-maximum-path-sum
binary-tree-right-side-view
binary-tree-right-side-view
bitwise-and-of-numbers-range
bitwise-and-of-numbers-range
broken-calculator
broken-calculator
can-make-palindrome-from-substring
can-make-palindrome-from-substring
cheapest-flights-within-k-stops
cheapest-flights-within-k-stops
check-if-a-string-is-a-valid-sequence-from-root-to-leaves-path-in-a-binary-tree
check-if-a-string-is-a-valid-sequence-from-root-to-leaves-path-in-a-binary-tree
check-if-it-is-a-straight-line
check-if-it-is-a-straight-line
check-if-n-and-its-double-exist
check-if-n-and-its-double-exist
cinema-seat-allocation
cinema-seat-allocation
circle-and-rectangle-overlapping
circle-and-rectangle-overlapping
climbing-stairs
climbing-stairs
closest-divisors
closest-divisors
coin-change-2
coin-change-2
compare-strings-by-frequency-of-the-smallest-character
compare-strings-by-frequency-of-the-smallest-character
construct-binary-search-tree-from-preorder-traversal
construct-binary-search-tree-from-preorder-traversal
container-with-most-water
container-with-most-water
contiguous-array
contiguous-array
convert-bst-to-greater-tree
convert-bst-to-greater-tree
convert-integer-to-the-sum-of-two-no-zero-integers
convert-integer-to-the-sum-of-two-no-zero-integers
copy-list-with-random-pointer
copy-list-with-random-pointer
count-complete-tree-nodes
count-complete-tree-nodes
count-square-submatrices-with-all-ones
count-square-submatrices-with-all-ones
counting-bits
counting-bits
counting-elements
counting-elements
course-schedule
course-schedule
cousins-in-binary-tree
cousins-in-binary-tree
create-target-array-in-the-given-order
create-target-array-in-the-given-order
day-of-the-week
day-of-the-week
day-of-the-year
day-of-the-year
decompress-run-length-encoded-list
decompress-run-length-encoded-list
decrease-elements-to-make-array-zigzag
decrease-elements-to-make-array-zigzag
delete-node-in-a-linked-list
delete-node-in-a-linked-list
design-a-leaderboard
design-a-leaderboard
design-parking-system
design-parking-system
diameter-of-binary-tree
diameter-of-binary-tree
display-table-of-food-orders-in-a-restaurant
display-table-of-food-orders-in-a-restaurant
distance-between-bus-stops
distance-between-bus-stops
divide-two-integers
divide-two-integers
divisor-game
divisor-game
dungeon-game
dungeon-game
edit-distance
edit-distance
encode-number
encode-number
even-odd-tree
even-odd-tree
final-prices-with-a-special-discount-in-a-shop
final-prices-with-a-special-discount-in-a-shop
find-all-anagrams-in-a-string
find-all-anagrams-in-a-string
find-elements-in-a-contaminated-binary-tree
find-elements-in-a-contaminated-binary-tree
find-the-distance-value-between-two-arrays
find-the-distance-value-between-two-arrays
find-the-duplicate-number
find-the-duplicate-number
find-the-most-common-response
find-the-most-common-response
find-the-town-judge
find-the-town-judge
find-winner-on-a-tic-tac-toe-game
find-winner-on-a-tic-tac-toe-game
find-words-that-can-be-formed-by-characters
find-words-that-can-be-formed-by-characters
first-bad-version
first-bad-version
first-unique-character-in-a-string
first-unique-character-in-a-string
first-unique-number
first-unique-number
flood-fill
flood-fill
four-divisors
four-divisors
generate-a-string-with-characters-that-have-odd-counts
generate-a-string-with-characters-that-have-odd-counts
get-equal-substrings-within-budget
get-equal-substrings-within-budget
group-anagrams
group-anagrams
h-index-ii
h-index-ii
happy-number
happy-number
hexspeak
hexspeak
house-robber
house-robber
implement-trie-prefix-tree
implement-trie-prefix-tree
increasing-decreasing-string
increasing-decreasing-string
insert-delete-getrandom-o1
insert-delete-getrandom-o1
intersection-of-three-sorted-arrays
intersection-of-three-sorted-arrays
intersection-of-two-arrays-ii
intersection-of-two-arrays-ii
intersection-of-two-arrays
intersection-of-two-arrays
interval-list-intersections
interval-list-intersections
invert-binary-tree
invert-binary-tree
is-a-a-majority-element
is-a-a-majority-element
is-graph-bipartite
is-graph-bipartite
is-subsequence
is-subsequence
jewels-and-stones
jewels-and-stones
jump-game
jump-game
k-closest-points-to-origin
k-closest-points-to-origin
kth-smallest-element-in-a-bst
kth-smallest-element-in-a-bst
largest-divisible-subset
largest-divisible-subset
last-stone-weight
last-stone-weight
last-substring-in-lexicographical-order
last-substring-in-lexicographical-order
least-number-of-unique-integers-after-k-removals
least-number-of-unique-integers-after-k-removals
leftmost-column-with-at-least-a-one
leftmost-column-with-at-least-a-one
letter-case-permutation
letter-case-permutation
linked-list-cycle
linked-list-cycle
longest-common-subsequence
longest-common-subsequence
longest-duplicate-substring
longest-duplicate-substring
View all files
You can’t perform that action at this time.