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 }}
272006Sakshi
Data_Structure_and_Algorithms.cpp
Repository navigation
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
More
items
Data_Structure_and_Algorithms.cpp
Public
Notifications
You must be signed in to change notification settings
Fork
0
(
0
)
Star
1
(
1
)
You must be signed in to star a repository
About
LeetCode Data Structures and Algorithms problem solutions implemented in C++.
Activity
Stars
1
star
Watchers
1
watching
Forks
0
forks
Report repository
main
Branches
Tags
Go to file
Code
Open more actions menu
Latest commit
History
406 Commits
406 Commits
Folders and files
Name
Name
Last commit message
Last commit date
Dynamic Programming
Dynamic Programming
Graph
Graph
1018._Binary_Prefix_Divisible_By_5
1018._Binary_Prefix_Divisible_By_5
1022. Sum of Root To Leaf Binary Numbers.cpp
1022. Sum of Root To Leaf Binary Numbers.cpp
103. Binary Tree Zigzag Level Order Traversal.cpp
103. Binary Tree Zigzag Level Order Traversal.cpp
107. Binary Tree Level Order Traversal II.cpp
107. Binary Tree Level Order Traversal II.cpp
1091. Shortest Path in Binary Matrix.cpp
1091. Shortest Path in Binary Matrix.cpp
1137. N-th Tribonacci Number
1137. N-th Tribonacci Number
1161. Maximum Level Sum of a Binary Tree.cpp
1161. Maximum Level Sum of a Binary Tree.cpp
1189. Maximum Number of Balloons.cpp
1189. Maximum Number of Balloons.cpp
11_Container_with_Most_Water.cpp
11_Container_with_Most_Water.cpp
1200. Minimum Absolute Difference.cpp
1200. Minimum Absolute Difference.cpp
121. Best Time to Buy and Sell Stock
121. Best Time to Buy and Sell Stock
125_Valid_Palindrome.cpp
125_Valid_Palindrome.cpp
1323_Maximum_69_Number.cpp
1323_Maximum_69_Number.cpp
1356. Sort Integers by The Number of 1 Bits.cpp
1356. Sort Integers by The Number of 1 Bits.cpp
1404. Number of Steps to Reduce a Number in Binary Representation to One.cpp
1404. Number of Steps to Reduce a Number in Binary Representation to One.cpp
1437._Check_If_All_1's0_Are_at_Least_Length_K_Places_Away
1437._Check_If_All_1's0_Are_at_Least_Length_K_Places_Away
1461. Check If a String Contains All Binary Codes of Size K.cpp
1461. Check If a String Contains All Binary Codes of Size K.cpp
151. Reverse Words in a String
151. Reverse Words in a String
152._Maximum_Product_Subarray
152._Maximum_Product_Subarray
1523. Count Odd Numbers in an Interval Range
1523. Count Odd Numbers in an Interval Range
1578._Minimum_Time_to_Make_Rope_Colorful
1578._Minimum_Time_to_Make_Rope_Colorful
15_3Sum.cpp
15_3Sum.cpp
162_find_peak_element.cpp
162_find_peak_element.cpp
164._Maximum_Gap.cpp
164._Maximum_Gap.cpp
167_Two_sumII_Input_Array_is_Sorted.cpp
167_Two_sumII_Input_Array_is_Sorted.cpp
1732. Find the Highest Altitude.cpp
1732. Find the Highest Altitude.cpp
1748. Sum of Unique Elements
1748. Sum of Unique Elements
1749. Maximum Absolute Sum of Any Subarray
1749. Maximum Absolute Sum of Any Subarray
1752. Check if Array Is Sorted and Rotated.cpp
1752. Check if Array Is Sorted and Rotated.cpp
1784. Check if Binary String Has at Most One Segment of Ones.cpp
1784. Check if Binary String Has at Most One Segment of Ones.cpp
1833. Maximum Ice Cream Bars.cpp
1833. Maximum Ice Cream Bars.cpp
1846_Maximum_element_after_decreasing_and_rearranging.cpp
1846_Maximum_element_after_decreasing_and_rearranging.cpp
1855. Maximum Distance Between a Pair of Values.cpp
1855. Maximum Distance Between a Pair of Values.cpp
1877. Minimize Maximum Pair Sum in Array.cpp
1877. Minimize Maximum Pair Sum in Array.cpp
189. Rotate Array
189. Rotate Array
1925. Count Square Sum Triples
1925. Count Square Sum Triples
198._House_Robber
198._House_Robber
1984. Minimum Difference Between Highest and Lowest of K Scores.cpp
1984. Minimum Difference Between Highest and Lowest of K Scores.cpp
1991_Find_the_middle_index_in_Array.cpp
1991_Find_the_middle_index_in_Array.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
205_isomorphic_strings.cpp
205_isomorphic_strings.cpp
209_Minimum_Size_Subarray_Sum.cpp
209_Minimum_Size_Subarray_Sum.cpp
20_Valid_Parentheses.cpp
20_Valid_Parentheses.cpp
2148. Count Elements With Strictly Smaller and Greater Elements.cpp
2148. Count Elements With Strictly Smaller and Greater Elements.cpp
2154._Keep_Multiplying_Found_Values_by_Two
2154._Keep_Multiplying_Found_Values_by_Two
2169._Count_Operations_to_Obtain_Zero
2169._Count_Operations_to_Obtain_Zero
217_Contains_Duplicate II.cpp
217_Contains_Duplicate II.cpp
217_Contains_Duplicate.cpp
217_Contains_Duplicate.cpp
2215._Find_the_Difference_of_Two_Arrays
2215._Find_the_Difference_of_Two_Arrays
2273._Find_Resultant_Array_After_Removing_Anagrams.cpp
2273._Find_Resultant_Array_After_Removing_Anagrams.cpp
2293._Min_Max_Game
2293._Min_Max_Game
231_Power_of_Two.cpp
231_Power_of_Two.cpp
2348_Number_of_Zero_filled_subarrays.cpp
2348_Number_of_Zero_filled_subarrays.cpp
2357._Make_Array_Zero_by_Subtracting_Equal_Amounts.cpp
2357._Make_Array_Zero_by_Subtracting_Equal_Amounts.cpp
240. Search a 2D Matrix II.cpp
240. Search a 2D Matrix II.cpp
242._Valid_anagram.cpp
242._Valid_anagram.cpp
2438_Range_Product_queriesofPowers.cpp
2438_Range_Product_queriesofPowers.cpp
2442. Count Number of Distinct Integers After Reverse Operations.cpp
2442. Count Number of Distinct Integers After Reverse Operations.cpp
2460._Apply_Operations_to_an_Array
2460._Apply_Operations_to_an_Array
2485_Find_Pivot_Index.cpp
2485_Find_Pivot_Index.cpp
2515. Shortest Distance to Target String in a Circular Array.cpp
2515. Shortest Distance to Target String in a Circular Array.cpp
2574_Left_and_Right_sum_DIfference.cpp
2574_Left_and_Right_sum_DIfference.cpp
2799. Count Complete Subarrays in an Array.cpp
2799. Count Complete Subarrays in an Array.cpp
283._Move_Zeroes
283._Move_Zeroes
2913. Subarrays Distinct Element Sum of Squares I.cpp
2913. Subarrays Distinct Element Sum of Squares I.cpp
2946. Matrix Similarity After Cyclic Shifts.cpp
2946. Matrix Similarity After Cyclic Shifts.cpp
2958. Length of Longest Subarray With at Most K Frequency.cpp
2958. Length of Longest Subarray With at Most K Frequency.cpp
2996. Smallest Missing Integer Greater Than Sequential Prefix Sum.cpp
2996. Smallest Missing Integer Greater Than Sequential Prefix Sum.cpp
3000_Maximum_area_of_longest_diagonal_Rectangle.cpp
3000_Maximum_area_of_longest_diagonal_Rectangle.cpp
3005._Count_Elements_With_Maximum_Frequency.cpp
3005._Count_Elements_With_Maximum_Frequency.cpp
3010. Divide an Array Into Subarrays With Minimum Cost I.cpp
3010. Divide an Array Into Subarrays With Minimum Cost I.cpp
303. Range Sum Query - Immutable
303. Range Sum Query - Immutable
3043. Find the Length of the Longest Common Prefix.cpp
3043. Find the Length of the Longest Common Prefix.cpp
3289_The_Two_Sneaky_Numbers_of_Digitville
3289_The_Two_Sneaky_Numbers_of_Digitville
3314. Construct the Minimum Bitwise Array I.cpp
3314. Construct the Minimum Bitwise Array I.cpp
3315. Construct the Minimum Bitwise Array II.cpp
3315. Construct the Minimum Bitwise Array II.cpp
3370_Smallest_Number_With_All_Set_Bits
3370_Smallest_Number_With_All_Set_Bits
3432. Count Partitions with Even Sum Difference
3432. Count Partitions with Even Sum Difference
35._Search_Insert_Position
35._Search_Insert_Position
3512. Minimum Operations to Make Array Sum Divisible by K
3512. Minimum Operations to Make Array Sum Divisible by K
3740. Minimum Distance Between Three Equal Elements I.cpp
3740. Minimum Distance Between Three Equal Elements I.cpp
3751. Total Waviness of Numbers in Range I.cpp
3751. Total Waviness of Numbers in Range I.cpp
3774. Absolute Difference Between Maximum and Minimum K Elements
3774. Absolute Difference Between Maximum and Minimum K Elements
3783. Mirror Distance of an Integer
3783. Mirror Distance of an Integer
3794. Reverse String Prefix.cpp
3794. Reverse String Prefix.cpp
3798. Largest Even Number.cpp
3798. Largest Even Number.cpp
3813. Vowel-Consonant Score.cpp
3813. Vowel-Consonant Score.cpp
3818. Minimum Prefix Removal to Make Array Strictly Increasing.cpp
3818. Minimum Prefix Removal to Make Array Strictly Increasing.cpp
3819. Rotate Non Negative Elements.cpp
3819. Rotate Non Negative Elements.cpp
3828. Final Element After Subarray Deletions.cpp
3828. Final Element After Subarray Deletions.cpp
3838. Weighted Word Mapping.cpp
3838. Weighted Word Mapping.cpp
3842. Toggle Light Bulbs.cpp
3842. Toggle Light Bulbs.cpp
3843. First Element with Unique Frequency.cpp
3843. First Element with Unique Frequency.cpp
3847. Find the Score Difference in a Game.cpp
3847. Find the Score Difference in a Game.cpp
3856. Trim Trailing Vowels.cpp
3856. Trim Trailing Vowels.cpp
3866. First Unique Even Element.cpp
3866. First Unique Even Element.cpp
3872. Longest Arithmetic Sequence After Changing At Most One Element.cpp
3872. Longest Arithmetic Sequence After Changing At Most One Element.cpp
3895. Count Digit Appearances.cpp
3895. Count Digit Appearances.cpp
View all files
About
LeetCode Data Structures and Algorithms problem solutions implemented in C++.
Activity
Stars
1
star
Watchers
1
watching
Forks
0
forks
Report repository
Releases
Packages
Contributors
Languages
You can’t perform that action at this time.