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 }}
aghersidev
/
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
main
Branches
Tags
Go to file
Code
Open more actions menu
Folders and files
Name
Name
Last commit message
Last commit date
Latest commit
History
99 Commits
99 Commits
1-two-sum.cpp
1-two-sum.cpp
1009-pancake-sorting.cpp
1009-pancake-sorting.cpp
101-symmetric-tree.cpp
101-symmetric-tree.cpp
1014-k-closest-points-to-origin.cpp
1014-k-closest-points-to-origin.cpp
1039-find-the-town-judge.cpp
1039-find-the-town-judge.cpp
112-path-sum.cpp
112-path-sum.cpp
1138-grumpy-bookstore-owner.cpp
1138-grumpy-bookstore-owner.cpp
1156-occurrences-after-bigram.cpp
1156-occurrences-after-bigram.cpp
119-pascals-triangle-ii.cpp
119-pascals-triangle-ii.cpp
121-best-time-to-buy-and-sell-stock.cpp
121-best-time-to-buy-and-sell-stock.cpp
122-best-time-to-buy-and-sell-stock-ii.cpp
122-best-time-to-buy-and-sell-stock-ii.cpp
1231-replace-elements-with-greatest-element-on-right-side.cpp
1231-replace-elements-with-greatest-element-on-right-side.cpp
1258-article-views-i.sql
1258-article-views-i.sql
1283-reformat-date.cpp
1283-reformat-date.cpp
13-roman-to-integer.cpp
13-roman-to-integer.cpp
1319-unique-number-of-occurrences.cpp
1319-unique-number-of-occurrences.cpp
136-single-number.cpp
136-single-number.cpp
1392-find-the-difference-of-two-arrays.cpp
1392-find-the-difference-of-two-arrays.cpp
144-binary-tree-preorder-traversal.cpp
144-binary-tree-preorder-traversal.cpp
1440-convert-integer-to-the-sum-of-two-no-zero-integers.cpp
1440-convert-integer-to-the-sum-of-two-no-zero-integers.cpp
145-binary-tree-postorder-traversal.cpp
145-binary-tree-postorder-traversal.cpp
148-sort-list.cpp
148-sort-list.cpp
15-3sum.cpp
15-3sum.cpp
150-evaluate-reverse-polish-notation.cpp
150-evaluate-reverse-polish-notation.cpp
151-reverse-words-in-a-string.cpp
151-reverse-words-in-a-string.cpp
1528-kids-with-the-greatest-number-of-candies.cpp
1528-kids-with-the-greatest-number-of-candies.cpp
1547-destination-city.cpp
1547-destination-city.cpp
1566-check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence.cpp
1566-check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence.cpp
1585-the-kth-factor-of-n.cpp
1585-the-kth-factor-of-n.cpp
160-intersection-of-two-linked-lists.cpp
160-intersection-of-two-linked-lists.cpp
1616-minimum-difference-between-largest-and-smallest-value-in-three-moves.cpp
1616-minimum-difference-between-largest-and-smallest-value-in-three-moves.cpp
1642-water-bottles.cpp
1642-water-bottles.cpp
1666-make-the-string-great.cpp
1666-make-the-string-great.cpp
1677-matrix-diagonal-sum.cpp
1677-matrix-diagonal-sum.cpp
169-majority-element.cpp
169-majority-element.cpp
1844-maximum-number-of-balls-in-a-box.cpp
1844-maximum-number-of-balls-in-a-box.cpp
1900-closest-dessert-cost.cpp
1900-closest-dessert-cost.cpp
1908-recyclable-and-low-fat-products.sql
1908-recyclable-and-low-fat-products.sql
1916-find-center-of-star-graph.cpp
1916-find-center-of-star-graph.cpp
1970-sorting-the-sentence.cpp
1970-sorting-the-sentence.cpp
20-valid-parentheses.cpp
20-valid-parentheses.cpp
200-number-of-islands.cpp
200-number-of-islands.cpp
2042-maximum-product-difference-between-two-pairs.cpp
2042-maximum-product-difference-between-two-pairs.cpp
2058-concatenation-of-array.cpp
2058-concatenation-of-array.cpp
2093-check-if-string-is-a-prefix-of-array.cpp
2093-check-if-string-is-a-prefix-of-array.cpp
210-course-schedule-ii.cpp
210-course-schedule-ii.cpp
2116-count-number-of-pairs-with-absolute-difference-k.cpp
2116-count-number-of-pairs-with-absolute-difference-k.cpp
2121-find-if-path-exists-in-graph.cpp
2121-find-if-path-exists-in-graph.cpp
2123-the-number-of-weak-characters-in-the-game.cpp
2123-the-number-of-weak-characters-in-the-game.cpp
2137-final-value-of-variable-after-performing-operations.cpp
2137-final-value-of-variable-after-performing-operations.cpp
2215-finding-3-digit-even-numbers.cpp
2215-finding-3-digit-even-numbers.cpp
2365-percentage-of-letter-in-string.cpp
2365-percentage-of-letter-in-string.cpp
2384-root-equals-sum-of-children.cpp
2384-root-equals-sum-of-children.cpp
2416-evaluate-boolean-binary-tree.cpp
2416-evaluate-boolean-binary-tree.cpp
242-valid-anagram.cpp
242-valid-anagram.cpp
2454-largest-local-values-in-a-matrix.cpp
2454-largest-local-values-in-a-matrix.cpp
2487-optimal-partition-of-string.cpp
2487-optimal-partition-of-string.cpp
2565-merge-operations-to-turn-array-into-a-palindrome.cpp
2565-merge-operations-to-turn-array-into-a-palindrome.cpp
2602-maximum-enemy-forts-that-can-be-captured.cpp
2602-maximum-enemy-forts-that-can-be-captured.cpp
2606-difference-between-ones-and-zeros-in-row-and-column.cpp
2606-difference-between-ones-and-zeros-in-row-and-column.cpp
2675-find-the-width-of-columns-of-a-grid.cpp
2675-find-the-width-of-columns-of-a-grid.cpp
2698-find-the-array-concatenation-value.cpp
2698-find-the-array-concatenation-value.cpp
2699-count-the-number-of-fair-pairs.cpp
2699-count-the-number-of-fair-pairs.cpp
2737-row-with-maximum-ones.cpp
2737-row-with-maximum-ones.cpp
283-move-zeroes.cpp
283-move-zeroes.cpp
2836-neither-minimum-nor-maximum.cpp
2836-neither-minimum-nor-maximum.cpp
2844-sum-of-squares-of-special-elements.cpp
2844-sum-of-squares-of-special-elements.cpp
2870-longest-alternating-subarray.cpp
2870-longest-alternating-subarray.cpp
2876-number-of-employees-who-met-the-target.cpp
2876-number-of-employees-who-met-the-target.cpp
2917-count-pairs-whose-sum-is-less-than-target.cpp
2917-count-pairs-whose-sum-is-less-than-target.cpp
3-longest-substring-without-repeating-characters.cpp
3-longest-substring-without-repeating-characters.cpp
300-longest-increasing-subsequence.cpp
300-longest-increasing-subsequence.cpp
3034-points-that-intersect-with-cars.cpp
3034-points-that-intersect-with-cars.cpp
304-range-sum-query-2d-immutable.cpp
304-range-sum-query-2d-immutable.cpp
31-next-permutation.cpp
31-next-permutation.cpp
319-bulb-switcher.cpp
319-bulb-switcher.cpp
3193-maximum-strong-pair-xor-i.cpp
3193-maximum-strong-pair-xor-i.cpp
338-counting-bits.cpp
338-counting-bits.cpp
39-combination-sum.cpp
39-combination-sum.cpp
40-combination-sum-ii.cpp
40-combination-sum-ii.cpp
42-trapping-rain-water.cpp
42-trapping-rain-water.cpp
437-path-sum-iii.cpp
437-path-sum-iii.cpp
53-maximum-subarray.cpp
53-maximum-subarray.cpp
557-reverse-words-in-a-string-iii.cpp
557-reverse-words-in-a-string-iii.cpp
563-binary-tree-tilt.cpp
563-binary-tree-tilt.cpp
584-find-customer-referee.sql
584-find-customer-referee.sql
595-big-countries.sql
595-big-countries.sql
671-second-minimum-node-in-a-binary-tree.cpp
671-second-minimum-node-in-a-binary-tree.cpp
725-split-linked-list-in-parts.cpp
725-split-linked-list-in-parts.cpp
747-min-cost-climbing-stairs.cpp
747-min-cost-climbing-stairs.cpp
775-n-ary-tree-preorder-traversal.cpp
775-n-ary-tree-preorder-traversal.cpp
776-n-ary-tree-postorder-traversal.cpp
776-n-ary-tree-postorder-traversal.cpp
783-search-in-a-binary-search-tree.cpp
783-search-in-a-binary-search-tree.cpp
830-largest-triangle-area.cpp
830-largest-triangle-area.cpp
868-push-dominoes.cpp
868-push-dominoes.cpp
898-transpose-matrix.cpp
898-transpose-matrix.cpp
904-leaf-similar-trees.cpp
904-leaf-similar-trees.cpp
974-reorder-data-in-log-files.cpp
974-reorder-data-in-log-files.cpp
975-range-sum-of-bst.cpp
975-range-sum-of-bst.cpp
View all files
About
Leetcode solutions
Activity
Stars
0
stars
Watchers
0
watching
Forks
0
forks
Report repository
Releases
Packages
Contributors
Languages
You can’t perform that action at this time.