Skip to content
Navigation Menu
Toggle navigation
Sign in
Product
GitHub Copilot
Write better code with AI
GitHub Advanced Security
Find and fix vulnerabilities
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
Discussions
Collaborate outside of code
Code Search
Find more, search less
Explore
Why GitHub
All features
Documentation
GitHub Skills
Blog
Solutions
By company size
Enterprises
Small and medium teams
Startups
Nonprofits
By use case
DevSecOps
DevOps
CI/CD
View all use cases
By industry
Healthcare
Financial services
Manufacturing
Government
View all industries
View all solutions
Resources
Topics
AI
DevOps
Security
Software Development
View all
Explore
Learning Pathways
Events & Webinars
Ebooks & Whitepapers
Customer Stories
Partners
Executive Insights
Open Source
GitHub Sponsors
Fund open source developers
The ReadME Project
GitHub community articles
Repositories
Topics
Trending
Collections
Enterprise
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
Reseting 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 }}
zj972
/
leetcode
Public
Notifications
You must be signed in to change notification settings
Fork
2
Star
5
Code
Issues
0
Pull requests
0
Actions
Projects
0
Security
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security
Insights
Files
master
Breadcrumbs
leetcode
/
code
/
Copy path
Directory actions
More options
Directory actions
More options
Latest commit
History
History
master
Breadcrumbs
leetcode
/
code
/
Top
Folders and files
Name
Name
Last commit message
Last commit date
parent directory
..
001. Two Sum
001. Two Sum
002. Add Two Numbers
002. Add Two Numbers
003. Longest Substring Without Repeating Characters
003. Longest Substring Without Repeating Characters
004. Median of Two Sorted Arrays
004. Median of Two Sorted Arrays
005. Longest Palindromic Substring
005. Longest Palindromic Substring
006. ZigZag Conversion
006. ZigZag Conversion
007. Reverse Integer
007. Reverse Integer
008. String to Integer (atoi)
008. String to Integer (atoi)
009. Palindrome Number
009. Palindrome Number
010. Regular Expression Matching
010. Regular Expression Matching
011. Container With Most Water
011. Container With Most Water
012. Integer to Roman
012. Integer to Roman
013. Roman to Integer
013. Roman to Integer
014. Longest Common Prefix
014. Longest Common Prefix
015. 3Sum
015. 3Sum
016. 3Sum Closest
016. 3Sum Closest
017. Letter Combinations of a Phone Number
017. Letter Combinations of a Phone Number
018. 4Sum
018. 4Sum
019. Remove Nth Node From End of List
019. Remove Nth Node From End of List
020. Valid Parentheses
020. Valid Parentheses
021. Merge Two Sorted Lists
021. Merge Two Sorted Lists
022. Generate Parentheses
022. Generate Parentheses
023. Merge k Sorted Lists
023. Merge k Sorted Lists
024. Swap Nodes in Pairs
024. Swap Nodes in Pairs
025. Reverse Nodes in k-Group
025. Reverse Nodes in k-Group
026. Remove Duplicates from Sorted Array
026. Remove Duplicates from Sorted Array
027. Remove Element
027. Remove Element
028. Implement strStr()
028. Implement strStr()
029. Divide Two Integers
029. Divide Two Integers
030. Substring with Concatenation of All Words
030. Substring with Concatenation of All Words
031. Next Permutation
031. Next Permutation
032. Longest Valid Parentheses
032. Longest Valid Parentheses
033. Search in Rotated Sorted Array
033. Search in Rotated Sorted Array
034. Find First and Last Position of Element in Sorted Array
034. Find First and Last Position of Element in Sorted Array
035. Search Insert Position
035. Search Insert Position
036. Valid Sudoku
036. Valid Sudoku
037. Sudoku Solver
037. Sudoku Solver
038. Count and Say
038. Count and Say
039. Combination Sum
039. Combination Sum
040. Combination Sum II
040. Combination Sum II
041. First Missing Positive
041. First Missing Positive
042. Trapping Rain Water
042. Trapping Rain Water
043. Multiply Strings
043. Multiply Strings
044. Wildcard Matching
044. Wildcard Matching
045. Jump Game II
045. Jump Game II
046. Permutations
046. Permutations
047. Permutations II
047. Permutations II
048. Rotate Image
048. Rotate Image
049. Group Anagrams
049. Group Anagrams
050. Pow(x, n)
050. Pow(x, n)
051. N-Queens
051. N-Queens
055. Jump Game
055. Jump Game
058. Length of Last Word
058. Length of Last Word
062. Unique Paths
062. Unique Paths
066. Plus One
066. Plus One
067. Add Binary
067. Add Binary
070. Climbing Stairs
070. Climbing Stairs
083. Remove Duplicates from Sorted List
083. Remove Duplicates from Sorted List
088. Merge Sorted Array
088. Merge Sorted Array
094. Binary Tree Inorder Traversal
094. Binary Tree Inorder Traversal
096. Unique Binary Search Trees
096. Unique Binary Search Trees
100. Same Tree
100. Same Tree
101. Symmetric Tree
101. Symmetric Tree
102. Binary Tree Level Order Traversal
102. Binary Tree Level Order Traversal
104. Maximum Depth of Binary Tree
104. Maximum Depth of Binary Tree
107. Binary Tree Level Order Traversal II
107. Binary Tree Level Order Traversal II
110. Balanced Binary Tree
110. Balanced Binary Tree
111. Minimum Depth of Binary Tree
111. Minimum Depth of Binary Tree
112. Path Sum
112. Path Sum
118. Pascal's Triangle
118. Pascal's Triangle
119. Pascal's Triangle II
119. Pascal's Triangle II
121. Best Time to Buy and Sell Stock
121. Best Time to Buy and Sell Stock
122. Best Time to Buy and Sell Stock II
122. Best Time to Buy and Sell Stock II
125. Valid Palindrome
125. Valid Palindrome
136. Single Number
136. Single Number
137. Single Number II
137. Single Number II
141. Linked List Cycle
141. Linked List Cycle
144. Binary Tree Preorder Traversal
144. Binary Tree Preorder Traversal
145. Binary Tree Postorder Traversal
145. Binary Tree Postorder Traversal
155. Min Stack
155. Min Stack
160. Intersection of Two Linked Lists
160. Intersection of Two Linked Lists
165. Compare Version Numbers
165. Compare Version Numbers
168. Excel Sheet Column Title
168. Excel Sheet Column Title
169. Majority Element
169. Majority Element
171. Excel Sheet Column Number
171. Excel Sheet Column Number
172. Factorial Trailing Zeroes
172. Factorial Trailing Zeroes
189. Rotate Array
189. Rotate Array
190. Reverse Bits
190. Reverse Bits
191. Number of 1 Bits
191. Number of 1 Bits
198. House Robber
198. House Robber
202. Happy Number
202. Happy Number
203. Remove Linked List Elements
203. Remove Linked List Elements
204. Count Primes
204. Count Primes
205. Isomorphic Strings
205. Isomorphic Strings
206. Reverse Linked List
206. Reverse Linked List
217. Contains Duplicate
217. Contains Duplicate
219. Contains Duplicate II
219. Contains Duplicate II
223. Rectangle Area
223. Rectangle Area
225. Implement Stack using Queues
225. Implement Stack using Queues
226. Invert Binary Tree
226. Invert Binary Tree
View all files
You can’t perform that action at this time.