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 }}
YifangSun
/
LeetCode
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
3
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
226 Commits
226 Commits
.gitattributes
.gitattributes
1. Two Sum
1. Two Sum
10. Regular Expression Matching
10. Regular Expression Matching
1003. Check If Word Is Valid After Substitutions
1003. Check If Word Is Valid After Substitutions
102. Binary Tree Level Order Traversal
102. Binary Tree Level Order Traversal
103. Binary Tree Zigzag Level Order Traversal
103. Binary Tree Zigzag Level Order Traversal
104. Maximum Depth of Binary Tree
104. Maximum Depth of Binary Tree
105. Construct Binary Tree from Preorder and Inorder Traversal
105. Construct Binary Tree from Preorder and Inorder Traversal
1051. Height Checker
1051. Height Checker
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
108. Convert Sorted Array to Binary Search Tree
108. Convert Sorted Array to Binary Search Tree
1089. Duplicate Zeros
1089. Duplicate Zeros
109. Convert Sorted List to Binary Search Tree
109. Convert Sorted List to Binary Search Tree
1091. Shortest Path in Binary Matrix
1091. Shortest Path in Binary Matrix
1093. Statistics from a Large Sample
1093. Statistics from a Large Sample
11. Container With Most Water
11. Container With Most Water
111. Minimum Depth of Binary Tree
111. Minimum Depth of Binary Tree
1114. Print in Order
1114. Print in Order
1115. Print FooBar Alternately
1115. Print FooBar Alternately
1116. Print Zero Even Odd
1116. Print Zero Even Odd
1117. Building H2O
1117. Building H2O
112. Path Sum
112. Path Sum
1129. Shortest Path with Alternating Colors
1129. Shortest Path with Alternating Colors
113. Path Sum II
113. Path Sum II
1144. Decrease Elements To Make Array Zigzag
1144. Decrease Elements To Make Array Zigzag
1162. As Far from Land as Possible
1162. As Far from Land as Possible
1175. Prime Arrangements
1175. Prime Arrangements
1176. Diet Plan Performance
1176. Diet Plan Performance
1195. Fizz Buzz Multithreaded
1195. Fizz Buzz Multithreaded
12. Integer to Roman
12. Integer to Roman
1200. Minimum Absolute Difference
1200. Minimum Absolute Difference
1201. Ugly Number III
1201. Ugly Number III
1206. Design Skiplist
1206. Design Skiplist
1207. Unique Number of Occurrences
1207. Unique Number of Occurrences
1208. Get Equal Substrings Within Budget
1208. Get Equal Substrings Within Budget
1209. Remove All Adjacent Duplicates in String II
1209. Remove All Adjacent Duplicates in String II
1221. Split a String in Balanced Strings
1221. Split a String in Balanced Strings
1222. Queens That Can Attack the King
1222. Queens That Can Attack the King
1224. Maximum Equal Frequency
1224. Maximum Equal Frequency
1226. The Dining Philosophers
1226. The Dining Philosophers
1228. Missing Number In Arithmetic Progression
1228. Missing Number In Arithmetic Progression
1232. Check If It Is a Straight Line
1232. Check If It Is a Straight Line
1233. Remove Sub-Folders from the Filesystem
1233. Remove Sub-Folders from the Filesystem
1234. Replace the Substring for Balanced String
1234. Replace the Substring for Balanced String
1235. Maximum Profit in Job Scheduling
1235. Maximum Profit in Job Scheduling
1237. Find Positive Integer Solution for a Given Equation
1237. Find Positive Integer Solution for a Given Equation
1238. Circular Permutation in Binary Representation
1238. Circular Permutation in Binary Representation
1239. Maximum Length of a Concatenated String with Unique Characters
1239. Maximum Length of a Concatenated String with Unique Characters
124. Binary Tree Maximum Path Sum
124. Binary Tree Maximum Path Sum
1243. Array Transformation
1243. Array Transformation
1244. Design A Leaderboard
1244. Design A Leaderboard
1247. Minimum Swaps to Make Strings Equal.java
1247. Minimum Swaps to Make Strings Equal.java
1248. Count Number of Nice Subarrays
1248. Count Number of Nice Subarrays
1250. Check If It Is a Good Array
1250. Check If It Is a Good Array
1252. Cells with Odd Values in a Matrix
1252. Cells with Odd Values in a Matrix
1253. Reconstruct a 2-Row Binary Matrix.java
1253. Reconstruct a 2-Row Binary Matrix.java
1254. Number of Closed Islands
1254. Number of Closed Islands
1255. Maximum Score Words Formed by Letters
1255. Maximum Score Words Formed by Letters
1256. Encode Number
1256. Encode Number
1257. Smallest Common Region
1257. Smallest Common Region
126. Word Ladder II
126. Word Ladder II
1260. Shift 2D Grid
1260. Shift 2D Grid
1261. Find Elements in a Contaminated Binary Tree
1261. Find Elements in a Contaminated Binary Tree
1266. Minimum Time Visiting All Points
1266. Minimum Time Visiting All Points
1267. Count Servers that Communicate
1267. Count Servers that Communicate
1268. Search Suggestions System
1268. Search Suggestions System
1268. Search Suggestions System.java
1268. Search Suggestions System.java
127. Word Ladder
127. Word Ladder
1273. Delete Tree Nodes
1273. Delete Tree Nodes
1275. Find Winner on a Tic Tac Toe Game
1275. Find Winner on a Tic Tac Toe Game
1276. Number of Burgers with No Waste of Ingredients
1276. Number of Burgers with No Waste of Ingredients
128. Longest Consecutive Sequence
128. Longest Consecutive Sequence
1281. Subtract the Product and Sum of Digits of an Integer
1281. Subtract the Product and Sum of Digits of an Integer
1282. Group the People Given the Group Size They Belong To
1282. Group the People Given the Group Size They Belong To
1283. Find the Smallest Divisor Given a Threshold
1283. Find the Smallest Divisor Given a Threshold
1284. Minimum Number of Flips to Convert Binary Matrix to Zero Matrix
1284. Minimum Number of Flips to Convert Binary Matrix to Zero Matrix
1287. Element Appearing More Than 25% In Sorted Array.java
1287. Element Appearing More Than 25% In Sorted Array.java
1288. Remove Covered Intervals
1288. Remove Covered Intervals
129. Sum Root to Leaf Numbers
129. Sum Root to Leaf Numbers
1290. Convert Binary Number in a Linked List to Integer
1290. Convert Binary Number in a Linked List to Integer
1291. Sequential Digits
1291. Sequential Digits
1296. Divide Array in Sets of K Consecutive Numbers
1296. Divide Array in Sets of K Consecutive Numbers
130. Surrounded Regions
130. Surrounded Regions
1305. All Elements in Two Binary Search Trees
1305. All Elements in Two Binary Search Trees
133. Clone Graph
133. Clone Graph
135. Candy
135. Candy
138. Copy List with Random Pointer
138. Copy List with Random Pointer
1381. Design a Stack With Increment Operation
1381. Design a Stack With Increment Operation
139. Word Break
139. Word Break
14. Longest Common Prefix
14. Longest Common Prefix
1408. String Matching in an Array
1408. String Matching in an Array
141. Linked List Cycle
141. Linked List Cycle
142. Linked List Cycle II
142. Linked List Cycle II
1436. Destination City
1436. Destination City
1437. Check If All 1's Are at Least Length K Places Away
1437. Check If All 1's Are at Least Length K Places Away
146. LRU Cache
146. LRU Cache
1476. Subrectangle Queries
1476. Subrectangle Queries
1477. Find Two Non-overlapping Sub-arrays Each With Target Sum
1477. Find Two Non-overlapping Sub-arrays Each With Target Sum
15. 3Sum
15. 3Sum
View all files
About
My solution code for problems on Leetcode.
Topics
leetcode
leetcode-cpp
Activity
Stars
3
stars
Watchers
0
watching
Forks
0
forks
Report repository
Releases
Packages
Used by
Contributors
Languages
You can’t perform that action at this time.