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 }}
Ayushluthra2001
/
LeetCodePOTD
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
main
Branches
Tags
Go to file
Code
Open more actions menu
Latest commit
History
754 Commits
754 Commits
Folders and files
Name
Name
Last commit message
Last commit date
(Brute force approach) Remove Nth Node From End of List.cpp
(Brute force approach) Remove Nth Node From End of List.cpp
(O(1) space) Remove Nth Node From End of List.cpp
(O(1) space) Remove Nth Node From End of List.cpp
04-11-2025 Minimum Time to Make Rope Colorful.cpp
04-11-2025 Minimum Time to Make Rope Colorful.cpp
1-11-2025 Delete Nodes From Linked List Present in Array.cpp
1-11-2025 Delete Nodes From Linked List Present in Array.cpp
1-4-25 Solving Questions With Brainpower(TLE).cpp
1-4-25 Solving Questions With Brainpower(TLE).cpp
1-4-25 Solving Questions With Brainpower.cpp
1-4-25 Solving Questions With Brainpower.cpp
10-12-22.cpp
10-12-22.cpp
100. Same Tree.cpp
100. Same Tree.cpp
100166. Check if Bitwise OR Has Trailing Zeros.cpp
100166. Check if Bitwise OR Has Trailing Zeros.cpp
1171. Remove Zero Sum Consecutive Nodes from Linked List.cpp
1171. Remove Zero Sum Consecutive Nodes from Linked List.cpp
12-8-24-Kth Largest Element in a Stream.cpp
12-8-24-Kth Largest Element in a Stream.cpp
1207 Rank Transform of an Array.cpp
1207 Rank Transform of an Array.cpp
143. Reorder List.cpp
143. Reorder List.cpp
15-4-23 Sum Root to Leaf Numbers.cpp
15-4-23 Sum Root to Leaf Numbers.cpp
1514. Path with Maximum Probability.cpp
1514. Path with Maximum Probability.cpp
1544. Make The String Great(No use of reverse function).cpp
1544. Make The String Great(No use of reverse function).cpp
1544. Make The String Great.cpp
1544. Make The String Great.cpp
16-4-24 Add One Row to Tree.cpp
16-4-24 Add One Row to Tree.cpp
1609. Even Odd Tree.cpp
1609. Even Odd Tree.cpp
19. Remove Nth Node From End of List.cpp
19. Remove Nth Node From End of List.cpp
198. House Robber(TLE).cpp
198. House Robber(TLE).cpp
198. House Robber.cpp
198. House Robber.cpp
1Climbing Stairs.cpp
1Climbing Stairs.cpp
1Continuous Subarray Sum.cpp
1Continuous Subarray Sum.cpp
1Determine if String Halves Are Alike.cpp
1Determine if String Halves Are Alike.cpp
1Determine if Two Strings Are Close.cpp
1Determine if Two Strings Are Close.cpp
1Evaluate Reverse Polish Notation.cpp
1Evaluate Reverse Polish Notation.cpp
1Find Players With Zero or One Losses.cpp
1Find Players With Zero or One Losses.cpp
1Implement Queue using Stacks.cpp
1Implement Queue using Stacks.cpp
1Minimum Number of Arrows to Burst Balloons.cpp
1Minimum Number of Arrows to Burst Balloons.cpp
2 Keys Keyboard.cpp
2 Keys Keyboard.cpp
2-11-25 Count Unguarded Cells in the Grid.cpp
2-11-25 Count Unguarded Cells in the Grid.cpp
20-8-24 Stone Game II.cpp
20-8-24 Stone Game II.cpp
201. Bitwise AND of Numbers Range.cpp
201. Bitwise AND of Numbers Range.cpp
21-4-24 Find if Path Exists in Graph.cpp
21-4-24 Find if Path Exists in Graph.cpp
2285. Maximum Total Importance of Roads.cpp
2285. Maximum Total Importance of Roads.cpp
231. Power of Two.cpp
231. Power of Two.cpp
2326. Spiral Matrix IV.cpp
2326. Spiral Matrix IV.cpp
2485. Find the Pivot Integer.cpp
2485. Find the Pivot Integer.cpp
2487. Remove Nodes From Linked List.cpp
2487. Remove Nodes From Linked List.cpp
25-12-24-Find Largest Value in Each Tree Row.cpp
25-12-24-Find Largest Value in Each Tree Row.cpp
2540. Minimum Common Value.cpp
2540. Minimum Common Value.cpp
26-11-24 Find Champion II.cpp
26-11-24 Find Champion II.cpp
2616. Minimize the Maximum Difference of Pairs.cpp
2616. Minimize the Maximum Difference of Pairs.cpp
268. Missing Number.cpp
268. Missing Number.cpp
279. Perfect Squares.cpp
279. Perfect Squares.cpp
28-4-24Sum of Distances in Tree.cpp
28-4-24Sum of Distances in Tree.cpp
287. Find the Duplicate Number(constant Space).cpp
287. Find the Duplicate Number(constant Space).cpp
287. Find the Duplicate Number.cpp
287. Find the Duplicate Number.cpp
3005. Count Elements With Maximum Frequency.cpp
3005. Count Elements With Maximum Frequency.cpp
3069. Distribute Elements Into Two Arrays I.cpp
3069. Distribute Elements Into Two Arrays I.cpp
3075. Maximize Happiness of Selected Children.cpp
3075. Maximize Happiness of Selected Children.cpp
31-3-24Count Subarrays With Fixed Bounds.cpp
31-3-24Count Subarrays With Fixed Bounds.cpp
31-3-Buy Stock with Transaction Fee.cpp
31-3-Buy Stock with Transaction Fee.cpp
349. Intersection of Two Arrays.cpp
349. Intersection of Two Arrays.cpp
3Sum Closest.cpp
3Sum Closest.cpp
4-5-25 Number of Equivalent Domino Pairs.cpp
4-5-25 Number of Equivalent Domino Pairs.cpp
41. First Missing Positive.cpp
41. First Missing Positive.cpp
442. Find All Duplicates in an Array(O N space).cpp
442. Find All Duplicates in an Array(O N space).cpp
463. Island Perimeter.cpp
463. Island Perimeter.cpp
49. Group Anagrams.cpp
49. Group Anagrams.cpp
5-5-23Delete Node in a Linked List.cpp
5-5-23Delete Node in a Linked List.cpp
513. Find Bottom Left Tree Value.cpp
513. Find Bottom Left Tree Value.cpp
543. Diameter of Binary Tree.cpp
543. Diameter of Binary Tree.cpp
57. Insert Interval.cpp
57. Insert Interval.cpp
844. Backspace String Compare.cpp
844. Backspace String Compare.cpp
876. Middle of the Linked List.cpp
876. Middle of the Linked List.cpp
881. Boats to Save People.cpp
881. Boats to Save People.cpp
993. Cousins in Binary Tree.cpp
993. Cousins in Binary Tree.cpp
Add Binary(14-2-23).cpp
Add Binary(14-2-23).cpp
Add Digits(26-4-23).cpp
Add Digits(26-4-23).cpp
Add One Row to Tree.cpp
Add One Row to Tree.cpp
Add to Array-Form of Integer(15-2-23).cpp
Add to Array-Form of Integer(15-2-23).cpp
All Ancestors of a Node in a Directed Acyclic Graph.cpp
All Ancestors of a Node in a Directed Acyclic Graph.cpp
All Paths From Source to Target.cpp
All Paths From Source to Target.cpp
Amount of Time for Binary Tree to Be Infected.cpp
Amount of Time for Binary Tree to Be Infected.cpp
Append Characters to String to Make Subsequence.cpp
Append Characters to String to Make Subsequence.cpp
Arithmetic Slices II - Subsequence.cpp
Arithmetic Slices II - Subsequence.cpp
As Far from Land as Possible(TLE).cpp
As Far from Land as Possible(TLE).cpp
As Far from Land as Possible.cpp
As Far from Land as Possible.cpp
Average Salary Excluding the Minimum and Maximum Salary.cpp
Average Salary Excluding the Minimum and Maximum Salary.cpp
Average Waiting Time.cpp
Average Waiting Time.cpp
Balance a Binary Search Tree.cpp
Balance a Binary Search Tree.cpp
Best Sightseeing Pair.cpp
Best Sightseeing Pair.cpp
Best Team With No Conflicts(DP).cpp
Best Team With No Conflicts(DP).cpp
Best Team With No Conflicts.cpp
Best Team With No Conflicts.cpp
Best Time to Buy and Sell Stock with Cooldown.cpp
Best Time to Buy and Sell Stock with Cooldown.cpp
Best Time to Buy and Sell Stock(Greedy).cpp
Best Time to Buy and Sell Stock(Greedy).cpp
Binary Prefix Divisible By 5.cpp
Binary Prefix Divisible By 5.cpp
Binary Search Tree to Greater Sum Tree.cpp
Binary Search Tree to Greater Sum Tree.cpp
Binary Search.cpp
Binary Search.cpp
Binary Subarrays With Sum.cpp
Binary Subarrays With Sum.cpp
Binary Tree Level Order Traversal II.cpp
Binary Tree Level Order Traversal II.cpp
Binary Tree Maximum Path Sum.cpp
Binary Tree Maximum Path Sum.cpp
Binary Tree Postorder Traversal.cpp
Binary Tree Postorder Traversal.cpp
Binary Tree Preorder Traversal.cpp
Binary Tree Preorder Traversal.cpp
Binary Tree Zigzag Level Order Traversal.cpp
Binary Tree Zigzag Level Order Traversal.cpp
Boats to Save People.cpp
Boats to Save People.cpp
Break a Palindrome.cpp
Break a Palindrome.cpp
Build a Matrix With Conditions.cpp
Build a Matrix With Conditions.cpp
View all files
Repository files navigation
README
More
items
LeetCodePOTD
Problem of the day of LeetCode
About
Problem of the day of LeetCode
Topics
cpp
data-structures-and-algorithms
leetcode
leetcode-problems-solutions
problem-of-the-day-solutions
Resources
Readme
Activity
Stars
3
stars
Watchers
1
watching
Forks
0
forks
Report repository
Releases
Packages
Contributors
Languages
You can’t perform that action at this time.