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 }}
UdaySharmaGitHub
/
LeetCode-Problems
Public
Notifications
You must be signed in to change notification settings
Fork
1
Star
5
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
Files
Expand file tree
main
Breadcrumbs
LeetCode-Problems
/
Medium Problems
/
Copy path
Directory actions
More options
More options
Directory actions
More options
More options
Latest commit
History
History
History
main
Breadcrumbs
LeetCode-Problems
/
Medium Problems
/
Copy path
Top
Folders and files
Name
Name
Last commit message
Last commit date
parent directory
..
1007_Minimum_Domino_Rotations_For_Equal_Row.cpp
1007_Minimum_Domino_Rotations_For_Equal_Row.cpp
1008_Construct_Binary_Search_Tree_from_Preorder_Traversal.cpp
1008_Construct_Binary_Search_Tree_from_Preorder_Traversal.cpp
102_Binary_Tree_Level_Order_Traversal.cpp
102_Binary_Tree_Level_Order_Traversal.cpp
1038_Binary_Search_Tree_to_Greater_Sum_Tree.cpp
1038_Binary_Search_Tree_to_Greater_Sum_Tree.cpp
103_Binary_Tree_Zigzag_Level_Order_Traversal.cpp
103_Binary_Tree_Zigzag_Level_Order_Traversal.cpp
1052_Grumpy_Bookstore_Owner.cpp
1052_Grumpy_Bookstore_Owner.cpp
105_Construct_Binary_Tree_from_Preorder_and_Inorder_Traversal.cpp
105_Construct_Binary_Tree_from_Preorder_and_Inorder_Traversal.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
1081_Smallest_Subsequence_of_Distinct_Characters.cpp
1081_Smallest_Subsequence_of_Distinct_Characters.cpp
1105_Filling_Bookcase_Shelves.cpp
1105_Filling_Bookcase_Shelves.cpp
1110_Delete_Nodes_And_Return_Forest.cpp
1110_Delete_Nodes_And_Return_Forest.cpp
113_Path_Sum_II.cpp
113_Path_Sum_II.cpp
1140_Stone_Game_II.cpp
1140_Stone_Game_II.cpp
1190_Reverse_Substrings_Between_Each_Pair_of_Parentheses.cpp
1190_Reverse_Substrings_Between_Each_Pair_of_Parentheses.cpp
1208_Get_Equal_Substrings_Within_Budget.cpp
1208_Get_Equal_Substrings_Within_Budget.cpp
1233_Remove_Sub_Folders_from_the_Filesystem.cpp
1233_Remove_Sub_Folders_from_the_Filesystem.cpp
1248_Count_Number_of_Nice_Subarrays.cpp
1248_Count_Number_of_Nice_Subarrays.cpp
1249_Minimum_Remove_to_Make_Valid_Parentheses.cpp
1249_Minimum_Remove_to_Make_Valid_Parentheses.cpp
1288_Remove_Covered_Intervals.cpp
1288_Remove_Covered_Intervals.cpp
1291_Sequential_Digits.cpp
1291_Sequential_Digits.cpp
1296_Divide_Array_in_Sets_of_K_Consecutive_Numbers.cpp
1296_Divide_Array_in_Sets_of_K_Consecutive_Numbers.cpp
129_Sum_Root_to_Leaf_Numbers.cpp
129_Sum_Root_to_Leaf_Numbers.cpp
1306_Jump_Game_III.cpp
1306_Jump_Game_III.cpp
1310_XOR_Queries_of_a_Subarray.cpp
1310_XOR_Queries_of_a_Subarray.cpp
1325_Delete_Leaves_With a_Given_Value.cpp
1325_Delete_Leaves_With a_Given_Value.cpp
1334_Find_the_City_With_the_Smallest_Number_of_Neighbors_at_a_Threshold_Distance.cpp
1334_Find_the_City_With_the_Smallest_Number_of_Neighbors_at_a_Threshold_Distance.cpp
1347_Minimum_Number_of_Steps_to_Make_Two_Strings_Anagram.cpp
1347_Minimum_Number_of_Steps_to_Make_Two_Strings_Anagram.cpp
1367_Linked_List _in_Binary_Tree.cpp
1367_Linked_List _in_Binary_Tree.cpp
1371_Find_the_Longest_Substring_Containing_Vowels_in_Even_Counts.cpp
1371_Find_the_Longest_Substring_Containing_Vowels_in_Even_Counts.cpp
137_Single_Number_II.cpp
137_Single_Number_II.cpp
1382_Balance_a_Binary_Search_Tree.cpp
1382_Balance_a_Binary_Search_Tree.cpp
1391_Check_if_There_is_a_Valid_Path_in_a_Grid.cpp
1391_Check_if_There_is_a_Valid_Path_in_a_Grid.cpp
1395_Count_Number_of_Teams.cpp
1395_Count_Number_of_Teams.cpp
142_Linked_List_Cycle_II(Return Node Where the Loops starts).cpp
142_Linked_List_Cycle_II(Return Node Where the Loops starts).cpp
1438_Longest_Continuous_Subarray_With_Absolute_Diff_Less_Than_or_Equal_to_Limit.cpp
1438_Longest_Continuous_Subarray_With_Absolute_Diff_Less_Than_or_Equal_to_Limit.cpp
147_Insertion_Sort_List.cpp
147_Insertion_Sort_List.cpp
1482_Minimum_Number_of_Days_to_Make_m_Bouquets.cpp
1482_Minimum_Number_of_Days_to_Make_m_Bouquets.cpp
148_Sort_List.cpp
148_Sort_List.cpp
1498_Number_of_Subsequences_That_Satisfy_the_Given_Sum_Condition.cpp
1498_Number_of_Subsequences_That_Satisfy_the_Given_Sum_Condition.cpp
1508_Range_Sum_of_Sorted_Subarray_Sums.cpp
1508_Range_Sum_of_Sorted_Subarray_Sums.cpp
1509_Minimum_Difference_Between_Largest_and_Smallest_Value_in_Three_Moves.cpp
1509_Minimum_Difference_Between_Largest_and_Smallest_Value_in_Three_Moves.cpp
1514_Path_with_Maximum_Probability.cpp
1514_Path_with_Maximum_Probability.cpp
1530_Number_of_Good_Leaf_Nodes_Pairs.cpp
1530_Number_of_Good_Leaf_Nodes_Pairs.cpp
153_Find_Minimum_in_Rotated_Sorted_Array.cpp
153_Find_Minimum_in_Rotated_Sorted_Array.cpp
1552_Magnetic_Force_Between_Two_Balls.cpp
1552_Magnetic_Force_Between_Two_Balls.cpp
1559_Detect_Cycles_in_2D_Grid.cpp
1559_Detect_Cycles_in_2D_Grid.cpp
1605_Find_Valid_Matrix_Given_Row_and_Column_Sums.cpp
1605_Find_Valid_Matrix_Given_Row_and_Column_Sums.cpp
162_Find_Peak_Element.cpp
162_Find_Peak_Element.cpp
164_Maximum_Gap.cpp
164_Maximum_Gap.cpp
1657_Determine_if_Two_Strings_Are_Close.cpp
1657_Determine_if_Two_Strings_Are_Close.cpp
165_Compare_Version_Numbers.cpp
165_Compare_Version_Numbers.cpp
1674_Minimum_Moves_to_Make_Array_Complementary.cpp
1674_Minimum_Moves_to_Make_Array_Complementary.cpp
1679_Max_Number_of_K_Sum_Pairs.cpp
1679_Max_Number_of_K_Sum_Pairs.cpp
167_Two_Sum_2_Input_Array_Is_Sorted.cpp
167_Two_Sum_2_Input_Array_Is_Sorted.cpp
1685_Sum_of_Absolute_Differences_in_a_Sorted_Array.cpp
1685_Sum_of_Absolute_Differences_in_a_Sorted_Array.cpp
1695_Maximum_Erasure_Value.cpp
1695_Maximum_Erasure_Value.cpp
16_3Sum_Closet.cpp
16_3Sum_Closet.cpp
1701_Average_Waiting_Time.cpp
1701_Average_Waiting_Time.cpp
1717_Maximum_Score_From_Removing_Substrings.cpp
1717_Maximum_Score_From_Removing_Substrings.cpp
172_Factorail_tailing_zero.cpp
172_Factorail_tailing_zero.cpp
179_Largest_Number.cpp
179_Largest_Number.cpp
1823_Find_the_Winner_of_the_Circular_Game.cpp
1823_Find_the_Winner_of_the_Circular_Game.cpp
1861_Rotating_the_Box.cpp
1861_Rotating_the_Box.cpp
1871_Jump_Game_VII.cpp
1871_Jump_Game_VII.cpp
1905_Count_Sub_Islands.cpp
1905_Count_Sub_Islands.cpp
1910_Remove_All_Occurrences_of_a_Substring.cpp
1910_Remove_All_Occurrences_of_a_Substring.cpp
1914_Cyclically_Rotating_a_Grid.cpp
1914_Cyclically_Rotating_a_Grid.cpp
1937_Maximum_Number_of_Points_with_Cost.cpp
1937_Maximum_Number_of_Points_with_Cost.cpp
1948_Delete_Duplicate_Folders_in_System.cpp
1948_Delete_Duplicate_Folders_in_System.cpp
199_Binary_Tree_Right_Side_View.cpp
199_Binary_Tree_Right_Side_View.cpp
19_Remove_Nth_Node_From_End_of_List.cpp
19_Remove_Nth_Node_From_End_of_List.cpp
201_Bitwise_AND_of_Numbers_Range.cpp
201_Bitwise_AND_of_Numbers_Range.cpp
2028_Find_Missing_Observations.cpp
2028_Find_Missing_Observations.cpp
2029_Stone_Game_IX.cpp
2029_Stone_Game_IX.cpp
2033_Minimum_Operations_to_Make_a_Uni_Value_Grid.cpp
2033_Minimum_Operations_to_Make_a_Uni_Value_Grid.cpp
2044_Count_Number_of_Maximum_Bitwise_OR_Subsets.cpp
2044_Count_Number_of_Maximum_Bitwise_OR_Subsets.cpp
204_Count_Primes.cpp
204_Count_Primes.cpp
2058_Find_the_Minimum_and_Maximum_Number_of_Nodes_Between_Critical_Points.cpp
2058_Find_the_Minimum_and_Maximum_Number_of_Nodes_Between_Critical_Points.cpp
2096_Step_By_Step_Directions_From_a_Binary_Tree_Node_to_Another.cpp
2096_Step_By_Step_Directions_From_a_Binary_Tree_Node_to_Another.cpp
2125_Number_of_Laser_Beams_in_a_Bank.cpp
2125_Number_of_Laser_Beams_in_a_Bank.cpp
2126_Destroying_Asteroids.cpp
2126_Destroying_Asteroids.cpp
2134_Minimum_Swaps_to_Group_All_1s_Together_II.cpp
2134_Minimum_Swaps_to_Group_All_1s_Together_II.cpp
215_Kth_Largest_Element_in_an_Array.cpp
215_Kth_Largest_Element_in_an_Array.cpp
2181_Merge_Nodes_in_Between_Zeros.cpp
2181_Merge_Nodes_in_Between_Zeros.cpp
2192_All_Ancestors_of_a_Node_in_a_Directed_Acyclic_Graph.cpp
2192_All_Ancestors_of_a_Node_in_a_Directed_Acyclic_Graph.cpp
2196_Create_Binary_Tree_From_Descriptions.cpp
2196_Create_Binary_Tree_From_Descriptions.cpp
219_Contains_Duplicate_II.cpp
219_Contains_Duplicate_II.cpp
2285_Maximum_Total_Importance_of_Roads.cpp
2285_Maximum_Total_Importance_of_Roads.cpp
229_Majority_Element_II.cpp
229_Majority_Element_II.cpp
230_Kth_Smallest_Element_in_a_BST.cpp
230_Kth_Smallest_Element_in_a_BST.cpp
2326_Spiral_Matrix_IV.cpp
2326_Spiral_Matrix_IV.cpp
2348_Number_of_Zero_Filled_Subarrays.cpp
2348_Number_of_Zero_Filled_Subarrays.cpp
235_Lowest_Common_Ancestor_of_a_Binary_Search_Tree.cpp
235_Lowest_Common_Ancestor_of_a_Binary_Search_Tree.cpp
236_Lowest_Common_Ancestor_of_a_Binary_Tree.cpp
236_Lowest_Common_Ancestor_of_a_Binary_Tree.cpp
237_Delete_Node_in_a_Linked_List.cpp
237_Delete_Node_in_a_Linked_List.cpp
238_Product_of_Array_Except_Self.cpp
238_Product_of_Array_Except_Self.cpp
2390_Removing_Stars_From_a_String.cpp
2390_Removing_Stars_From_a_String.cpp
2402_Meeting_Rooms_III.cpp
2402_Meeting_Rooms_III.cpp
240_Search_a_2D_Matrix_II.cpp
240_Search_a_2D_Matrix_II.cpp
View all files
You can’t perform that action at this time.