{"id":19852889,"url":"https://github.com/chetan6780/striver-sde-sheet","last_synced_at":"2025-05-02T00:31:37.664Z","repository":{"id":42379505,"uuid":"499885885","full_name":"chetan6780/Striver-SDE-Sheet","owner":"chetan6780","description":"Repository containing solution for #SdeSheetChallenge by striver","archived":false,"fork":false,"pushed_at":"2022-08-22T11:17:42.000Z","size":144,"stargazers_count":13,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-06T20:23:46.198Z","etag":null,"topics":["codestudio","dsa","leetcode","sde-sheet","sdesheetchallenge","strivers-sde-sheet"],"latest_commit_sha":null,"homepage":"https://chetan6780.github.io/Striver-SDE-Sheet/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chetan6780.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-06-04T16:55:57.000Z","updated_at":"2025-02-07T20:10:48.000Z","dependencies_parsed_at":"2022-07-08T00:20:28.801Z","dependency_job_id":null,"html_url":"https://github.com/chetan6780/Striver-SDE-Sheet","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chetan6780%2FStriver-SDE-Sheet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chetan6780%2FStriver-SDE-Sheet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chetan6780%2FStriver-SDE-Sheet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chetan6780%2FStriver-SDE-Sheet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chetan6780","download_url":"https://codeload.github.com/chetan6780/Striver-SDE-Sheet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251966431,"owners_count":21672666,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["codestudio","dsa","leetcode","sde-sheet","sdesheetchallenge","strivers-sde-sheet"],"created_at":"2024-11-12T14:04:50.107Z","updated_at":"2025-05-02T00:31:32.655Z","avatar_url":"https://github.com/chetan6780.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Striver-SDE-Sheet\n\nFind complete [SDE-SHEET](https://takeuforward.org/interviews/strivers-sde-sheet-top-coding-interview-problems/) on [TakeUForward](https://takeuforward.org/interviews/strivers-sde-sheet-top-coding-interview-problems/).\n\n### Day-1 (Arrays-I)\n\n| No. | Problem                                                       |\n| --- | ------------------------------------------------------------- |\n| 1.  | [Set Matrix Zeros](DAY_1/1_setMatrixZeros.md)                 |\n| 2.  | [Pascal Triangle](DAY_1/2_pascalTriangle.md)                  |\n| 3 . | [Next Permutation](DAY_1/3_nextPermutation.md)                |\n| 4.  | [Maximum sum Subarray](DAY_1/4_kadanesAlgorithm.md)           |\n| 5.  | [Sort 0 1 2](DAY_1/5_sort012.md)                              |\n| 6.  | [Best Time to Buy and Sell Stock](DAY_1/6_buyAndSellStock.md) |\n\n### Day-2 (Arrays-II)\n\n| No. | Problem                                                              |\n| --- | -------------------------------------------------------------------- |\n| 2.  | [Merge intervals](DAY_2/2_mergeIntervals.md)                         |\n| 3.  | [Merge two sorted arrays](DAY_2/3_mergeSortedArrays.md)              |\n| 4.  | [Find Duplicate in Array](DAY_2/4_findDuplicateInArray.md)           |\n| 5.  | [Repeating and missing number](DAY_2/5_repeatingAndMissingNumber.md) |\n| 6.  | [Count Inversions](DAY_2/6_countInversions.md)                       |\n\n### Day - 3 (Arrays-III)\n\n| No. | Problems                                                      |\n| --- | ------------------------------------------------------------- |\n| 1.  | [Search in a 2D matrix](DAY_3/1_searchIn2DMatrix.md)          |\n| 2.  | [Pow(X,n)](DAY_3/2_powXN.md)                                  |\n| 3.  | [Majority Element (\u003eN/2 times)](DAY_3/3_majorityElementN2.md) |\n| 4.  | [Majority Element (\u003eN/3 times)](DAY_3/4_majorityElementN3.md) |\n| 5.  | [Grid Unique Paths](DAY_3/5_gridUniquePath.md)                |\n| 6.  | [Reverse Pairs (Leetcode)](DAY_3/6_reversePairs.md)           |\n\n### Day-4 (Hashing)\n\n| No. | Problems                                                                             |\n| --- | ------------------------------------------------------------------------------------ |\n| 1.  | [2 sum problem](DAY_4/1_2sum.md)                                                     |\n| 2.  | [4 sum problem](DAY_4/2_4sum.md)                                                     |\n| 3.  | [Longest Consecutive Sequence](DAY_4/3_LongestConsecutiveSequence.md)                |\n| 4.  | [Largest Subarray with 0 sum](DAY_4/4_largestSubarrayZeroSum.md)                     |\n| 5.  | [Count number of subarrays with given XOR](DAY_4/5_countNoOfSubArrayWithGivenXOR.md) |\n| 6.  | [Longest substring without repeat](DAY_4/6_longestSubstringWithoutRepeat.md)         |\n\n### Day - 5 (Linked List)\n\n| No. | Problems                                                          |\n| --- | ----------------------------------------------------------------- |\n| 1.  | [Reverse a LinkedList](DAY_5/1_ReverseLinkedList.md)              |\n| 2.  | [Find middle of linked list](DAY_5/2_findMiddleOfLinkedList.md)   |\n| 3.  | [Merge two sorted linked list](DAY_5/3_mergeTWoSortedLists.md)    |\n| 4.  | [Remove Nth node from back](DAY_5/4_removeNthNodeFromBack.md)     |\n| 5.  | [Delete a Given node O(1)](DAY_5/5_deleteGivenNode.md)            |\n| 6.  | [Add two numbers as linked list](DAY_5/6_addTwoNumbersAsLList.md) |\n\n### Day - 6 (Linked List)\n\n| Sn. | Problems                                                                                 |\n| --- | ---------------------------------------------------------------------------------------- |\n| 1.  | [Find intersection point of Y LinkedList](DAY_6/1_findIntersectionPointOfYLinkedList.md) |\n| 2.  | [Detect a cycle in Linked List](DAY_6/2_detectCycleInLL.md)                              |\n| 3.  | [Reverse a LinkedList in groups of size k.](DAY_6/3_reverseLLinGroupK.md)                |\n| 4.  | [Check if a LinkedList is palindrome or not.](DAY_6/4_isLLPalindrome.md)                 |\n| 5.  | [Find the starting point of the Loop of LinkedList](DAY_6/5_startingPointOfLL.md)        |\n| 6.  | [Flattening of a LinkedList](DAY_6/6_flatteningOfLL.md)                                  |\n\n### Day - 7 (2 Pointers)\n\n| Sn. | Problems                                                                                     |\n| --- | -------------------------------------------------------------------------------------------- |\n| 1.  | [Rotate linked list](./DAY_7/1_rotateLL.md)                                                  |\n| 2.  | [Clone Linked List with random and next pointer](DAY_7/2_cloneLLWithRandomAndNextPointer.md) |\n| 3.  | [3 sum](DAY_7/3_3sum.md)                                                                     |\n| 4.  | [Trapping rainwater](DAY_7/4_trappingRainwater.md)                                           |\n| 5.  | [Remove Duplicate from Sorted array](DAY_7/5_removeDuplicates.md)                            |\n| 6.  | [Max consecutive ones](DAY_7/6_maxConsecutiveOnes.md)                                        |\n\n### Day - 8 (Greedy)\n\n| Sn. | Problems                                                                           |\n| --- | ---------------------------------------------------------------------------------- |\n| 1.  | [N meeting in one room](DAY_8/1_N_meeting_in_one_room.md)                          |\n| 2.  | [Minimum number of platforms required for a railway](DAY_8/2_minimum_platforms.md) |\n| 3.  | [Job sequencing Problem](DAY_8/3_job_sequencing.md)                                |\n| 4.  | [Fractional Knapsack Problem](DAY_8/4_fractional_knapsack.md)                      |\n| 5.  | [Greedy algorithm to find minimum number of coins](DAY_8/5_minimum_coins.md)       |\n| 6.  | [Activity Selection (it is same as N meeting in one room]()                        |\n\n### Day - 9 (Recursion)\n\n| Sn. | Problems                                                       |\n| --- | -------------------------------------------------------------- |\n| 1.  | [Subset sum](DAY_9/1_subsetSum.md.md)                          |\n| 2.  | [Subset sum-II](DAY_9/2_subsetSumII.md)                        |\n| 3.  | [Combination sum-1](DAY_9/3_combinationSumI.md)                |\n| 4.  | [Combination sum-2](DAY_9/4_combinationSumII.md)               |\n| 5.  | [Palindrome Partitioning](DAY_9/5_palindromePartitioning.md)   |\n| 6.  | [K-th permutation Sequence](DAY_9/6_kthPermutationSequence.md) |\n\n### Day - 10 (Recursion and Backtracking)\n\n| Sn. | Problems                                                   |\n| --- | ---------------------------------------------------------- |\n| 1.  | [All permutations of the string](DAY_10/1_permutations.md) |\n| 2.  | [N Queen Problem](DAY_10/2_nQueenProblem.md)               |\n| 3.  | [Valid sudoku](DAY_10/3_validSudoku.md)                    |\n| 4.  | [M Coloring Problem](DAY_10/4_mColoringProblem.md)         |\n| 5.  | [Rat In a Maze](DAY_10/5_ratInAMaze.md)                    |\n| 6.  | [Word Break](DAY_10/6_wordBreak.md)                        |\n\n### Day - 11 (Binary Search)\n\n| Sn. | Problem                                                                      |\n| --- | ---------------------------------------------------------------------------- |\n| 1.  | [The N-th root of an integer ](DAY_11/1_nthRootOfM.md)                       |\n| 2.  | [Matrix Median ](DAY_11/2_matrixMedian.md)                                   |\n| 3.  | [Single Element in a Sorted Array ](DAY_11/3_singleElementInSortedArray.md)  |\n| 4.  | [Search in Rotated Sorted Array ](DAY_11/4_searchInRotatedSortedArray.md)    |\n| 5.  | [Median of 2 sorted arrays ](DAY_11/5_medianOfTwoSortedArray.md)             |\n| 6.  | [K-th element of two sorted arrays](DAY_11/6_kthElementOfTwoSortedArrays.md) |\n| 7.  | [Allocate Minimum Number of Pages ](DAY_11/7_allocatePages.md)               |\n| 8.  | [Aggressive Cows ](DAY_11/8_aggressiveCows.md)                               |\n\n### Day - 12 (Heap)\n\n| Sn. | Problem                                                                     |\n| --- | --------------------------------------------------------------------------- |\n| 1.  | [Heap Implementation (Only for interviews)](DAY_12/1_heapImplementation.md) |\n| 2.  | [Kth Largest Element](DAY_12/2_kthLargestElement.md)                        |\n| 3.  | [K Maximum Sum Combination](DAY_12/3_kMaxSumCombinations.md)                |\n| 4.  | [Find Median from Data-Stream](DAY_12/4_findMedianInDataStream.md)          |\n| 5.  | [Merge K sorted arrays](DAY_12/5_mergeKSortedArrays.md)                     |\n| 6.  | [K most frequent elements](DAY_12/6_kMostFrequentElements.md)               |\n\n### Day - 13 (Stack \u0026 Queue - I)\n\n| Sn. | Problem                                                              |\n| --- | -------------------------------------------------------------------- |\n| 1.  | [Implement Stack Using Arrays](DAY_13/1_stackArrayImplementation.md) |\n| 2.  | [Implement Queue Using Arrays](DAY_13/2_queueArrayImplementation.md) |\n| 3.  | [Implement Stack using Queue](DAY_13/3_stackUsingQueue.md)           |\n| 4.  | [Implement Queue using Stack](DAY_13/4_queueUsingStack.md)           |\n| 5.  | [Check for balanced parentheses](DAY_13/5_balancedParenthesis.md)    |\n| 6.  | [Next Greater Element](DAY_13/6_nextGreaterElement.md)               |\n| 7.  | [Sort a Stack](DAY_13/7_sortAStack.md)                               |\n\n### Day - 14 (Stack \u0026 Queue - II)\n\n| Sn. | Problem                                                                       |\n| --- | ----------------------------------------------------------------------------- |\n| 1.  | [Next Smaller Element](DAY_14/1_nextSmallerElement.md)                        |\n| 2.  | [LRU cache (IMPORTANT)](DAY_14/2_lruCache.md)                                 |\n| 3.  | [LFU Cache](DAY_14/3_lfuCache.md)                                             |\n| 4.  | [Largest rectangle in a histogram](DAY_14/4_largestRectangleInHistogram.md)   |\n| 5.  | [Sliding Window maximum](DAY_14/5_slidingWindowMaximum.md)                    |\n| 6.  | [Implement Min Stack](DAY_14/6_minStack.md)                                   |\n| 7.  | [Rotten Orange (Using BFS)](DAY_14/7_rottenOrange.md)                         |\n| 8.  | [Stock Span Problem](DAY_14/8_stockSpanProblem.md)                            |\n| 9.  | [maximum of minimums of every window size](DAY_14/9_maxOfMinOfEveryWindow.md) |\n| 10. | [The Celebrity Problem](DAY_14/10_theCelebrityProblem.md)                     |\n\n### Day - 15 (String I)\n\n| Sn. | Problem                                                                  |\n| --- | ------------------------------------------------------------------------ |\n| 1.  | [Reverse Words in a String](DAY_15/1_reverseWord.md)                     |\n| 2.  | [Longest Palindromic Substring](DAY_15/2_longestPalindromicSubstring.md) |\n| 3.  | [Roman Number to Integer and vice versa](DAY_15/3_romanToInt.md)         |\n| 4.  | [Implement ATOI/STRSTR](DAY_15/4_atoiImplementation.md)                  |\n| 5.  | [Longest Common Prefix](DAY_15/5_lcp.md)                                 |\n| 6.  | [Rabin Karp](DAY_15/6_rabinKarp.md)                                      |\n\n### Day - 16 (String II)\n\n| Sn. | Problem                                                     |\n| --- | ----------------------------------------------------------- |\n| 1.  | [Z-Function](DAY_16/1_zFunction.md)                         |\n| 2.  | [KMP algo / LPS(pi) array](DAY_16/2_KMP.md)                 |\n| 3.  | Minimum Characters For Palindrome                           |\n| 4.  | [Check for Anagrams](DAY_16/4_checkAnagrams.md)             |\n| 5.  | [Count and Say](DAY_16/5_countAndSay.md)                    |\n| 6.  | [Compare version numbers](DAY_16/6_compareVersionNumber.md) |\n\n### Day - 17 (Binary Tree)\n\n| Sn. | Problem                                                                         |\n| --- | ------------------------------------------------------------------------------- |\n| 1.  | [Inorder Traversal](DAY_17/1_inorderTraversal.md)                               |\n| 2.  | [Preorder Traversal](DAY_17/2_preorderTraversal.md)                             |\n| 3.  | [Postorder Traversal](DAY_17/3_postorderTraversal.md)                           |\n| 4.  | [LeftView Of Binary Tree](DAY_17/4_leftViewOfBinaryTree.md)                     |\n| 5.  | [Bottom View of Binary Tree](DAY_17/5_bottomViewOfBinaryTree.md)                |\n| 6.  | [Top View of Binary Tree](DAY_17/6_topViewOfBinaryTree.md)                      |\n| 7.  | [Preorder inorder postorder in a single traversal](DAY_17/7_3traversalInOne.md) |\n| 8.  | [Vertical order traversal](DAY_17/8_verticalOrderTraversal.md)                  |\n| 9.  | [Root to node path in a Binary Tree](DAY_17/9_rootToNodePath.md)                |\n| 10. | [Max width of a Binary Tree](DAY_17/10_maxWidthOfBinaryTree.md)                 |\n\n### Day - 18 (Binary Tree - 2)\n\n| Sn. | Problem                                                                            |\n| --- | ---------------------------------------------------------------------------------- |\n| 1.  | [Level order traversal](DAY_18/1_levelOrderTraversal.md)                           |\n| 2.  | [Height of a Binary Tree](DAY_18/2_heightOfBT.md)                                  |\n| 3.  | [Diameter of Binary Tree](DAY_18/3_diameterOfBT.md)                                |\n| 4.  | [Check if the Binary tree is height-balanced or not](DAY_18/4_isHeightBalanced.md) |\n| 5.  | [LCA in Binary Tree](DAY_18/5_LCAOfBT.md)                                          |\n| 6.  | [Check if two trees are identical or not](DAY_18/6_sameTree.md)                    |\n| 7.  | [Zig Zag Traversal of Binary Tree](DAY_18/7_zigZagTraversal.md)                    |\n| 8.  | [Boundary Traversal of Binary Tree](DAY_18/8_boundaryTraversalOfBt.md)             |\n\n### Day - 19 (Binary Tree - 3)\n\n| Sn. | Problem                                                                                 |\n| --- | --------------------------------------------------------------------------------------- |\n| 1.  | [Maximum path sum](DAY_19/1_maxPathSum.md)                                              |\n| 2.  | [Construct Binary Tree from inorder and Preorder](DAY_19/2_constructBTFromInAndPre.md) |\n| 3.  | [Construct Binary Tree from Inorder and Postorder](DAY_19/3_constructBTFromInAndPost.md) |\n| 4.  | Symmetric Binary Tree                                                                   |\n| 5.  | Flatten Binary Tree to LinkedList                                                       |\n| 6.  | Check if Binary Tree is the mirror of itself or not                                     |\n| 7.  | Check for Children Sum Property                                                         |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchetan6780%2Fstriver-sde-sheet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchetan6780%2Fstriver-sde-sheet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchetan6780%2Fstriver-sde-sheet/lists"}