MCPcopy Create free account

hub / github.com/MAZHARMIK/Interview_DS_Algo / functions

Functions3,557 in github.com/MAZHARMIK/Interview_DS_Algo

↓ 4 callersMethodinsert
Trie/Count Prefix and Suffix Pairs I.cpp:72
↓ 4 callersFunctionisSameTree
Tree/Same Tree.cpp:98
↓ 4 callersMethodisSingle
Graph/Disjoint Set/Remove Max Number of Edges to Keep Graph Fully Traversable.cpp:56
↓ 4 callersFunctionisSubsequence
Checks if sub * k is a subsequence of s
Backtracking/Longest Subsequence Repeated k Times.cpp:257
↓ 4 callersFunctionisVowel
strings/Determine if String Halves Are Alike.cpp:80
↓ 4 callersFunctionisVowel
strings/Count Beautiful Substrings II.cpp:93
↓ 4 callersFunctionlowerBound
Helper for binary search (lower_bound equivalent)
DP/1-D DP/Maximum Total Damage With Spell Casting.cpp:191
↓ 4 callersFunctionmergeTwoLists
Function to merge two linked lists in sorted order
Linked List/Flattening a Linked List.cpp:14
↓ 4 callersFunctionpredecessor
DP/LIS & Variants/Longest String Chain.cpp:21
↓ 4 callersMethodquery
Heap/Maximum Total Subarray Value II.cpp:67
↓ 4 callersFunctionquerySegTree
Segment Tree/Block Placement Queries.cpp:212
↓ 4 callersFunctionquerySegmentTree
Segment Tree/Range Sum Query - Mutable.cpp:190
↓ 4 callersFunctionrangeSumBST
Tree/BST/Range Sum of BST.cpp:37
↓ 4 callersMethodsearchPrefix
Trie/Count Prefix and Suffix Pairs I.cpp:84
↓ 4 callersFunctionsetBit
Bit_Magic/Minimize XOR.cpp:163
↓ 4 callersFunctionsolve
strings/Move Pieces to Obtain a String.cpp:109
↓ 4 callersFunctionsolve
strings/Remove Duplicate Letters.cpp:257
↓ 4 callersFunctionsolve
DP/Painting the Walls.cpp:60
↓ 4 callersFunctionsolve
DP/Interleaving String.cpp:14
↓ 4 callersFunctionsolve
DP/Extra Characters in a String.cpp:90
↓ 4 callersFunctionsolve
DP/Merge Operations for Minimum Travel Time.cpp:108
↓ 4 callersFunctionsolve
DP/Decode Ways.cpp:147
↓ 4 callersFunctionsolve
DP/Unique Binary Search Trees II.cpp:68
↓ 4 callersFunctionsolve
DP/DP on Grids/Maximum Path Score in a Grid.cpp:176
↓ 4 callersFunctionsolve
DP/LIS & Variants/Maximum Balanced Subsequence Sum.cpp:118
↓ 4 callersFunctionsolve
DP/LIS & Variants/Build Array Where You Can Find The Maximum Exactly K Comparisons.cpp:116
↓ 4 callersFunctionsolve
Arrays/Cumulative_Sum(Prefix Array)/Minimum Operations to Reduce X to Zero.cpp:119
↓ 4 callersFunctionsolve
Tree/Lowest Common Ancestor of Deepest Leaves.cpp:131
↓ 4 callersFunctionsolve
Tree/Reverse Odd Levels of Binary Tree.cpp:131
↓ 4 callersFunctionsolve
Tree/Amount of Time for Binary Tree to Be Infected.cpp:166
↓ 4 callersFunctionsolve
C++ *****************************************************************/ T.C : O(n) S.C : O(n) (Stack recursion space) else it's O(1)
Tree/Foldable Binary Tree.cpp:10
↓ 4 callersFunctionsolve
Tree/Count the nodes at distance K from leaf.cpp:140
↓ 4 callersMethodunion
Graph/Disjoint Set/Remove Max Number of Edges to Keep Graph Fully Traversable.cpp:145
↓ 4 callersMethodunion
Graph/Disjoint Set/Maximize Spanning Tree Stability with Upgrades.cpp:182
↓ 4 callersFunctionupdate
Segment Tree/Range Sum Query - Mutable.cpp:166
↓ 4 callersFunctionupdateSegTree
Segment Tree/Range Sum Query - Mutable.cpp:170
↓ 3 callersMethodUnion
Graph/Disjoint Set/Disjoint set (Union-Find-Size).cpp:29
↓ 3 callersMethodbinarySearch
APproach-3 //Binary Search + Memoized (Accepted)
DP/Super Egg Drop.cpp:78
↓ 3 callersFunctioncheck
Stack/Remove All Occurrences of a Substring.cpp:131
↓ 3 callersFunctioncheckLCP
DP/DP on Strings/Find the String with LCP.cpp:251
↓ 3 callersFunctiondfs
Graph/Dijkstra'a Based Problems/Minimum Cost to Make at Least One Valid Path in a Grid.cpp:113
↓ 3 callersFunctiondfs
Graph/BFS_DFS/Minimize the Maximum Edge Weight of Graph.cpp:257
↓ 3 callersFunctiondfs
Arrays/2-D Array/Maximum Number of Points From Grid Queries.cpp:224
↓ 3 callersFunctiondoubleUtil
Linked List/Double a Number Represented as a Linked List.cpp:223
↓ 3 callersFunctionfindPower
Binary exponentiation
DP/DP on Strings/Count Number of Balanced Permutations.cpp:199
↓ 3 callersFunctionfindSequences
Backtracking/Letter Tile Possibilities.cpp:126
↓ 3 callersFunctiongenerateColumnStates
Recursively generate all valid column colorings of height 'm' such that no two vertically adjacent cells have the same color
DP/Painting a Grid With Three Different Colors.cpp:97
↓ 3 callersFunctiongetBits
Bit_Magic/Maximum Number That Sum of the Prices Is Less Than or Equal to K.cpp:183
↓ 3 callersMethodhasNext
This is always called before next()
Design/Flatten Nested List Iterator.cpp:32
↓ 3 callersFunctioninsertAtBottom
Recursion/Reverse a Stack.cpp:112
↓ 3 callersFunctionisMatch
Recursion/Regular Expression Matching.cpp:84
↓ 3 callersMethodnext
Stack/Online Stock Span.cpp:16
↓ 3 callersMethodreverse
Stack/Reverse Substrings Between Each Pair of Parentheses.cpp:96
↓ 3 callersFunctionreverseHelp
Linked List/Reverse Linked List.cpp:108
↓ 3 callersFunctionreverseList
Linked List/Palindrome Linked List.cpp:189
↓ 3 callersFunctionsieve
Mathematical/Segmented Sieve.cpp:9
↓ 3 callersFunctionsolve
DP/Partition Array for Maximum Sum.cpp:85
↓ 3 callersFunctionsolve
DP/Number of Dice Rolls With Target Sum.cpp:86
↓ 3 callersFunctionsolve
DP/Knight Dialer.cpp:139
↓ 3 callersFunctionsolve
DP/Minimum Difficulty of a Job Schedule.cpp:119
↓ 3 callersFunctionsolve
DP/Painting a Grid With Three Different Colors.cpp:110
↓ 3 callersFunctionsolve
DP/DP on Strings/Count Number of Balanced Permutations.cpp:213
↓ 3 callersFunctionsolve
DP/DP on Grids/Number of Ways to Paint N × 3 Grid.cpp:86
↓ 3 callersFunctionsolve
Linked List/Palindrome Linked List.cpp:275
↓ 3 callersFunctionsolve
Linked List/Reorder List.cpp:192
↓ 3 callersFunctionsolve
Backtracking/Palindrome Partitioning.cpp:172
↓ 2 callersFunctionFloydWarshall
Graph/Floyd Warshall/Minimum Cost to Convert String I.cpp:68
↓ 2 callersMethodUnion
Graph/Disjoint Set/Greatest Common Divisor Traversal.cpp:36
↓ 2 callersMethodadd
Design/Finding Pairs With a Certain Sum.cpp:26
↓ 2 callersMethodaddAll
Design/Flatten Nested List Iterator.cpp:99
↓ 2 callersFunctionapnaLowerB
Arrays/Leetcode Easy/Maximum Count of Positive Integer and Negative Integer.cpp:82
↓ 2 callersFunctionbestStartingPoint
strings/Find the Lexicographically Largest String From the Box I.cpp:113
↓ 2 callersFunctionbfs
Graph/Redundant Connection.cpp:228
↓ 2 callersFunctionbfs
Graph/Number of Islands.cpp:171
↓ 2 callersFunctionbfs
Graph/Dijkstra'a Based Problems/Shortest Distance After Road Addition Queries I.cpp:195
↓ 2 callersFunctionbfs
Arrays/Find All Groups of Farmland.cpp:245
↓ 2 callersFunctionbinarySearch
Arrays/Leetcode Easy/Minimum Common Value.cpp:116
↓ 2 callersFunctionbinarySearch
Arrays/Leetcode Easy/Intersection of Two Arrays.cpp:205
↓ 2 callersFunctionbuildAnswer
Arrays/2-D Array/Get Biggest Three Rhombus Sums in a Grid.cpp:293
↓ 2 callersFunctionbuildSet
Mathematical/Reordered Power of 2.cpp:167
↓ 2 callersFunctioncanCross
DP/Frog Jump.cpp:40
↓ 2 callersFunctioncanDistr
Arrays/Binary Search/Maximum Candies Allocated to K Children.cpp:142
↓ 2 callersFunctioncheck
Arrays/Cumulative_Sum(Prefix Array)/Maximum Side Length of a Square with Sum Less than or Equal to Threshold.cpp:184
↓ 2 callersFunctioncheckAnagram
strings/Easy Tagged/Find Resultant Array After Removing Anagrams.cpp:60
↓ 2 callersMethodcompareTo
Graph/Dijkstra'a Based Problems/Find Minimum Time to Reach Last Room II.cpp:82
↓ 2 callersFunctioncomputeLPS
strings/Find Beautiful Indices in the Given Array I.cpp:107
↓ 2 callersFunctioncomputeLPS
strings/Find Beautiful Indices in the Given Array II.cpp:109
↓ 2 callersFunctioncomputeLPS
Function to compute the LPS (Longest Proper Prefix which is also Suffix) array
strings/Shortest Palindrome.cpp:109
↓ 2 callersFunctionconstructSegmentTree
Segment Tree/Block Placement Queries.cpp:191
↓ 2 callersFunctionconstrustResult
JAVA ************************************************/ Approach (Using trie) T.C : O(N * L * ClogC), N = total Paths, L = average length of each path,
Trie/Delete Duplicate Folders in System.cpp:115
↓ 2 callersFunctioncountSteps
Graph/Dijkstra'a Based Problems/Freedom Trail.cpp:75
↓ 2 callersFunctiondijkstra
Graph/Dijkstra'a Based Problems/Minimum Cost to Convert String I.cpp:86
↓ 2 callersFunctionfind
Graph/Disjoint Set/Disjoint set (Union-Find-Rank&PathCompression).cpp:10
↓ 2 callersFunctionfindBest
Sliding Window/Frequency of the Most Frequent Element.cpp:133
↓ 2 callersFunctionfirstOccur
Arrays/Element Appearing More Than 25% In Sorted Array.cpp:178
↓ 2 callersFunctionget1D
Arrays/Binary Search/Maximize the Distance Between Points on a Square.cpp:219
↓ 2 callersFunctiongetCountNumber
Mathematical/Reordered Power of 2.cpp:219
↓ 2 callersFunctiongetFinalWord
strings/Text Justification.cpp:13
↓ 2 callersFunctiongetLeftMax
Arrays/Trapping Rain Water (without stack).cpp:50
↓ 2 callersMethodgetMaxFishCount
Graph/Disjoint Set/Maximum Number of Fish in a Grid.cpp:58
← previousnext →201–300 of 3,557, ranked by callers