Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/MAZHARMIK/Interview_DS_Algo
/ functions
Functions
3,557 in github.com/MAZHARMIK/Interview_DS_Algo
⨍
Functions
3,557
◇
Types & classes
1,501
Method
longestCycle
Graph/BFS_DFS/Longest Cycle in a Graph.cpp:38
Method
longestDiverseString
Heap/Longest Happy String.cpp:15
Function
longestIdealString
DP/LIS & Variants/Longest Ideal Subsequence.cpp:76
Method
longestIdealString
DP/LIS & Variants/Longest Ideal Subsequence.cpp:15
Method
longestIncreasingPath
Arrays/2-D Array/DFS/Longest_Increasing_Path_in_a_Matrix.cpp:35
Method
longestKSubstr
Sliding Window/Longest K unique characters substring.cpp:21
Function
longestMonotonicSubarray
Arrays/Leetcode Easy/Longest Strictly Increasing or Strictly Decreasing Subarray.cpp:109
Method
longestMonotonicSubarray
Arrays/Leetcode Easy/Longest Strictly Increasing or Strictly Decreasing Subarray.cpp:14
Function
longestNiceSubarray
Sliding Window/Longest Nice Subarray.cpp:143
Method
longestNiceSubarray
Sliding Window/Longest Nice Subarray.cpp:25
Method
longestObstacleCourseAtEachPosition
DP/Find the Longest Valid Obstacle Course at Each Position.cpp:10
Method
longestOnes
Arrays/Two Pointer/Max Consecutive Ones III.cpp:19
Function
longestPalindrome
strings/Easy Tagged/Longest Palindrome.cpp:132
Function
longestPalindrome
DP/Longest Palindromic Substring.cpp:194
Method
longestPalindrome
strings/Easy Tagged/Longest Palindrome.cpp:15
Method
longestPalindrome
DP/Longest Palindromic Substring.cpp:33
Method
longestPalindrome
HashMap/Longest Palindrome by Concatenating Two Letter Words.cpp:15
Method
longestPalindrome
Greedy/Longest Palindrome by Concatenating Two Letter Words.cpp:9
Function
longestPalindromeSubseq
DP/Longest Palindromic Subsequence.cpp:154
Method
longestPalindromeSubseq
DP/Longest Palindromic Subsequence.cpp:33
Method
longestPath
Graph/Longest Path With Different Adjacent Characters.cpp:51
Method
longestPrefixSuffix
Arrays/Number of Subarrays That Match a Pattern I and II.cpp:53
Function
longestSquareStreak
Arrays/Longest Square Streak in an Array.cpp:107
Method
longestSquareStreak
Arrays/Longest Square Streak in an Array.cpp:15
Function
longestStrChain
DP/LIS & Variants/Longest String Chain.cpp:62
Method
longestStrChain
DP/LIS & Variants/Longest String Chain.cpp:96
Function
longestSubarray
Sliding Window/Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit.cpp:125
Method
longestSubarray
Arrays/Longest Subarray With Maximum Bitwise AND.cpp:15
Method
longestSubarray
Sliding Window/Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit.cpp:17
Method
longestSubarray
Sliding Window/Longest Subarray of 1's After Deleting One Element.cpp:35
Function
longestSubsequence
Greedy/Longest Binary Subsequence Less Than or Equal to K.cpp:100
Method
longestSubsequence
DP/1-D DP/Longest Arithmetic Subsequence of Given Difference.cpp:33
Method
longestSubsequence
Greedy/Longest Binary Subsequence Less Than or Equal to K.cpp:33
Function
longestSubsequenceRepeatedK
Backtracking/Longest Subsequence Repeated k Times.cpp:298
Method
longestSubsequenceRepeatedK
Backtracking/Longest Subsequence Repeated k Times.cpp:65
Method
longestZigZag
Tree/Longest ZigZag Path in a Binary Tree.cpp:26
Method
lowerBound
Binary search: first index >= target
DP/Maximum Walls Destroyed by Robots.cpp:102
Method
lowerBound
DP/1-D DP/Maximum Total Damage With Spell Casting.cpp:127
Method
lowerBound
Arrays/Leetcode Easy/Special Array With X Elements Greater Than or Equal X.cpp:117
Method
lowerBound
Arrays/Binary Search/Maximum Fruits Harvested After at Most K Steps.cpp:112
Method
lowerBound
Arrays/Binary Search/Find First and Last Position of Element in Sorted Array.cpp:151
Method
lowerBound
Arrays/Binary Search/Count the Number of Fair Pairs.cpp:66
Method
lowerBound
Design/Implement Router.cpp:165
Method
lowestCommonAncestor
Tree/Lowest Common Ancestor of a Binary Tree.cpp:11
Method
lowestCommonAncestor
Tree/Step-By-Step Directions From a Binary Tree Node to Another.cpp:16
Method
lowestCommonAncestor
Tree/Lowest Common Ancestor in a Binary Tree.cpp:15
Method
lowestCommonAncestor
Tree/Lowest Common Ancestor of a Binary Search Tree.cpp:10
Method
luckyNumbers
Arrays/2-D Array/Leetcode Easy/Lucky Numbers in a Matrix.cpp:15
Function
magicalSum
DP/Digit DP/Find Sum of Array Product of Magical Sequences.cpp:242
Method
magicalSum
DP/Digit DP/Find Sum of Array Product of Magical Sequences.cpp:43
Method
magnificentSets
Graph/Divide Nodes Into the Maximum Number of Groups.cpp:76
Function
main
Mathematical/Segmented Sieve.cpp:61
Function
main
Mathematical/Matrix Exponentiation.cpp:44
Function
main
Mathematical/Determine if a Cell Is Reachable at a Given Time.cpp:79
Function
main
Graph/BFS_Traversal.cpp:29
Function
main
Graph/Disjoint Set/Disjoint set (Union-Find-Size).cpp:48
Function
main
DP/Maximum Sum Rectangular Submatrix in Matrix dynamic programming(2-D kadane).cpp:74
Function
main
DP/Print the Longest Common Substring.cpp:49
Function
main
Driver program to test above functions */
DP/Cutting_a_Rod.cpp:92
Function
main
DP/Maximize The Cut Segments (5 approaches).cpp:117
Function
main
This is written just to test my code above
Arrays/Binary Search/Shortest Distance to Target Color.cpp:88
Function
main
Tree/Diagonal Tree Traversal (Recursive: using map).cpp:45
Function
main
Bit_Magic/Calculate 7n\8 without using division and multiplication.cpp:20
Function
main
Bit_Magic/Maximum XOR of Two Numbers in an Array.cpp:145
Method
main
Graph/All Ancestors of a Node in a Directed Acyclic Graph.cpp:249
Function
majorityElement
Arrays/Majority Element (Moore's Voting).cpp:95
Method
majorityElement
Arrays/Majority Element II.cpp:11
Method
majorityElement
Arrays/Majority Element (Moore's Voting).cpp:14
Method
makeArrayIncreasing
DP/Make Array Strictly Increasing.cpp:38
Method
makeConnected
Graph/Disjoint Set/Number of Operations to Make Network Connected.cpp:38
Function
makeEqual
HashMap/Redistribute Characters to Make All Strings Equal.cpp:101
Method
makeEqual
HashMap/Redistribute Characters to Make All Strings Equal.cpp:13
Method
makeFancyString
strings/Easy Tagged/Delete Characters to Make Fancy String.cpp:14
Function
makeGood
strings/Make The String Great.cpp:35
Method
makeGood
strings/Make The String Great.cpp:14
Method
makeGraph
Tree/Number of Good Leaf Nodes Pairs.cpp:17
Method
makeKey
Design/Implement Router.cpp:29
Method
makeLargestSpecial
Recursion/Special Binary String.cpp:15
Method
makeMostFrequentlyUsed
Design/LFU Cache.cpp:21
Method
makeMostRecentlyUsed
Design/LRU Cache.cpp:71
Function
makeTheIntegerZero
Mathematical/Minimum Operations to Make the Integer Zero.cpp:89
Method
makeTheIntegerZero
Mathematical/Minimum Operations to Make the Integer Zero.cpp:15
Method
makesquare
Backtracking/Matchsticks to Square.cpp:42
Method
manhattan
Arrays/Binary Search/Maximize the Distance Between Points on a Square.cpp:167
Method
manhattanDist
Arrays/Binary Search/Maximize the Distance Between Points on a Square.cpp:16
Method
markGaurded
Arrays/2-D Array/DFS/Count Unguarded Cells in the Grid.cpp:15
Method
markGuarded
Arrays/2-D Array/DFS/Count Unguarded Cells in the Grid.cpp:165
Method
maskVowels
HashMap/Vowel Spellchecker.cpp:27
Method
matchPlayersAndTrainers
Arrays/Maximum Matching of Players With Trainers.cpp:15
Method
matchesPattern
strings/Construct Smallest Number From DI String.cpp:15
Method
matrixExponentiation
Mathematical/Total Characters in String After Transformations II.cpp:31
Method
matrixMultiplication
Mathematical/Total Characters in String After Transformations II.cpp:19
Method
matrixReshape
Arrays/2-D Array/Reshape The Matrix.cpp:10
Function
matrixScore
Bit_Magic/Score After Flipping Matrix.cpp:162
Method
matrixScore
Bit_Magic/Score After Flipping Matrix.cpp:15
Function
maxAbsoluteSum
Arrays/Cumulative_Sum(Prefix Array)/Maximum Absolute Sum of Any Subarray.cpp:104
Method
maxAbsoluteSum
Arrays/Cumulative_Sum(Prefix Array)/Maximum Absolute Sum of Any Subarray.cpp:15
Method
maxAdjacentDistance
Arrays/Leetcode Easy/Maximum Difference Between Adjacent Elements in a Circular Array.cpp:14
Method
maxAlternatingSum
DP/1-D DP/Maximum Alternating Subsequence Sum.cpp:36
Function
maxAncestorDiff
Tree/Maximum difference between node and its ancestor.cpp:145
← previous
next →
2,001–2,100 of 3,557, ranked by callers