Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects, and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Developer articles
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Small and medium teams
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
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 }}
firefantasy
leetcode_rust
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
master
Breadcrumbs
leetcode_rust
/
cpp
/
Copy path
Directory actions
More options
More options
Directory actions
More options
More options
Latest commit
History
History
History
master
Breadcrumbs
leetcode_rust
/
cpp
/
Copy path
Top
Folders and files
Name
Name
Last commit message
Last commit date
parent directory
..
datastructures
datastructures
04.06. Successor.cpp
04.06. Successor.cpp
100. Same Tree.cpp
100. Same Tree.cpp
1008. Construct Binary Search Tree from Preorder Traversal.cpp
1008. Construct Binary Search Tree from Preorder Traversal.cpp
1010. Pairs of Songs With Total Durations Divisible by 60.cpp
1010. Pairs of Songs With Total Durations Divisible by 60.cpp
1015. Smallest Integer Divisible by K.cpp
1015. Smallest Integer Divisible by K.cpp
1026. Maximum Difference Between Node and Ancestor.cpp
1026. Maximum Difference Between Node and Ancestor.cpp
1029. Two City Scheduling.cpp
1029. Two City Scheduling.cpp
103. Binary Tree Zigzag Level Order Traversal.cpp
103. Binary Tree Zigzag Level Order Traversal.cpp
1035. Uncrossed Lines.cpp
1035. Uncrossed Lines.cpp
104. Maximum Depth of Binary Tree.cpp
104. Maximum Depth of Binary Tree.cpp
1044. Longest Duplicate Substring.cpp
1044. Longest Duplicate Substring.cpp
105.cpp
105.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
1114. Print in Order.cpp
1114. Print in Order.cpp
1115. Print FooBar Alternately.cpp
1115. Print FooBar Alternately.cpp
1116. Print Zero Even Odd.cpp
1116. Print Zero Even Odd.cpp
1117. Building H2O.cpp
1117. Building H2O.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
119. Pascals Triangle II.cpp
119. Pascals Triangle II.cpp
1195. Fizz Buzz Multithreaded.cpp
1195. Fizz Buzz Multithreaded.cpp
12. Integer to Roman.c
12. Integer to Roman.c
121. Best Time to Buy and Sell Stock.cpp
121. Best Time to Buy and Sell Stock.cpp
1217. Minimum Cost to Move Chips to The Same Position.cpp
1217. Minimum Cost to Move Chips to The Same Position.cpp
122. Best Time to Buy and Sell Stock II.cpp
122. Best Time to Buy and Sell Stock II.cpp
1226. The Dining Philosophers.cpp
1226. The Dining Philosophers.cpp
123. Best Time to Buy and Sell Stock III.cpp
123. Best Time to Buy and Sell Stock III.cpp
125. Valid Palindrome.cpp
125. Valid Palindrome.cpp
1277. Count Square Submatrices with All Ones.cpp
1277. Count Square Submatrices with All Ones.cpp
1283. Find the Smallest Divisor Given a Threshold.cpp
1283. Find the Smallest Divisor Given a Threshold.cpp
1286. Iterator for Combination.cpp
1286. Iterator for Combination.cpp
129. Sum Root to Leaf Numbers.cpp
129. Sum Root to Leaf Numbers.cpp
130. Surrounded Regions.cpp
130. Surrounded Regions.cpp
1306. Jump Game III.cpp
1306. Jump Game III.cpp
131. Palindrome Partitioning.cpp
131. Palindrome Partitioning.cpp
133. Clone Graph.cpp
133. Clone Graph.cpp
1344. Angle Between Hands of a Clock.cpp
1344. Angle Between Hands of a Clock.cpp
136. Single Number.cpp
136. Single Number.cpp
1379. Find a Corresponding Node of a Binary Tree in a Clone of That Tree.cpp
1379. Find a Corresponding Node of a Binary Tree in a Clone of That Tree.cpp
138. Copy List with Random Pointer.cpp
138. Copy List with Random Pointer.cpp
140. Word Break II.cpp
140. Word Break II.cpp
141. Linked List Cycle.cpp
141. Linked List Cycle.cpp
142. Linked List Cycle II.cpp
142. Linked List Cycle II.cpp
143. Reorder List.cpp
143. Reorder List.cpp
1446. Consecutive Characters.cpp
1446. Consecutive Characters.cpp
1492. The kth Factor of n.cpp
1492. The kth Factor of n.cpp
15. 3sum.cpp
15. 3sum.cpp
151. Reverse Words in a String.cpp
151. Reverse Words in a String.cpp
154. Find Minimum in Rotated Sorted Array II.cpp
154. Find Minimum in Rotated Sorted Array II.cpp
160. Intersection of Two Linked Lists.cpp
160. Intersection of Two Linked Lists.cpp
171. Excel Sheet Column Number.cpp
171. Excel Sheet Column Number.cpp
173. Binary Search Tree Iterator.cpp
173. Binary Search Tree Iterator.cpp
174. Dungeon Game.cpp
174. Dungeon Game.cpp
18. 4sum.cpp
18. 4sum.cpp
188. Best Time to Buy and Sell Stock IV.cpp
188. Best Time to Buy and Sell Stock IV.cpp
190. Reverse Bits.cpp
190. Reverse Bits.cpp
203. Remove Linked List Elements.cpp
203. Remove Linked List Elements.cpp
2069. Walking Robot Simulation II.cpp
2069. Walking Robot Simulation II.cpp
207. Course Schedule.cpp
207. Course Schedule.cpp
210. Course Schedule II.cpp
210. Course Schedule II.cpp
211. Add and Search Word - Data structure design.cpp
211. Add and Search Word - Data structure design.cpp
212. Word Search II.cpp
212. Word Search II.cpp
218. The Skyline Problem.cpp
218. The Skyline Problem.cpp
22. Generate Parentheses.cpp
22. Generate Parentheses.cpp
222. Count Complete Tree Nodes.cpp
222. Count Complete Tree Nodes.cpp
226. Invert Binary Tree.cpp
226. Invert Binary Tree.cpp
227. Basic Calculator II.cpp
227. Basic Calculator II.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 Solution.cpp
231. Power of Two Solution.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
25. Reverse Nodes in k-Group.cpp
25. Reverse Nodes in k-Group.cpp
258. Add Digits.cpp
258. Add Digits.cpp
260. Single Number III.cpp
260. Single Number III.cpp
264. Ugly Number II.cpp
264. Ugly Number II.cpp
274. H-Index.cpp
274. H-Index.cpp
275. H-Index II.cpp
275. H-Index II.cpp
279. Perfect Squares.cpp
279. Perfect Squares.cpp
284. Peeking Iterator.cpp
284. Peeking Iterator.cpp
29. Divide Two Integers.c
29. Divide Two Integers.c
30. Substring with Concatenation of All Words.cpp
30. Substring with Concatenation of All Words.cpp
309. Best Time to Buy and Sell Stock with Cooldown.cpp
309. Best Time to Buy and Sell Stock with Cooldown.cpp
31. Next Permutation.cpp
31. Next Permutation.cpp
312. Burst Balloons.cpp
312. Burst Balloons.cpp
32. Longest Valid Parentheses.cpp
32. Longest Valid Parentheses.cpp
328. Odd Even Linked List.cpp
328. Odd Even Linked List.cpp
332. Reconstruct Itinerary.cpp
332. Reconstruct Itinerary.cpp
337. House Robber III.cpp
337. House Robber III.cpp
338. Counting Bits.cpp
338. Counting Bits.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
367. Valid Perfect Square.cpp
367. Valid Perfect Square.cpp
368. Largest Divisible Subset.cpp
368. Largest Divisible Subset.cpp
37. Sudoku Solver.cpp
37. Sudoku Solver.cpp
380. Insert Delete GetRandom O(1).cpp
380. Insert Delete GetRandom O(1).cpp
382. Linked List Random Node.cpp
382. Linked List Random Node.cpp
View all files
You can’t perform that action at this time.