MCPcopy Create free account

hub / github.com/MAZHARMIK/Interview_DS_Algo / functions

Functions3,557 in github.com/MAZHARMIK/Interview_DS_Algo

MethodlongestCycle
Graph/BFS_DFS/Longest Cycle in a Graph.cpp:38
MethodlongestDiverseString
Heap/Longest Happy String.cpp:15
FunctionlongestIdealString
DP/LIS & Variants/Longest Ideal Subsequence.cpp:76
MethodlongestIdealString
DP/LIS & Variants/Longest Ideal Subsequence.cpp:15
MethodlongestIncreasingPath
Arrays/2-D Array/DFS/Longest_Increasing_Path_in_a_Matrix.cpp:35
MethodlongestKSubstr
Sliding Window/Longest K unique characters substring.cpp:21
FunctionlongestMonotonicSubarray
Arrays/Leetcode Easy/Longest Strictly Increasing or Strictly Decreasing Subarray.cpp:109
MethodlongestMonotonicSubarray
Arrays/Leetcode Easy/Longest Strictly Increasing or Strictly Decreasing Subarray.cpp:14
FunctionlongestNiceSubarray
Sliding Window/Longest Nice Subarray.cpp:143
MethodlongestNiceSubarray
Sliding Window/Longest Nice Subarray.cpp:25
MethodlongestObstacleCourseAtEachPosition
DP/Find the Longest Valid Obstacle Course at Each Position.cpp:10
MethodlongestOnes
Arrays/Two Pointer/Max Consecutive Ones III.cpp:19
FunctionlongestPalindrome
strings/Easy Tagged/Longest Palindrome.cpp:132
FunctionlongestPalindrome
DP/Longest Palindromic Substring.cpp:194
MethodlongestPalindrome
strings/Easy Tagged/Longest Palindrome.cpp:15
MethodlongestPalindrome
DP/Longest Palindromic Substring.cpp:33
MethodlongestPalindrome
HashMap/Longest Palindrome by Concatenating Two Letter Words.cpp:15
MethodlongestPalindrome
Greedy/Longest Palindrome by Concatenating Two Letter Words.cpp:9
FunctionlongestPalindromeSubseq
DP/Longest Palindromic Subsequence.cpp:154
MethodlongestPalindromeSubseq
DP/Longest Palindromic Subsequence.cpp:33
MethodlongestPath
Graph/Longest Path With Different Adjacent Characters.cpp:51
MethodlongestPrefixSuffix
Arrays/Number of Subarrays That Match a Pattern I and II.cpp:53
FunctionlongestSquareStreak
Arrays/Longest Square Streak in an Array.cpp:107
MethodlongestSquareStreak
Arrays/Longest Square Streak in an Array.cpp:15
FunctionlongestStrChain
DP/LIS & Variants/Longest String Chain.cpp:62
MethodlongestStrChain
DP/LIS & Variants/Longest String Chain.cpp:96
FunctionlongestSubarray
Sliding Window/Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit.cpp:125
MethodlongestSubarray
Arrays/Longest Subarray With Maximum Bitwise AND.cpp:15
MethodlongestSubarray
Sliding Window/Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit.cpp:17
MethodlongestSubarray
Sliding Window/Longest Subarray of 1's After Deleting One Element.cpp:35
FunctionlongestSubsequence
Greedy/Longest Binary Subsequence Less Than or Equal to K.cpp:100
MethodlongestSubsequence
DP/1-D DP/Longest Arithmetic Subsequence of Given Difference.cpp:33
MethodlongestSubsequence
Greedy/Longest Binary Subsequence Less Than or Equal to K.cpp:33
FunctionlongestSubsequenceRepeatedK
Backtracking/Longest Subsequence Repeated k Times.cpp:298
MethodlongestSubsequenceRepeatedK
Backtracking/Longest Subsequence Repeated k Times.cpp:65
MethodlongestZigZag
Tree/Longest ZigZag Path in a Binary Tree.cpp:26
MethodlowerBound
Binary search: first index >= target
DP/Maximum Walls Destroyed by Robots.cpp:102
MethodlowerBound
DP/1-D DP/Maximum Total Damage With Spell Casting.cpp:127
MethodlowerBound
Arrays/Leetcode Easy/Special Array With X Elements Greater Than or Equal X.cpp:117
MethodlowerBound
Arrays/Binary Search/Maximum Fruits Harvested After at Most K Steps.cpp:112
MethodlowerBound
Arrays/Binary Search/Find First and Last Position of Element in Sorted Array.cpp:151
MethodlowerBound
Arrays/Binary Search/Count the Number of Fair Pairs.cpp:66
MethodlowerBound
Design/Implement Router.cpp:165
MethodlowestCommonAncestor
Tree/Lowest Common Ancestor of a Binary Tree.cpp:11
MethodlowestCommonAncestor
Tree/Step-By-Step Directions From a Binary Tree Node to Another.cpp:16
MethodlowestCommonAncestor
Tree/Lowest Common Ancestor in a Binary Tree.cpp:15
MethodlowestCommonAncestor
Tree/Lowest Common Ancestor of a Binary Search Tree.cpp:10
MethodluckyNumbers
Arrays/2-D Array/Leetcode Easy/Lucky Numbers in a Matrix.cpp:15
FunctionmagicalSum
DP/Digit DP/Find Sum of Array Product of Magical Sequences.cpp:242
MethodmagicalSum
DP/Digit DP/Find Sum of Array Product of Magical Sequences.cpp:43
MethodmagnificentSets
Graph/Divide Nodes Into the Maximum Number of Groups.cpp:76
Functionmain
Mathematical/Segmented Sieve.cpp:61
Functionmain
Mathematical/Matrix Exponentiation.cpp:44
Functionmain
Mathematical/Determine if a Cell Is Reachable at a Given Time.cpp:79
Functionmain
Graph/BFS_Traversal.cpp:29
Functionmain
Graph/Disjoint Set/Disjoint set (Union-Find-Size).cpp:48
Functionmain
DP/Maximum Sum Rectangular Submatrix in Matrix dynamic programming(2-D kadane).cpp:74
Functionmain
DP/Print the Longest Common Substring.cpp:49
Functionmain
Driver program to test above functions */
DP/Cutting_a_Rod.cpp:92
Functionmain
DP/Maximize The Cut Segments (5 approaches).cpp:117
Functionmain
This is written just to test my code above
Arrays/Binary Search/Shortest Distance to Target Color.cpp:88
Functionmain
Tree/Diagonal Tree Traversal (Recursive: using map).cpp:45
Functionmain
Bit_Magic/Calculate 7n\8 without using division and multiplication.cpp:20
Functionmain
Bit_Magic/Maximum XOR of Two Numbers in an Array.cpp:145
Methodmain
Graph/All Ancestors of a Node in a Directed Acyclic Graph.cpp:249
FunctionmajorityElement
Arrays/Majority Element (Moore's Voting).cpp:95
MethodmajorityElement
Arrays/Majority Element II.cpp:11
MethodmajorityElement
Arrays/Majority Element (Moore's Voting).cpp:14
MethodmakeArrayIncreasing
DP/Make Array Strictly Increasing.cpp:38
MethodmakeConnected
Graph/Disjoint Set/Number of Operations to Make Network Connected.cpp:38
FunctionmakeEqual
HashMap/Redistribute Characters to Make All Strings Equal.cpp:101
MethodmakeEqual
HashMap/Redistribute Characters to Make All Strings Equal.cpp:13
MethodmakeFancyString
strings/Easy Tagged/Delete Characters to Make Fancy String.cpp:14
FunctionmakeGood
strings/Make The String Great.cpp:35
MethodmakeGood
strings/Make The String Great.cpp:14
MethodmakeGraph
Tree/Number of Good Leaf Nodes Pairs.cpp:17
MethodmakeKey
Design/Implement Router.cpp:29
MethodmakeLargestSpecial
Recursion/Special Binary String.cpp:15
MethodmakeMostFrequentlyUsed
Design/LFU Cache.cpp:21
MethodmakeMostRecentlyUsed
Design/LRU Cache.cpp:71
FunctionmakeTheIntegerZero
Mathematical/Minimum Operations to Make the Integer Zero.cpp:89
MethodmakeTheIntegerZero
Mathematical/Minimum Operations to Make the Integer Zero.cpp:15
Methodmakesquare
Backtracking/Matchsticks to Square.cpp:42
Methodmanhattan
Arrays/Binary Search/Maximize the Distance Between Points on a Square.cpp:167
MethodmanhattanDist
Arrays/Binary Search/Maximize the Distance Between Points on a Square.cpp:16
MethodmarkGaurded
Arrays/2-D Array/DFS/Count Unguarded Cells in the Grid.cpp:15
MethodmarkGuarded
Arrays/2-D Array/DFS/Count Unguarded Cells in the Grid.cpp:165
MethodmaskVowels
HashMap/Vowel Spellchecker.cpp:27
MethodmatchPlayersAndTrainers
Arrays/Maximum Matching of Players With Trainers.cpp:15
MethodmatchesPattern
strings/Construct Smallest Number From DI String.cpp:15
MethodmatrixExponentiation
Mathematical/Total Characters in String After Transformations II.cpp:31
MethodmatrixMultiplication
Mathematical/Total Characters in String After Transformations II.cpp:19
MethodmatrixReshape
Arrays/2-D Array/Reshape The Matrix.cpp:10
FunctionmatrixScore
Bit_Magic/Score After Flipping Matrix.cpp:162
MethodmatrixScore
Bit_Magic/Score After Flipping Matrix.cpp:15
FunctionmaxAbsoluteSum
Arrays/Cumulative_Sum(Prefix Array)/Maximum Absolute Sum of Any Subarray.cpp:104
MethodmaxAbsoluteSum
Arrays/Cumulative_Sum(Prefix Array)/Maximum Absolute Sum of Any Subarray.cpp:15
MethodmaxAdjacentDistance
Arrays/Leetcode Easy/Maximum Difference Between Adjacent Elements in a Circular Array.cpp:14
MethodmaxAlternatingSum
DP/1-D DP/Maximum Alternating Subsequence Sum.cpp:36
FunctionmaxAncestorDiff
Tree/Maximum difference between node and its ancestor.cpp:145
← previousnext →2,001–2,100 of 3,557, ranked by callers