MCPcopy Create free account

hub / github.com/MAZHARMIK/Interview_DS_Algo / functions

Functions3,557 in github.com/MAZHARMIK/Interview_DS_Algo

MethodkTop
Heap/Top k numbers in a stream.cpp:14
FunctionkWeakestRows
Arrays/Binary Search/The K Weakest Rows in a Matrix.cpp:170
MethodkWeakestRows
Arrays/Binary Search/The K Weakest Rows in a Matrix.cpp:33
MethodkadanesMax
Arrays/Maximum Sum Circular Subarray.cpp:12
MethodkadanesMin
Arrays/Maximum Sum Circular Subarray.cpp:24
MethodkahnsAlgo
Graph/Topological Sorting/Alien Dictionary.cpp:80
MethodkidsWithCandies
Arrays/Kids With the Greatest Number of Candies.cpp:9
Functionknapsack
DP/Knapsack Series/0 - 1 Knapsack Problem Recursive.cpp:157
Methodknapsack
DP/Knapsack Series/0 - 1 Knapsack Problem BottomUp.cpp:15
Methodknapsack
DP/Knapsack Series/0 - 1 Knapsack Problem Recursive.cpp:36
Methodknapsack
DP/Knapsack Series/0 - 1 Knapsack Problem Space Optimised.cpp:15
FunctionknightDialer
DP/Knight Dialer.cpp:157
MethodknightDialer
DP/Knight Dialer.cpp:49
MethodknightProbability
DP/Knight Probability in Chessboard.cpp:38
Methodkosaraju
Function to find number of strongly connected components in the graph.
Graph/Strongly Connected Components (Kosaraju's Algo).cpp:43
MethodkthCharacter
strings/Easy Tagged/Find the K-th Character in String Game I.cpp:15
MethodkthCharacter
Recursion/Find the K-th Character in String Game II.cpp:15
MethodkthGrammar
Recursion/K-th Symbol in Grammar.cpp:14
MethodkthSmallest
Arrays/2-D Array/Kth Smallest Element in a Sorted Matrix.cpp:9
MethodkthSmallestPrimeFraction
Heap/K-th Smallest Prime Fraction.cpp:14
MethodkthSmallestProduct
Arrays/Binary Search/Kth Smallest Product of Two Sorted Arrays.cpp:66
MethodladderLength
Graph/Word_Ladder.cpp:22
FunctionlargestCombination
Bit_Magic/Largest Combination With Bitwise AND Greater Than Zero.cpp:95
MethodlargestCombination
Bit_Magic/Largest Combination With Bitwise AND Greater Than Zero.cpp:14
MethodlargestComponentSize
Graph/Largest_Component_Size_by_Common_Factor.cpp:31
MethodlargestDivisibleSubset
DP/LIS & Variants/Largest Divisible Subset.cpp:33
FunctionlargestGoodInteger
strings/Easy Tagged/Largest 3-Same-Digit Number in String.cpp:29
MethodlargestGoodInteger
strings/Easy Tagged/Largest 3-Same-Digit Number in String.cpp:12
FunctionlargestIsland
Graph/BFS_DFS/Making A Large Island.cpp:360
MethodlargestIsland
Graph/BFS_DFS/Making A Large Island.cpp:62
MethodlargestLocal
Arrays/2-D Array/Leetcode Easy/Largest Local Values in a Matrix.cpp:25
MethodlargestMagicSquare
Arrays/2-D Array/Largest Magic Square.cpp:15
FunctionlargestNumber
Arrays/Largest Number.cpp:69
MethodlargestNumber
Arrays/Largest Number.cpp:22
MethodlargestOddNumber
strings/Easy Tagged/Largest Odd Number in String.cpp:13
MethodlargestOverlap
Arrays/2-D Array/Image Overlap.cpp:43
MethodlargestPathValue
Graph/Topological Sorting/Largest Color Value in a Directed Graph.cpp:15
FunctionlargestPerimeter
Greedy/Find Polygon With the Largest Perimeter.cpp:40
MethodlargestPerimeter
Arrays/Largest Perimeter Triangle.cpp:16
MethodlargestPerimeter
Greedy/Find Polygon With the Largest Perimeter.cpp:14
MethodlargestRectangleArea
Stack/Largest_Rectangle_in_Histogram.cpp:55
MethodlargestSquareArea
Mathematical/Geometry/Find the Largest Area of Square Inside Two Rectangles.cpp:16
FunctionlargestSubmatrix
Arrays/2-D Array/Largest Submatrix With Rearrangements.cpp:168
MethodlargestSubmatrix
Arrays/2-D Array/Largest Submatrix With Rearrangements.cpp:14
MethodlargestTriangleArea
Mathematical/Leetcode Easy/Largest Triangle Area.cpp:15
MethodlargestValues
Tree/Find Largest Value in Each Tree Row.cpp:13
MethodlargestVariance
strings/Substring With Largest Variance.cpp:19
MethodlastOccur
Arrays/Element Appearing More Than 25% In Sorted Array.cpp:81
MethodlastStoneWeight
Heap/Last Stone Weight.cpp:10
MethodlastStoneWeightII
DP/Last Stone Weight II.cpp:26
MethodlatestDayToCross
Arrays/Binary Search/Last Day Where You Can Still Cross.cpp:56
FunctionlcaDeepestLeaves
Tree/Lowest Common Ancestor of Deepest Leaves.cpp:158
MethodlcaDeepestLeaves
T.C : O(n) S.C : O(maxD) system recursion stack space
Tree/Lowest Common Ancestor of Deepest Leaves.cpp:46
Methodlcs
DP/Printing All Longest Common Subsequences.cpp:4
MethodleadsToDestination
Graph/All Paths from Source Lead to Destination.cpp:74
FunctionleafSimilar
Tree/Leaf-Similar Trees.cpp:42
MethodleafSimilar
Tree/Leaf-Similar Trees.cpp:26
MethodleastInterval
Heap/Task Scheduler.cpp:16
MethodleastInterval
Greedy/Task Scheduler.cpp:11
MethodleftHeight
Tree/Count Complete Tree Nodes.cpp:10
MethodleftRightDifference
Arrays/Leetcode Easy/Left and Right Sum Differences.cpp:14
MethodleftmostBuildingQueries
Segment Tree/Find Building Where Alice and Bob Can Meet.cpp:67
MethodlemonadeChange
Arrays/Leetcode Easy/Lemonade Change.cpp:15
FunctionlenLongestFibSubseq
DP/Length of Longest Fibonacci Subsequence.cpp:130
MethodlenLongestFibSubseq
DP/Length of Longest Fibonacci Subsequence.cpp:15
MethodlenOfLongSubarr
Sliding Window/Longest Sub-Array with Sum K.cpp:9
MethodlenOfVDiagonal
DP/DP on Grids/Length of Longest V-Shaped Diagonal Segment.cpp:44
FunctionlengthAfterTransformations
Mathematical/Total Characters in String After Transformations II.cpp:129
MethodlengthAfterTransformations
Mathematical/Total Characters in String After Transformations II.cpp:50
MethodlengthAfterTransformations
HashMap/Total Characters in String After Transformations I.cpp:16
MethodlengthLinkedList
Linked List/Remove Nth Node From End of List.cpp:15
FunctionlengthOfLIS
DP/LIS & Variants/Longest Increasing Subsequence.cpp:36
MethodlengthOfLIS
DP/LIS & Variants/Longest Increasing Subsequence.cpp:46
FunctionlengthOfLastWord
strings/Easy Tagged/Length of Last Word.cpp:85
MethodlengthOfLastWord
strings/Easy Tagged/Length of Last Word.cpp:14
MethodlengthOfLongestSubstring
Arrays/Two Pointer/Longest_Substring_Without_Repeating_Characters.cpp:10
MethodlessThanEqualToCount
This function is in itself a Question (Find rank of an element in a sorted matrix) IMPORTANT
Arrays/2-D Array/Kth Smallest Element in a Sorted Matrix.cpp:29
MethodletterCombinations
Backtracking/Letter Combinations of a Phone Number.cpp:39
MethodlevelOrder
Tree/N-Ary Tree/N-ary Tree Level Order Traversal.cpp:8
MethodlexicalOrder
Recursion/Lexicographical Numbers.cpp:32
FunctionlexicographicallySmallestArray
Arrays/Make Lexicographically Smallest Array by Swapping Elements.cpp:131
MethodlexicographicallySmallestArray
Arrays/Make Lexicographically Smallest Array by Swapping Elements.cpp:15
Methodlink
Graph/Disjoint Set/Max Area of Island.cpp:87
Methodlis
DP/LIS & Variants/Russian Doll Envelopes.cpp:15
Methodlock
Design/Operations on Tree.cpp:27
MethodlongSubarrWthSumDivByK
Arrays/Longest subarray with sum divisible by K.cpp:17
MethodlongestArithSeqLength
DP/Longest Arithmetic Subsequence.cpp:33
FunctionlongestBalanced
Segment Tree/Longest Balanced Subarray II.cpp:262
MethodlongestBalanced
Arrays/Two Pointer/Longest Balanced Subarray I.cpp:15
MethodlongestBalanced
Arrays/Two Pointer/Longest Balanced Substring I.cpp:30
MethodlongestBalanced
HashMap/Longest Balanced Substring II.cpp:50
MethodlongestBalanced
Segment Tree/Longest Balanced Subarray II.cpp:15
MethodlongestCommonPrefix
Trie/Find the Length of the Longest Common Prefix.cpp:15
FunctionlongestCommonSubsequence
DP/Longest Common Subsequence.cpp:117
MethodlongestCommonSubsequence
DP/Longest Common Subsequence.cpp:28
MethodlongestCommonSubstr
DP/Longest Common Substring.cpp:28
MethodlongestConsecutive
Tree/Binary Tree Longest Consecutive Sequence I.cpp:24
MethodlongestConsecutive
HashMap/Longest_Consecutive_Sequence.cpp:12
MethodlongestConsecutive
HashSet/Longest Consecutive Sequence.cpp:24
MethodlongestConsecutive2
Tree/Binary Tree Longest Consecutive Sequence II.cpp:70
← previousnext →1,901–2,000 of 3,557, ranked by callers