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 }}
Akcps
/
leetcode-solutions
Public
Notifications
You must be signed in to change notification settings
Fork
5
Star
8
Code
Issues
0
Pull requests
0
Discussions
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
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
1,048 Commits
1,048 Commits
.idea
.idea
0001-two-sum
0001-two-sum
0019-remove-nth-node-from-end-of-list
0019-remove-nth-node-from-end-of-list
0020-valid-parentheses
0020-valid-parentheses
0021-merge-two-sorted-lists
0021-merge-two-sorted-lists
0023-merge-k-sorted-lists
0023-merge-k-sorted-lists
0033-search-in-rotated-sorted-array
0033-search-in-rotated-sorted-array
0035-search-insert-position
0035-search-insert-position
0045-jump-game-ii
0045-jump-game-ii
0049-group-anagrams
0049-group-anagrams
0053-maximum-subarray
0053-maximum-subarray
0058-length-of-last-word
0058-length-of-last-word
0067-add-binary
0067-add-binary
0070-climbing-stairs
0070-climbing-stairs
0091-decode-ways
0091-decode-ways
0098-validate-binary-search-tree
0098-validate-binary-search-tree
0100-same-tree
0100-same-tree
0101-symmetric-tree
0101-symmetric-tree
0102-binary-tree-level-order-traversal
0102-binary-tree-level-order-traversal
0103-binary-tree-zigzag-level-order-traversal
0103-binary-tree-zigzag-level-order-traversal
0104-maximum-depth-of-binary-tree
0104-maximum-depth-of-binary-tree
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0106-construct-binary-tree-from-inorder-and-postorder-traversal
0106-construct-binary-tree-from-inorder-and-postorder-traversal
0110-balanced-binary-tree
0110-balanced-binary-tree
0116-populating-next-right-pointers-in-each-node
0116-populating-next-right-pointers-in-each-node
0121-best-time-to-buy-and-sell-stock
0121-best-time-to-buy-and-sell-stock
0125-valid-palindrome
0125-valid-palindrome
0141-linked-list-cycle
0141-linked-list-cycle
0143-reorder-list
0143-reorder-list
0152-maximum-product-subarray
0152-maximum-product-subarray
0153-find-minimum-in-rotated-sorted-array
0153-find-minimum-in-rotated-sorted-array
0198-house-robber
0198-house-robber
0199-binary-tree-right-side-view
0199-binary-tree-right-side-view
0206-reverse-linked-list
0206-reverse-linked-list
0208-implement-trie-prefix-tree
0208-implement-trie-prefix-tree
0211-design-add-and-search-words-data-structure
0211-design-add-and-search-words-data-structure
0212-word-search-ii
0212-word-search-ii
0213-house-robber-ii
0213-house-robber-ii
0217-contains-duplicate
0217-contains-duplicate
0226-invert-binary-tree
0226-invert-binary-tree
0230-kth-smallest-element-in-a-bst
0230-kth-smallest-element-in-a-bst
0235-lowest-common-ancestor-of-a-binary-search-tree
0235-lowest-common-ancestor-of-a-binary-search-tree
0238-product-of-array-except-self
0238-product-of-array-except-self
0239-sliding-window-maximum
0239-sliding-window-maximum
0242-valid-anagram
0242-valid-anagram
0250-count-univalue-subtrees
0250-count-univalue-subtrees
0252-meeting-rooms
0252-meeting-rooms
0261-graph-valid-tree
0261-graph-valid-tree
0287-find-the-duplicate-number
0287-find-the-duplicate-number
0305-number-of-islands-ii
0305-number-of-islands-ii
0322-coin-change
0322-coin-change
0347-top-k-frequent-elements
0347-top-k-frequent-elements
0540-single-element-in-a-sorted-array
0540-single-element-in-a-sorted-array
0545-boundary-of-binary-tree
0545-boundary-of-binary-tree
0556-next-greater-element-iii
0556-next-greater-element-iii
0572-subtree-of-another-tree
0572-subtree-of-another-tree
0735-asteroid-collision
0735-asteroid-collision
0783-minimum-distance-between-bst-nodes
0783-minimum-distance-between-bst-nodes
0814-binary-tree-pruning
0814-binary-tree-pruning
0904-fruit-into-baskets
0904-fruit-into-baskets
0965-univalued-binary-tree
0965-univalued-binary-tree
0989-add-to-array-form-of-integer
0989-add-to-array-form-of-integer
1-two-sum
1-two-sum
1. Two Sum
1. Two Sum
10. Regular Expression Matching
10. Regular Expression Matching
100-same-tree
100-same-tree
1004. Max Consecutive Ones III
1004. Max Consecutive Ones III
1008. Construct Binary Search Tree From Preorder Traversal
1008. Construct Binary Search Tree From Preorder Traversal
1009. Complement of Base 10 Integer
1009. Complement of Base 10 Integer
101. Symmetric Tree
101. Symmetric Tree
1011-capacity-to-ship-packages-within-d-days
1011-capacity-to-ship-packages-within-d-days
102-binary-tree-level-order-traversal
102-binary-tree-level-order-traversal
102. Binary Tree Level Order Traversal
102. Binary Tree Level Order Traversal
1021. Remove Outermost Parentheses
1021. Remove Outermost Parentheses
1025. Divisor Game
1025. Divisor Game
1027. Longest Arithmetic Sequence
1027. Longest Arithmetic Sequence
103. Binary Tree Zigzag Level Order Traversal
103. Binary Tree Zigzag Level Order Traversal
1038. Binary Search Tree To Greater Sum Tree
1038. Binary Search Tree To Greater Sum Tree
1046-last-stone-weight
1046-last-stone-weight
1046. Last Stone Weight
1046. Last Stone Weight
1047. Remove All Adjacent Duplicates In String
1047. Remove All Adjacent Duplicates In String
1048. Longest String Chain
1048. Longest String Chain
1057. Campus Bikes
1057. Campus Bikes
1059. All Paths from Source Lead to Destination
1059. All Paths from Source Lead to Destination
106. Construct Binary Tree from Inorder and Postorder Traversal
106. Construct Binary Tree from Inorder and Postorder Traversal
1060. Missing Element in Sorted Array
1060. Missing Element in Sorted Array
1079. Letter Tile Possibilities
1079. Letter Tile Possibilities
108. Convert Sorted Array to Binary Search Tree
108. Convert Sorted Array to Binary Search Tree
1081. Smallest Subsequence of Distinct Characters
1081. Smallest Subsequence of Distinct Characters
1090. Largest Values From Labels
1090. Largest Values From Labels
11-container-with-most-water
11-container-with-most-water
11. Container With Most Water
11. Container With Most Water
1102. Path With Maximum Minimum Value
1102. Path With Maximum Minimum Value
1110. Delete Nodes And Return Forest
1110. Delete Nodes And Return Forest
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
1120. Maximum Average Subtree
1120. Maximum Average Subtree
1129-shortest-path-with-alternating-colors
1129-shortest-path-with-alternating-colors
View all files
Repository files navigation
README
More
items
leetcode-solutions
Solutions to Leetcode problems
About
Solutions to Leetcode problems
leetcode.com/
Topics
algorithm-challenges
algorithms
algorithms-and-data-structures
binary-search-tree
binary-tree
divide-and-conquer
dynamic-programming
graph
leetcode
leetcode-java
leetcode-practice
leetcode-solutions
multithreading
recursion-problem
Resources
Readme
Activity
Stars
8
stars
Watchers
4
watching
Forks
5
forks
Report repository
Contributors
Languages
You can’t perform that action at this time.