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
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 }}
hellcy
/
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
/
Algorithms
/
Copy path
Directory actions
More options
More options
Directory actions
More options
More options
Latest commit
History
History
History
master
Breadcrumbs
leetcode
/
Algorithms
/
Copy path
Top
Folders and files
Name
Name
Last commit message
Last commit date
parent directory
..
1. Two Sum.java
1. Two Sum.java
10. Regular Expression Matching.java
10. Regular Expression Matching.java
100. Same Tree.java
100. Same Tree.java
1002. Find Common Characters.java
1002. Find Common Characters.java
1003. Check If Word Is Valid After Substitutions.java
1003. Check If Word Is Valid After Substitutions.java
1004. Max Consecutive Ones III.java
1004. Max Consecutive Ones III.java
1005. Maximize Sum Of Array After K Negations.java
1005. Maximize Sum Of Array After K Negations.java
1006. Clumsy Factorial.java
1006. Clumsy Factorial.java
1008. Construct Binary Search Tree from Preorder Traversal.java
1008. Construct Binary Search Tree from Preorder Traversal.java
1009. Complement of Base 10 Integer.java
1009. Complement of Base 10 Integer.java
101. Symmetric Tree.java
101. Symmetric Tree.java
1010. Pairs of Songs With Total Durations Divisible by 60.java
1010. Pairs of Songs With Total Durations Divisible by 60.java
1011. Capacity To Ship Packages Within D Days.java
1011. Capacity To Ship Packages Within D Days.java
1013. Partition Array Into Three Parts With Equal Sum.java
1013. Partition Array Into Three Parts With Equal Sum.java
1014.best-sightseeing-pair.java
1014.best-sightseeing-pair.java
1016.binary-string-with-substrings-representing-1-to-n.java
1016.binary-string-with-substrings-representing-1-to-n.java
1018. Binary Prefix Divisible By 5.java
1018. Binary Prefix Divisible By 5.java
102. Binary Tree Level Order Traversal.java
102. Binary Tree Level Order Traversal.java
1020. Number of Enclaves.java
1020. Number of Enclaves.java
1021. Remove Outermost Parentheses.java
1021. Remove Outermost Parentheses.java
1023. Camelcase Matching.java
1023. Camelcase Matching.java
1024. Video Stitching.java
1024. Video Stitching.java
1025. Divisor Game.java
1025. Divisor Game.java
1026. Maximum Difference Between Node and Ancestor.java
1026. Maximum Difference Between Node and Ancestor.java
1027.longest-arithmetic-subsequence.java
1027.longest-arithmetic-subsequence.java
1029. Two City Scheduling.java
1029. Two City Scheduling.java
103. Binary Tree Zigzag Level Order Traversal.java
103. Binary Tree Zigzag Level Order Traversal.java
1030. Matrix Cells in Distance Order.java
1030. Matrix Cells in Distance Order.java
1033. Moving Stones Until Consecutive.java
1033. Moving Stones Until Consecutive.java
1037. Valid Boomerang.java
1037. Valid Boomerang.java
1038. Binary Search Tree to Greater Sum Tree.java
1038. Binary Search Tree to Greater Sum Tree.java
104. Maximum Depth of Binary Tree.java
104. Maximum Depth of Binary Tree.java
1041. Robot Bounded In Circle.java
1041. Robot Bounded In Circle.java
1042. Flower Planting With No Adjacent.java
1042. Flower Planting With No Adjacent.java
1043. Partition Array for Maximum Sum.java
1043. Partition Array for Maximum Sum.java
1046. Last Stone Weight.java
1046. Last Stone Weight.java
1047. Remove All Adjacent Duplicates In String.java
1047. Remove All Adjacent Duplicates In String.java
1048. Longest String Chain.java
1048. Longest String Chain.java
1051. Height Checker.java
1051. Height Checker.java
1052. Grumpy Bookstore Owner.java
1052. Grumpy Bookstore Owner.java
1053. Previous Permutation With One Swap.java
1053. Previous Permutation With One Swap.java
1054. Distant Barcodes.java
1054. Distant Barcodes.java
1056. Confusing Number.java
1056. Confusing Number.java
1060. Missing Element in Sorted Array.java
1060. Missing Element in Sorted Array.java
1061. Lexicographically Smallest Equivalent String.java
1061. Lexicographically Smallest Equivalent String.java
1064. Fixed Point.java
1064. Fixed Point.java
1065. Index Pairs of a String.java
1065. Index Pairs of a String.java
107. Binary Tree Level Order Traversal II.java
107. Binary Tree Level Order Traversal II.java
1079. Letter Tile Possibilities.java
1079. Letter Tile Possibilities.java
108. Convert Sorted Array to Binary Search Tree.java
108. Convert Sorted Array to Binary Search Tree.java
1085. Sum of Digits in the Minimum Number.java
1085. Sum of Digits in the Minimum Number.java
1086. High Five.java
1086. High Five.java
1087. Brace Expansion.java
1087. Brace Expansion.java
1089. Duplicate Zeros.java
1089. Duplicate Zeros.java
1090. Largest Values From Labels.java
1090. Largest Values From Labels.java
1094. Car Pooling.java
1094. Car Pooling.java
1099. Two Sum Less Than K.java
1099. Two Sum Less Than K.java
11. Container With Most Water.java
11. Container With Most Water.java
110. Balanced Binary Tree.java
110. Balanced Binary Tree.java
1100. Find K-Length Substrings With No Repeated Characters.java
1100. Find K-Length Substrings With No Repeated Characters.java
1101. The Earliest Moment When Everyone Become Friends.java
1101. The Earliest Moment When Everyone Become Friends.java
1103. Distribute Candies to People.java
1103. Distribute Candies to People.java
1104. Path In Zigzag Labelled Binary Tree.java
1104. Path In Zigzag Labelled Binary Tree.java
1108. Defanging an IP Address.java
1108. Defanging an IP Address.java
1109.corporate-flight-bookings.java
1109.corporate-flight-bookings.java
111. Minimum Depth of Binary Tree.java
111. Minimum Depth of Binary Tree.java
1110. Delete Nodes And Return Forest.java
1110. Delete Nodes And Return Forest.java
1111. Maximum Nesting Depth of Two Valid Parentheses Strings.java
1111. Maximum Nesting Depth of Two Valid Parentheses Strings.java
1118. Number of Days in a Month.java
1118. Number of Days in a Month.java
1119. Remove Vowels from a String.java
1119. Remove Vowels from a String.java
112. Path Sum.java
112. Path Sum.java
1120. Maximum Average Subtree.java
1120. Maximum Average Subtree.java
1122. Relative Sort Array.java
1122. Relative Sort Array.java
1123. Lowest Common Ancestor of Deepest Leaves.java
1123. Lowest Common Ancestor of Deepest Leaves.java
1128. Number of Equivalent Domino Pairs.java
1128. Number of Equivalent Domino Pairs.java
113. Path Sum II.java
113. Path Sum II.java
1130. Minimum Cost Tree From Leaf Values.java
1130. Minimum Cost Tree From Leaf Values.java
1133. Largest Unique Number.java
1133. Largest Unique Number.java
1134. Armstrong Number.java
1134. Armstrong Number.java
1135. Connecting Cities With Minimum Cost.java
1135. Connecting Cities With Minimum Cost.java
1137. N-th Tribonacci Number.java
1137. N-th Tribonacci Number.java
114. Flatten Binary Tree to Linked List.java
114. Flatten Binary Tree to Linked List.java
1143. Longest Common Subsequence.java
1143. Longest Common Subsequence.java
115. Distinct Subsequences.java
115. Distinct Subsequences.java
1150. Check If a Number Is Majority Element in a Sorted Array.java
1150. Check If a Number Is Majority Element in a Sorted Array.java
1154. Day of the Year.java
1154. Day of the Year.java
1155. Number of Dice Rolls With Target Sum.java
1155. Number of Dice Rolls With Target Sum.java
1156. Swap For Longest Repeated Character Substring.java
1156. Swap For Longest Repeated Character Substring.java
1160. Find Words That Can Be Formed by Characters.java
1160. Find Words That Can Be Formed by Characters.java
1161. Maximum Level Sum of a Binary Tree.java
1161. Maximum Level Sum of a Binary Tree.java
1162. As Far from Land as Possible.java
1162. As Far from Land as Possible.java
1165. Single-Row Keyboard.java
1165. Single-Row Keyboard.java
1170. Compare Strings by Frequency of the Smallest Character.java
1170. Compare Strings by Frequency of the Smallest Character.java
1171. Remove Zero Sum Consecutive Nodes from Linked List.java
1171. Remove Zero Sum Consecutive Nodes from Linked List.java
1175. Prime Arrangements.java
1175. Prime Arrangements.java
1176. Diet Plan Performance.java
1176. Diet Plan Performance.java
1177. Can Make Palindrome from Substring.java
1177. Can Make Palindrome from Substring.java
118. Pascal's Triangle.java
118. Pascal's Triangle.java
1185. Day of the Week.java
1185. Day of the Week.java
119. Pascal's Triangle II.java
119. Pascal's Triangle II.java
View all files
You can’t perform that action at this time.