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 }}
bygo
leetcode
Repository navigation
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
More
items
leetcode
Public
Notifications
You must be signed in to change notification settings
Fork
17
 (
17
)
Star
121
 (
121
)
You must be signed in to star a repository
About
🌓in the dead of night
Topics
algorithm
go
leetcode
Resources
Readme
Activity
Stars
121
stars
Watchers
4
watching
Forks
17
forks
Report repository
master
Branches
Tags
Go to file
Code
Open more actions menu
Latest commit
Â
History
381 Commits
381 Commits
Folders and files
Name
Name
Last commit message
Last commit date
Array
Array
Â
Â
Backtrack
Backtrack
Â
Â
BinarySearch
BinarySearch
Â
Â
Bit
Bit
Â
Â
Classic
Classic
Â
Â
DP
DP
Â
Â
Design
Design
Â
Â
Divide
Divide
Â
Â
Enum
Enum
Â
Â
Graph
Graph
Â
Â
Greedy
Greedy
Â
Â
Hash
Hash
Â
Â
HashRolling
HashRolling
Â
Â
Heap
Heap
Â
Â
LinkedList
LinkedList
Â
Â
Math
Math
Â
Â
Matrix
Matrix
Â
Â
NumberTheory
NumberTheory
Â
Â
Offer
Offer
Â
Â
Queue
Queue
Â
Â
Search
Search
Â
Â
Sort
Sort
Â
Â
Sql
Sql
Â
Â
Stack
Stack
Â
Â
Stub
Stub
Â
Â
Sum
Sum
Â
Â
Templates
Templates
Â
Â
Tree
Tree
Â
Â
Trie
Trie
Â
Â
TwoPointer
TwoPointer
Â
Â
Union
Union
Â
Â
Vector/
(Hash) 1570.dot-product-of-two-sparse-vectors
Vector/
(Hash) 1570.dot-product-of-two-sparse-vectors
Â
Â
util
util
Â
Â
.gitignore
.gitignore
Â
Â
0215.kth-largest-element-in-an-arraymain.go
0215.kth-largest-element-in-an-arraymain.go
Â
Â
0672.bulb-switcher-iimain.go
0672.bulb-switcher-iimain.go
Â
Â
1619.mean-of-array-after-removing-some-elementsmain.go
1619.mean-of-array-after-removing-some-elementsmain.go
Â
Â
1985.find-the-kth-largest-integer-in-the-arraymain.go
1985.find-the-kth-largest-integer-in-the-arraymain.go
Â
Â
helper.go
helper.go
Â
Â
main.go
main.go
Â
Â
main.go##
main.go##
Â
Â
mind.md
mind.md
Â
Â
readme.md
readme.md
Â
Â
View all files
Repository files navigation
README
More
items
LeetCode
1150/2792
About
🌓in the dead of night
Topics
algorithm
go
leetcode
Resources
Readme
Activity
Stars
121
stars
Watchers
4
watching
Forks
17
forks
Report repository
Releases
Packages
Used by
Contributors
Languages
You can’t perform that action at this time.