Skip to content
Navigation Menu
Toggle navigation
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
New
Integrate external tools
DEVELOPER WORKFLOWS
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
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
Search or jump to...
Search code, repositories, users, issues, pull requests...
Search syntax tips
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Sign in
Sign up
Appearance settings
Resetting focus
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 }}
Uh oh!
There was an error while loading.
Please reload this page
.
doocs
/
leetcode
Public
Uh oh!
There was an error while loading.
Please reload this page
.
Notifications
You must be signed in to change notification settings
Fork
9.4k
Star
36.3k
Code
Issues
3
Pull requests
11
Discussions
Actions
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Security and quality
Insights
Files
Expand file tree
main
Breadcrumbs
leetcode
/
solution
/
3100-3199
/
Copy path
Directory actions
More options
More options
Directory actions
More options
More options
Latest commit
History
History
History
main
Breadcrumbs
leetcode
/
solution
/
3100-3199
/
Copy path
Top
Folders and files
Name
Name
Last commit message
Last commit date
parent directory
..
3100.Water Bottles II
3100.Water Bottles II
3101.Count Alternating Subarrays
3101.Count Alternating Subarrays
3102.Minimize Manhattan Distances
3102.Minimize Manhattan Distances
3103.Find Trending Hashtags II
3103.Find Trending Hashtags II
3104.Find Longest Self-Contained Substring
3104.Find Longest Self-Contained Substring
3105.Longest Strictly Increasing or Strictly Decreasing Subarray
3105.Longest Strictly Increasing or Strictly Decreasing Subarray
3106.Lexicographically Smallest String After Operations With Constraint
3106.Lexicographically Smallest String After Operations With Constraint
3107.Minimum Operations to Make Median of Array Equal to K
3107.Minimum Operations to Make Median of Array Equal to K
3108.Minimum Cost Walk in Weighted Graph
3108.Minimum Cost Walk in Weighted Graph
3109.Find the Index of Permutation
3109.Find the Index of Permutation
3110.Score of a String
3110.Score of a String
3111.Minimum Rectangles to Cover Points
3111.Minimum Rectangles to Cover Points
3112.Minimum Time to Visit Disappearing Nodes
3112.Minimum Time to Visit Disappearing Nodes
3113.Find the Number of Subarrays Where Boundary Elements Are Maximum
3113.Find the Number of Subarrays Where Boundary Elements Are Maximum
3114.Latest Time You Can Obtain After Replacing Characters
3114.Latest Time You Can Obtain After Replacing Characters
3115.Maximum Prime Difference
3115.Maximum Prime Difference
3116.Kth Smallest Amount With Single Denomination Combination
3116.Kth Smallest Amount With Single Denomination Combination
3117.Minimum Sum of Values by Dividing Array
3117.Minimum Sum of Values by Dividing Array
3118.Friday Purchase III
3118.Friday Purchase III
3119.Maximum Number of Potholes That Can Be Fixed
3119.Maximum Number of Potholes That Can Be Fixed
3120.Count the Number of Special Characters I
3120.Count the Number of Special Characters I
3121.Count the Number of Special Characters II
3121.Count the Number of Special Characters II
3122.Minimum Number of Operations to Satisfy Conditions
3122.Minimum Number of Operations to Satisfy Conditions
3123.Find Edges in Shortest Paths
3123.Find Edges in Shortest Paths
3124.Find Longest Calls
3124.Find Longest Calls
3125.Maximum Number That Makes Result of Bitwise AND Zero
3125.Maximum Number That Makes Result of Bitwise AND Zero
3126.Server Utilization Time
3126.Server Utilization Time
3127.Make a Square with the Same Color
3127.Make a Square with the Same Color
3128.Right Triangles
3128.Right Triangles
3129.Find All Possible Stable Binary Arrays I
3129.Find All Possible Stable Binary Arrays I
3130.Find All Possible Stable Binary Arrays II
3130.Find All Possible Stable Binary Arrays II
3131.Find the Integer Added to Array I
3131.Find the Integer Added to Array I
3132.Find the Integer Added to Array II
3132.Find the Integer Added to Array II
3133.Minimum Array End
3133.Minimum Array End
3134.Find the Median of the Uniqueness Array
3134.Find the Median of the Uniqueness Array
3135.Equalize Strings by Adding or Removing Characters at Ends
3135.Equalize Strings by Adding or Removing Characters at Ends
3136.Valid Word
3136.Valid Word
3137.Minimum Number of Operations to Make Word K-Periodic
3137.Minimum Number of Operations to Make Word K-Periodic
3138.Minimum Length of Anagram Concatenation
3138.Minimum Length of Anagram Concatenation
3139.Minimum Cost to Equalize Array
3139.Minimum Cost to Equalize Array
3140.Consecutive Available Seats II
3140.Consecutive Available Seats II
3141.Maximum Hamming Distances
3141.Maximum Hamming Distances
3142.Check if Grid Satisfies Conditions
3142.Check if Grid Satisfies Conditions
3143.Maximum Points Inside the Square
3143.Maximum Points Inside the Square
3144.Minimum Substring Partition of Equal Character Frequency
3144.Minimum Substring Partition of Equal Character Frequency
3145.Find Products of Elements of Big Array
3145.Find Products of Elements of Big Array
3146.Permutation Difference between Two Strings
3146.Permutation Difference between Two Strings
3147.Taking Maximum Energy From the Mystic Dungeon
3147.Taking Maximum Energy From the Mystic Dungeon
3148.Maximum Difference Score in a Grid
3148.Maximum Difference Score in a Grid
3149.Find the Minimum Cost Array Permutation
3149.Find the Minimum Cost Array Permutation
3150.Invalid Tweets II
3150.Invalid Tweets II
3151.Special Array I
3151.Special Array I
3152.Special Array II
3152.Special Array II
3153.Sum of Digit Differences of All Pairs
3153.Sum of Digit Differences of All Pairs
3154.Find Number of Ways to Reach the K-th Stair
3154.Find Number of Ways to Reach the K-th Stair
3155.Maximum Number of Upgradable Servers
3155.Maximum Number of Upgradable Servers
3156.Employee Task Duration and Concurrent Tasks
3156.Employee Task Duration and Concurrent Tasks
3157.Find the Level of Tree with Minimum Sum
3157.Find the Level of Tree with Minimum Sum
3158.Find the XOR of Numbers Which Appear Twice
3158.Find the XOR of Numbers Which Appear Twice
3159.Find Occurrences of an Element in an Array
3159.Find Occurrences of an Element in an Array
3160.Find the Number of Distinct Colors Among the Balls
3160.Find the Number of Distinct Colors Among the Balls
3161.Block Placement Queries
3161.Block Placement Queries
3162.Find the Number of Good Pairs I
3162.Find the Number of Good Pairs I
3163.String Compression III
3163.String Compression III
3164.Find the Number of Good Pairs II
3164.Find the Number of Good Pairs II
3165.Maximum Sum of Subsequence With Non-adjacent Elements
3165.Maximum Sum of Subsequence With Non-adjacent Elements
3166.Calculate Parking Fees and Duration
3166.Calculate Parking Fees and Duration
3167.Better Compression of String
3167.Better Compression of String
3168.Minimum Number of Chairs in a Waiting Room
3168.Minimum Number of Chairs in a Waiting Room
3169.Count Days Without Meetings
3169.Count Days Without Meetings
3170.Lexicographically Minimum String After Removing Stars
3170.Lexicographically Minimum String After Removing Stars
3171.Find Subarray With Bitwise OR Closest to K
3171.Find Subarray With Bitwise OR Closest to K
3172.Second Day Verification
3172.Second Day Verification
3173.Bitwise OR of Adjacent Elements
3173.Bitwise OR of Adjacent Elements
3174.Clear Digits
3174.Clear Digits
3175.Find The First Player to win K Games in a Row
3175.Find The First Player to win K Games in a Row
3176.Find the Maximum Length of a Good Subsequence I
3176.Find the Maximum Length of a Good Subsequence I
3177.Find the Maximum Length of a Good Subsequence II
3177.Find the Maximum Length of a Good Subsequence II
3178.Find the Child Who Has the Ball After K Seconds
3178.Find the Child Who Has the Ball After K Seconds
3179.Find the N-th Value After K Seconds
3179.Find the N-th Value After K Seconds
3180.Maximum Total Reward Using Operations I
3180.Maximum Total Reward Using Operations I
3181.Maximum Total Reward Using Operations II
3181.Maximum Total Reward Using Operations II
3182.Find Top Scoring Students
3182.Find Top Scoring Students
3183.The Number of Ways to Make the Sum
3183.The Number of Ways to Make the Sum
3184.Count Pairs That Form a Complete Day I
3184.Count Pairs That Form a Complete Day I
3185.Count Pairs That Form a Complete Day II
3185.Count Pairs That Form a Complete Day II
3186.Maximum Total Damage With Spell Casting
3186.Maximum Total Damage With Spell Casting
3187.Peaks in Array
3187.Peaks in Array
3188.Find Top Scoring Students II
3188.Find Top Scoring Students II
3189.Minimum Moves to Get a Peaceful Board
3189.Minimum Moves to Get a Peaceful Board
3190.Find Minimum Operations to Make All Elements Divisible by Three
3190.Find Minimum Operations to Make All Elements Divisible by Three
3191.Minimum Operations to Make Binary Array Elements Equal to One I
3191.Minimum Operations to Make Binary Array Elements Equal to One I
3192.Minimum Operations to Make Binary Array Elements Equal to One II
3192.Minimum Operations to Make Binary Array Elements Equal to One II
3193.Count the Number of Inversions
3193.Count the Number of Inversions
3194.Minimum Average of Smallest and Largest Elements
3194.Minimum Average of Smallest and Largest Elements
3195.Find the Minimum Area to Cover All Ones I
3195.Find the Minimum Area to Cover All Ones I
3196.Maximize Total Cost of Alternating Subarrays
3196.Maximize Total Cost of Alternating Subarrays
3197.Find the Minimum Area to Cover All Ones II
3197.Find the Minimum Area to Cover All Ones II
3198.Find Cities in Each State
3198.Find Cities in Each State
3199.Count Triplets with Even XOR Set Bits I
3199.Count Triplets with Even XOR Set Bits I
View all files
You can’t perform that action at this time.