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
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 }}
lxpzh
/
leetcode-solutions
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
master
Branches
Tags
Go to file
Code
Open more actions menu
Latest commit
History
11 Commits
11 Commits
Folders and files
Name
Name
Last commit message
Last commit date
1. Two Sum.cpp
1. Two Sum.cpp
100. Same Tree.cpp
100. Same Tree.cpp
101. Symmetric Tree.cpp
101. Symmetric Tree.cpp
102. Binary Tree Level Order Traversal.cpp
102. Binary Tree Level Order Traversal.cpp
103. Binary Tree Zigzag Level Order Traversal.cpp
103. Binary Tree Zigzag Level Order Traversal.cpp
104. Maximum Depth of Binary Tree.cpp
104. Maximum Depth of Binary Tree.cpp
105. Construct Binary Tree from Preorder and Inorder Traversal.cpp
105. Construct Binary Tree from Preorder and Inorder Traversal.cpp
106. Construct Binary Tree from Inorder and Postorder Traversal.cpp
106. Construct Binary Tree from Inorder and Postorder Traversal.cpp
107. Binary Tree Level Order Traversal II.cpp
107. Binary Tree Level Order Traversal II.cpp
108. Convert Sorted Array to Binary Search Tree.cpp
108. Convert Sorted Array to Binary Search Tree.cpp
109. Convert Sorted List to Binary Search Tree.cpp
109. Convert Sorted List to Binary Search Tree.cpp
110. Balanced Binary Tree.cpp
110. Balanced Binary Tree.cpp
111. Minimum Depth of Binary Tree.cpp
111. Minimum Depth of Binary Tree.cpp
112. Path Sum.cpp
112. Path Sum.cpp
113. Path Sum II.cpp
113. Path Sum II.cpp
114. Flatten Binary Tree to Linked List.cpp
114. Flatten Binary Tree to Linked List.cpp
116. Populating Next Right Pointers in Each Node.cpp
116. Populating Next Right Pointers in Each Node.cpp
117. Populating Next Right Pointers in Each Node II.cpp
117. Populating Next Right Pointers in Each Node II.cpp
124. Binary Tree Maximum Path Sum.cpp
124. Binary Tree Maximum Path Sum.cpp
129. Sum Root to Leaf Numbers.cpp
129. Sum Root to Leaf Numbers.cpp
133. Clone Graph.cpp
133. Clone Graph.cpp
136. Single Number.cpp
136. Single Number.cpp
137. Single Number II.cpp
137. Single Number II.cpp
138. Copy List with Random Pointer.cpp
138. Copy List with Random Pointer.cpp
14. Longest Common Prefix.cpp
14. Longest Common Prefix.cpp
141. Linked List Cycle.cpp
141. Linked List Cycle.cpp
142. Linked List Cycle II.cpp
142. Linked List Cycle II.cpp
144. Binary Tree Preorder Traversal.cpp
144. Binary Tree Preorder Traversal.cpp
145. Binary Tree Postorder Traversal.cpp
145. Binary Tree Postorder Traversal.cpp
147. Insertion Sort List.cpp
147. Insertion Sort List.cpp
148. Sort List.cpp
148. Sort List.cpp
15. 3 sum.cpp
15. 3 sum.cpp
150. Evaluate Reverse Polish Notation.cpp
150. Evaluate Reverse Polish Notation.cpp
155. Min Stack.cpp
155. Min Stack.cpp
167. Two Sum II - Input array is sorted.cpp
167. Two Sum II - Input array is sorted.cpp
169. Majority Element.cpp
169. Majority Element.cpp
173. Binary Search Tree Iterator.cpp
173. Binary Search Tree Iterator.cpp
19. Remove Nth Node From End of List.cpp
19. Remove Nth Node From End of List.cpp
199. Binary Tree Right Side View.cpp
199. Binary Tree Right Side View.cpp
2. Add Two Numbers.cpp
2. Add Two Numbers.cpp
20. Valid Parentheses.cpp
20. Valid Parentheses.cpp
202. Happy Number.cpp
202. Happy Number.cpp
204. Count Primes.cpp
204. Count Primes.cpp
205. Isomorphic Strings.cpp
205. Isomorphic Strings.cpp
208. Implement Trie (Prefix Tree).cpp
208. Implement Trie (Prefix Tree).cpp
21. Merge Two Sorted Lists.cpp
21. Merge Two Sorted Lists.cpp
211. Add and Search Word - Data structure design.cpp
211. Add and Search Word - Data structure design.cpp
215. Kth Largest Element in an Array.cpp
215. Kth Largest Element in an Array.cpp
217. Contains Duplicate.cpp
217. Contains Duplicate.cpp
219. Contains Duplicate II.cpp
219. Contains Duplicate II.cpp
222. Count Complete Tree Nodes.cpp
222. Count Complete Tree Nodes.cpp
225. Implement Stack using Queues.cpp
225. Implement Stack using Queues.cpp
226. Invert Binary Tree.cpp
226. Invert Binary Tree.cpp
23. Merge k Sorted Lists.cpp
23. Merge k Sorted Lists.cpp
230. Kth Smallest Element in a BST.cpp
230. Kth Smallest Element in a BST.cpp
231. Power of Two.cpp
231. Power of Two.cpp
232. Implement Queue using Stacks.cpp
232. Implement Queue using Stacks.cpp
235. Lowest Common Ancestor of a Binary Search Tree.cpp
235. Lowest Common Ancestor of a Binary Search Tree.cpp
236. Lowest Common Ancestor of a Binary Tree.cpp
236. Lowest Common Ancestor of a Binary Tree.cpp
237. Delete Node in a Linked List.cpp
237. Delete Node in a Linked List.cpp
24. Swap Nodes in Pairs.cpp
24. Swap Nodes in Pairs.cpp
242. Valid Anagram.cpp
242. Valid Anagram.cpp
257. Binary Tree Paths.cpp
257. Binary Tree Paths.cpp
258. Add Digits.cpp
258. Add Digits.cpp
26. Remove Duplicates from Sorted Array.cpp
26. Remove Duplicates from Sorted Array.cpp
260. Single Number III.cpp
260. Single Number III.cpp
263. Ugly Number.cpp
263. Ugly Number.cpp
264. Ugly Number II.cpp
264. Ugly Number II.cpp
27. Remove Element.cpp
27. Remove Element.cpp
279. Perfect Squares.cpp
279. Perfect Squares.cpp
283. Move Zeroes.cpp
283. Move Zeroes.cpp
287. Find the Duplicate Number.cpp
287. Find the Duplicate Number.cpp
290. Word Pattern.cpp
290. Word Pattern.cpp
295. Find Median from Data Stream.cpp
295. Find Median from Data Stream.cpp
297. Serialize and Deserialize Binary Tree.cpp
297. Serialize and Deserialize Binary Tree.cpp
303. Range Sum Query - Immutable.cpp
303. Range Sum Query - Immutable.cpp
31. Next Permutation.cpp
31. Next Permutation.cpp
310. Minimum Height Trees.cpp
310. Minimum Height Trees.cpp
326. Power of Three.cpp
326. Power of Three.cpp
34. Search for a Range.cpp
34. Search for a Range.cpp
342. Power of Four.cpp
342. Power of Four.cpp
344. Reverse String.cpp
344. Reverse String.cpp
347. Top K Frequent Elements.cpp
347. Top K Frequent Elements.cpp
349. Intersection of Two Arrays.cpp
349. Intersection of Two Arrays.cpp
35. Search Insert Position.cpp
35. Search Insert Position.cpp
350. Intersection of Two Arrays II.cpp
350. Intersection of Two Arrays II.cpp
371. Sum of Two Integers.cpp
371. Sum of Two Integers.cpp
380. Insert Delete GetRandom O(1).cpp
380. Insert Delete GetRandom O(1).cpp
381. Insert Delete GetRandom O(1) - Duplicates allowed.cpp
381. Insert Delete GetRandom O(1) - Duplicates allowed.cpp
384. Shuffle an Array.cpp
384. Shuffle an Array.cpp
387. First Unique Character in a String.cpp
387. First Unique Character in a String.cpp
389. Find the Difference.cpp
389. Find the Difference.cpp
394. Decode String.cpp
394. Decode String.cpp
404. Sum of Left Leaves.cpp
404. Sum of Left Leaves.cpp
409. Longest Palindrome.cpp
409. Longest Palindrome.cpp
414. Third Maximum Number.cpp
414. Third Maximum Number.cpp
415. Add Strings.cpp
415. Add Strings.cpp
437. Path Sum III.cpp
437. Path Sum III.cpp
438. Find All Anagrams in a String.cpp
438. Find All Anagrams in a String.cpp
442. Find All Duplicates in an Array.cpp
442. Find All Duplicates in an Array.cpp
View all files
Repository files navigation
README
More
items
leetcode-solutions
About
Algorithm
Resources
Readme
Activity
Stars
0
stars
Watchers
1
watching
Forks
0
forks
Report repository
Releases
Packages
Contributors
Languages
You can’t perform that action at this time.