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 }}
CodingOfZero
/
LeetCode
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
0
Pull requests
0
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
/
Array
/
Copy path
Directory actions
More options
More options
Directory actions
More options
More options
Latest commit
History
History
History
master
Breadcrumbs
LeetCode
/
Array
/
Copy path
Top
Folders and files
Name
Name
Last commit message
Last commit date
parent directory
..
1002_FindCommonCharacters.cpp
1002_FindCommonCharacters.cpp
1122_RelativeSortArray.cpp
1122_RelativeSortArray.cpp
1160_FindWordsThatCanBeFormedbyCharacters.cpp
1160_FindWordsThatCanBeFormedbyCharacters.cpp
118_Pascal'sTriangle.cpp
118_Pascal'sTriangle.cpp
119_Pascal'sTriangleII.cpp
119_Pascal'sTriangleII.cpp
11_ContainerWithMostWater.cpp
11_ContainerWithMostWater.cpp
1200_MinimumAbsoluteDifference.cpp
1200_MinimumAbsoluteDifference.cpp
121_BestTimetoBuyandSellStock.cpp
121_BestTimetoBuyandSellStock.cpp
122_BestTimetoBuyandSellStockII.cpp
122_BestTimetoBuyandSellStockII.cpp
1252_CellswithOddValuesinaMatrix.cpp
1252_CellswithOddValuesinaMatrix.cpp
167_TwoSumII-Inputarrayissorted.cpp
167_TwoSumII-Inputarrayissorted.cpp
169_MajorityElement.cpp
169_MajorityElement.cpp
189_RotateArray.cpp
189_RotateArray.cpp
1_TwoSum.cpp
1_TwoSum.cpp
217_ContainsDuplicate.cpp
217_ContainsDuplicate.cpp
226_InvertBinaryTree.cpp
226_InvertBinaryTree.cpp
268_MissingNumber.cpp
268_MissingNumber.cpp
26_RemoveDuplicatesfromSortedArray.cpp
26_RemoveDuplicatesfromSortedArray.cpp
27_RemoveElement.cpp
27_RemoveElement.cpp
283_MoveZeroes.cpp
283_MoveZeroes.cpp
2_AddTwoNumbers.cpp
2_AddTwoNumbers.cpp
35_SearchInsertPosition.cpp
35_SearchInsertPosition.cpp
414_ThirdMaximumNumber.cpp
414_ThirdMaximumNumber.cpp
4_MedianofTwoSortedArrays.cpp
4_MedianofTwoSortedArrays.cpp
682_BaseballGame.cpp
682_BaseballGame.cpp
830_PositionsofLargeGroups.cpp
830_PositionsofLargeGroups.cpp
840_MagicSquaresInGrid.cpp
840_MagicSquaresInGrid.cpp
849_MaximizeDistancetoClosestPerson.cpp
849_MaximizeDistancetoClosestPerson.cpp
888_FairCandySwap.cpp
888_FairCandySwap.cpp
88_MergeSortedArray.cpp
88_MergeSortedArray.cpp
896_MonotonicArray.cpp
896_MonotonicArray.cpp
914_XofaKindinaDeckofCards.cpp
914_XofaKindinaDeckofCards.cpp
ArrayIntegerAdd.java
ArrayIntegerAdd.java
ClimbingStairs_70.java
ClimbingStairs_70.java
ConvertSortedArraytoBinarySearchTree_108.java
ConvertSortedArraytoBinarySearchTree_108.java
DayoftheWeek_1185.java
DayoftheWeek_1185.java
ElementAppearing_1287.java
ElementAppearing_1287.java
FindAllDuplicatesinanArray_442.java
FindAllDuplicatesinanArray_442.java
FindAllNumbersDisappearedinanArray_448.java
FindAllNumbersDisappearedinanArray_448.java
FindFirstandLastPositionofElementinSortedArray_34.java
FindFirstandLastPositionofElementinSortedArray_34.java
FindKthLargestXORCoordinateValue_1738.java
FindKthLargestXORCoordinateValue_1738.java
FindMinimuminRotatedSortedArrayII_154.java
FindMinimuminRotatedSortedArrayII_154.java
FindMinimuminRotatedSortedArray_153.java
FindMinimuminRotatedSortedArray_153.java
FindtheDuplicateNumber_287.java
FindtheDuplicateNumber_287.java
K_diffPairsinanArray_532.java
K_diffPairsinanArray_532.java
LargestNumberAtLeastTwiceofOthers_747.java
LargestNumberAtLeastTwiceofOthers_747.java
MaxConsecutiveOnes_485.java
MaxConsecutiveOnes_485.java
MergeIntervals_56.java
MergeIntervals_56.java
NextPermutation_31.java
NextPermutation_31.java
Pattern132_456.java
Pattern132_456.java
PlusOne_66.java
PlusOne_66.java
PositionsLargeGroups_803.java
PositionsLargeGroups_803.java
ProductofArrayExceptSelf_238.java
ProductofArrayExceptSelf_238.java
RotateImage_48.java
RotateImage_48.java
SearchaDMatrixII_240.java
SearchaDMatrixII_240.java
SearchaDMatrix_74.java
SearchaDMatrix_74.java
SetMatrixZeroes_73.java
SetMatrixZeroes_73.java
Shift2DGrid_1260.java
Shift2DGrid_1260.java
ShortestUnsortedContinuousSubarray_581.java
ShortestUnsortedContinuousSubarray_581.java
SortColors_75.java
SortColors_75.java
SpiralMatrixII_59.java
SpiralMatrixII_59.java
SpiralMatrix_54.java
SpiralMatrix_54.java
SubarraySumEqualsK_560.java
SubarraySumEqualsK_560.java
TheDegreeOfArray_697.java
TheDegreeOfArray_697.java
ThreeSum_15.java
ThreeSum_15.java
ToeplitzMatrix_766.java
ToeplitzMatrix_766.java
TransposeMatrix_867.java
TransposeMatrix_867.java
View all files
You can’t perform that action at this time.