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 }}
daocrossover
/
Leetcode-Cpp
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
2
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
master
Branches
Tags
Go to file
Code
Open more actions menu
Folders and files
Name
Name
Last commit message
Last commit date
Latest commit
History
249 Commits
249 Commits
.vscode
.vscode
1. Two Sum
1. Two Sum
100. Same Tree
100. Same Tree
1008. Construct Binary Search Tree from Preorder Traversal
1008. Construct Binary Search Tree from Preorder Traversal
101. Symmetric Tree
101. Symmetric Tree
1010. Pairs of Songs With Total Durations Divisible by 60
1010. Pairs of Songs With Total Durations Divisible by 60
1012. Numbers With Repeated Digits
1012. Numbers With Repeated Digits
1013. Partition Array Into Three Parts With Equal Sum
1013. Partition Array Into Three Parts With Equal Sum
1017. Convert to Base -2
1017. Convert to Base -2
102. Binary Tree Level Order Traversal
102. Binary Tree Level Order Traversal
1022. Sum of Root To Leaf Binary Numbers
1022. Sum of Root To Leaf Binary Numbers
1029. Two City Scheduling
1029. Two City Scheduling
103. Binary Tree Zigzag Level Order Traversal
103. Binary Tree Zigzag Level Order Traversal
1032. Stream of Characters
1032. Stream of Characters
1035. Uncrossed Lines
1035. Uncrossed Lines
104. Maximum Depth of Binary Tree
104. Maximum Depth of Binary Tree
1041. Robot Bounded In Circle
1041. Robot Bounded In Circle
1043. Partition Array for Maximum Sum
1043. Partition Array for Maximum Sum
1044. Longest Duplicate Substring
1044. Longest Duplicate Substring
1046. Last Stone Weight
1046. Last Stone Weight
1048. Longest String Chain
1048. Longest String Chain
105. Construct Binary Tree from Preorder and Inorder Traversal
105. Construct Binary Tree from Preorder and Inorder Traversal
1051. Height Checker
1051. Height Checker
1053. Previous Permutation With One Swap
1053. Previous Permutation With One Swap
106. Construct Binary Tree from Inorder and Postorder Traversal
106. Construct Binary Tree from Inorder and Postorder Traversal
107. Binary Tree Level Order Traversal II
107. Binary Tree Level Order Traversal II
1073. Adding Two Negabinary Numbers
1073. Adding Two Negabinary Numbers
108. Convert Sorted Array to Binary Search Tree
108. Convert Sorted Array to Binary Search Tree
1086. High Five
1086. High Five
109. Convert Sorted List to Binary Search Tree
109. Convert Sorted List to Binary Search Tree
1094. Car Pooling
1094. Car Pooling
11. Container With Most Water
11. Container With Most Water
110. Balanced Binary Tree
110. Balanced Binary Tree
1103. Distribute Candies to People
1103. Distribute Candies to People
111. Minimum Depth of Binary Tree
111. Minimum Depth of Binary Tree
112. Path Sum
112. Path Sum
113. Path Sum II
113. Path Sum II
114. Flatten Binary Tree to Linked List
114. Flatten Binary Tree to Linked List
1143. Longest Common Subsequence
1143. Longest Common Subsequence
1145. Binary Tree Coloring Game
1145. Binary Tree Coloring Game
1147. Longest Chunked Palindrome Decomposition
1147. Longest Chunked Palindrome Decomposition
115. Distinct Subsequences
115. Distinct Subsequences
116. Populating Next Right Pointers in Each Node
116. Populating Next Right Pointers in Each Node
117. Populating Next Right Pointers in Each Node II
117. Populating Next Right Pointers in Each Node II
1177. Can Make Palindrome from Substring
1177. Can Make Palindrome from Substring
118. Pascal's Triangle
118. Pascal's Triangle
119. Pascal's Triangle II
119. Pascal's Triangle II
12. Integer to Roman
12. Integer to Roman
120. Triangle
120. Triangle
1208. Get Equal Substrings Within Budget
1208. Get Equal Substrings Within Budget
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
1223. Dice Roll Simulation
1223. Dice Roll Simulation
123. Best Time to Buy and Sell Stock III
123. Best Time to Buy and Sell Stock III
1232. Check If It Is a Straight Line
1232. Check If It Is a Straight Line
124. Binary Tree Maximum Path Sum
124. Binary Tree Maximum Path Sum
125. Valid Palindrome
125. Valid Palindrome
126. Word Ladder II
126. Word Ladder II
127. Word Ladder
127. Word Ladder
1277. Count Square Submatrices with All Ones
1277. Count Square Submatrices with All Ones
128. Longest Consecutive Sequence
128. Longest Consecutive Sequence
1286. Iterator for Combination
1286. Iterator for Combination
129. Sum Root to Leaf Numbers
129. Sum Root to Leaf Numbers
1291. Sequential Digits
1291. Sequential Digits
13. Roman to Integer
13. Roman to Integer
130. Surrounded Regions
130. Surrounded Regions
1305. All Elements in Two Binary Search Trees
1305. All Elements in Two Binary Search Trees
131. Palindrome Partitioning
131. Palindrome Partitioning
1319. Number of Operations to Make Network Connected
1319. Number of Operations to Make Network Connected
132. Palindrome Partitioning II
132. Palindrome Partitioning II
1328. Break a Palindrome
1328. Break a Palindrome
133. Clone Graph
133. Clone Graph
1338. Reduce Array Size to The Half
1338. Reduce Array Size to The Half
134. Gas Station
134. Gas Station
1344. Angle Between Hands of a Clock
1344. Angle Between Hands of a Clock
135. Candy
135. Candy
1352. Product of the Last K Numbers
1352. Product of the Last K Numbers
1353. Maximum Number of Events That Can Be Attended
1353. Maximum Number of Events That Can Be Attended
136. Single Number
136. Single Number
137. Single Number II
137. Single Number II
1370. Increasing Decreasing String
1370. Increasing Decreasing String
138. Copy List with Random Pointer
138. Copy List with Random Pointer
139. Word Break
139. Word Break
14. Longest Common Prefix
14. Longest Common Prefix
140. Word Break II
140. Word Break II
1400. Construct K Palindrome Strings
1400. Construct K Palindrome Strings
1404. Number of Steps to Reduce a Number in Binary Representation to One
1404. Number of Steps to Reduce a Number in Binary Representation to One
141. Linked List Cycle
141. Linked List Cycle
1411. Number of Ways to Paint N × 3 Grid
1411. Number of Ways to Paint N × 3 Grid
142. Linked List Cycle II
142. Linked List Cycle II
143. Reorder List
143. Reorder List
1439. Find the Kth Smallest Sum of a Matrix With Sorted Rows
1439. Find the Kth Smallest Sum of a Matrix With Sorted Rows
146. LRU Cache
146. LRU Cache
1464. Maximum Product of Two Elements in an Array
1464. Maximum Product of Two Elements in an Array
15. 3Sum
15. 3Sum
1503. Last Moment Before All Ants Fall Out of a Plank
1503. Last Moment Before All Ants Fall Out of a Plank
151. Reverse Words in a String
151. Reverse Words in a String
1514. Path with Maximum Probability
1514. Path with Maximum Probability
152. Maximum Product Subarray
152. Maximum Product Subarray
153. Find Minimum in Rotated Sorted Array
153. Find Minimum in Rotated Sorted Array
View all files
Repository files navigation
README
More
items
Leetcode
record for leetcode
About
Leetcode Solutions in C++
Topics
leetcode
Resources
Readme
Activity
Stars
2
stars
Watchers
0
watching
Forks
0
forks
Report repository
Releases
Packages
Contributors
Languages
You can’t perform that action at this time.