MCPcopy Create free account

hub / github.com/MAZHARMIK/Interview_DS_Algo / functions

Functions3,557 in github.com/MAZHARMIK/Interview_DS_Algo

MethodcountPairs
Graph/Disjoint Set/Count Unreachable Pairs of Nodes in an Undirected Graph.cpp:41
MethodcountPairs
Arrays/Leetcode Easy/Count Equal and Divisible Pairs in an Array.cpp:14
MethodcountPairs
Tree/Number of Good Leaf Nodes Pairs.cpp:38
FunctioncountPalindromicSubsequence
strings/Unique Length-3 Palindromic Subsequences.cpp:149
MethodcountPalindromicSubsequence
strings/Unique Length-3 Palindromic Subsequences.cpp:14
FunctioncountPartitions
DP/Count Partitions With Max-Min Difference at Most K.cpp:193
FunctioncountPartitions
Arrays/Leetcode Easy/Count Partitions with Even Sum Difference.cpp:92
MethodcountPartitions
DP/Count Partitions With Max-Min Difference at Most K.cpp:45
MethodcountPartitions
Arrays/Leetcode Easy/Count Partitions with Even Sum Difference.cpp:16
MethodcountPaths
Graph/Dijkstra'a Based Problems/Number of Ways to Arrive at Destination.cpp:17
MethodcountPaths
DP/Number of Increasing Paths in a Grid.cpp:49
MethodcountPermutations
Mathematical/Count the Number of Computer Unlocking Permutations.cpp:17
FunctioncountPrefixSuffixPairs
Trie/Count Prefix and Suffix Pairs I.cpp:213
MethodcountPrefixSuffixPairs
Trie/Count Prefix and Suffix Pairs I.cpp:27
MethodcountPrimeSetBits
Bit_Magic/Leetcode Easy/Prime Number of Set Bits in Binary Representation.cpp:15
MethodcountRoutes
DP/Count All Possible Routes.cpp:40
FunctioncountServers
Arrays/2-D Array/Count Servers that Communicate.cpp:193
MethodcountServers
Arrays/2-D Array/Count Servers that Communicate.cpp:15
MethodcountSmaller
Arrays/Count of Smaller Numbers After Self.cpp:67
FunctioncountSquares
DP/DP on Grids/Count Square Submatrices with All Ones.cpp:138
MethodcountSquares
DP/DP on Grids/Count Square Submatrices with All Ones.cpp:38
MethodcountSteps
Graph/Dijkstra'a Based Problems/Freedom Trail.cpp:16
MethodcountSteps
DP/DP on Strings/Freedom Trail.cpp:19
FunctioncountStudents
Arrays/Simulation/Number of Students Unable to Eat Lunch.cpp:103
MethodcountStudents
Arrays/Simulation/Number of Students Unable to Eat Lunch.cpp:15
FunctioncountSubIslands
Arrays/2-D Array/Count Sub Islands.cpp:209
MethodcountSubIslands
Arrays/2-D Array/Count Sub Islands.cpp:39
MethodcountSubTrees
Graph/Number of Nodes in the Sub-Tree With the Same Label.cpp:34
FunctioncountSubarrays
Sliding Window/Count Subarrays With Fixed Bounds.cpp:107
FunctioncountSubarrays
Sliding Window/Count Subarrays Where Max Element Appears at Least K Times.cpp:116
MethodcountSubarrays
Arrays/Leetcode Easy/Count Subarrays of Length Three With a Condition.cpp:14
MethodcountSubarrays
Sliding Window/Count Subarrays With Fixed Bounds.cpp:16
MethodcountSubarrays
Sliding Window/Count Subarrays Where Max Element Appears at Least K Times.cpp:15
MethodcountSubarrays
Sliding Window/Count Subarrays With Score Less Than K.cpp:15
MethodcountSubarraysOfOnes
Arrays/2-D Array/Count Submatrices With All Ones.cpp:65
FunctioncountSubmatrices
Arrays/2-D Array/Count Submatrices with Top-Left Element and Sum Less Than k.cpp:112
MethodcountSubmatrices
Arrays/2-D Array/Count Submatrices with Top-Left Element and Sum Less Than k.cpp:15
MethodcountSubsets
O(2^n)
Arrays/Count Number of Maximum Bitwise-OR Subsets.cpp:16
FunctioncountSubstrings
strings/Count Substrings Starting and Ending with Given Character.cpp:56
FunctioncountSubstrings
DP/DP on Strings/Palindromic Substrings.cpp:215
MethodcountSubstrings
strings/Count Substrings Starting and Ending with Given Character.cpp:36
MethodcountSubstrings
DP/Palindromic Substrings.cpp:9
MethodcountSubstrings
DP/DP on Strings/Palindromic Substrings.cpp:30
MethodcountSubstrings
DP/DP on Strings/Palindromic Substrings.cpp:171
MethodcountSubstrings
DP/DP on Strings/Palindromic Substrings.cpp:240
MethodcountSum
Mathematical/Techfest and the Queue.cpp:13
FunctioncountSymmetricIntegers
Mathematical/Leetcode Easy/Count Symmetric Integers.cpp:118
MethodcountSymmetricIntegers
Mathematical/Leetcode Easy/Count Symmetric Integers.cpp:15
MethodcountTrapezoids
Mathematical/Count Number of Trapezoids II.cpp:15
MethodcountTrapezoids
Mathematical/Count Number of Trapezoids I.cpp:17
MethodcountTriples
Mathematical/Leetcode Easy/Count Square Sum Triples.cpp:15
MethodcountTriplets
Bit_Magic/Count Triplets That Can Form Two Arrays of Equal XOR.cpp:14
FunctioncountUnguarded
Arrays/2-D Array/DFS/Count Unguarded Cells in the Grid.cpp:262
MethodcountUnguarded
Arrays/2-D Array/DFS/Count Unguarded Cells in the Grid.cpp:50
FunctioncountValidSelections
Arrays/Leetcode Easy/Make Array Elements Equal to Zero.cpp:143
MethodcountValidSelections
Arrays/Leetcode Easy/Make Array Elements Equal to Zero.cpp:32
MethodcountVisiblePeople
Mathematical/Direction Assignments with Exactly K Visible People.cpp:48
FunctioncountVowelPermutation
DP/Count Vowels Permutation.cpp:138
MethodcountVowelPermutation
DP/Count Vowels Permutation.cpp:51
MethodcountWalls
DP/Maximum Walls Destroyed by Robots.cpp:18
MethodcreateBinaryTree
Tree/Create Binary Tree From Descriptions.cpp:15
FunctioncreateTree
Tree/Construct_Binary_Tree_from_Parent_Array.cpp:29
MethodcustomBinarySearch
Arrays/Binary Search/Most Beautiful Item for Each Query.cpp:16
FunctioncustomSortString
HashMap/Custom Sort String.cpp:125
MethodcustomSortString
HashMap/Custom Sort String.cpp:44
MethodcycleDetectBFS
Graph/BFS_DFS/Detect Cycles in 2D Grid.cpp:75
MethodcycleDetectDFS
Graph/BFS_DFS/Detect Cycles in 2D Grid.cpp:19
FunctiondailyTemperatures
Stack/Daily Temperatures.cpp:46
MethoddailyTemperatures
Stack/Daily Temperatures.cpp:15
Methoddec
Design/All O`one Data Structure.cpp:87
FunctiondeckRevealedIncreasing
Queue/Reveal Cards In Increasing Order.cpp:124
MethoddeckRevealedIncreasing
Queue/Reveal Cards In Increasing Order.cpp:15
FunctiondecodeAtIndex
strings/Decoded String at Index.cpp:95
MethoddecodeAtIndex
strings/Decoded String at Index.cpp:62
FunctiondecodeCiphertext
strings/Simulation/Decode the Slanted Ciphertext.cpp:161
MethoddecodeCiphertext
strings/Simulation/Decode the Slanted Ciphertext.cpp:15
Functiondecrypt
Sliding Window/Leetcode Easy/Defuse the Bomb.cpp:117
Methoddecrypt
Sliding Window/Leetcode Easy/Defuse the Bomb.cpp:15
MethoddelNodes
Tree/Delete Nodes And Return Forest.cpp:36
MethoddeleteDuplicateFolder
Trie/Delete Duplicate Folders in System.cpp:85
MethoddeleteFront
Design/Design Circular Queue.cpp:51
MethoddeleteHelper
Tree/Delete Nodes And Return Forest.cpp:16
MethoddeleteLast
Design/Design Circular Queue.cpp:60
MethoddeleteMiddle
Linked List/Delete the Middle Node of a Linked List.cpp:11
MethoddeleteNode
Linked List/Delete Node in a Linked List.cpp:14
Methoddeposit
Design/Simple Bank System.cpp:33
Methoddepth
Tree/Lowest Common Ancestor of Deepest Leaves.cpp:34
FunctiondestCity
HashSet/Destination City.cpp:42
MethoddestCity
HashMap/Destination City.cpp:13
MethoddestCity
HashSet/Destination City.cpp:13
MethoddetectCapitalUse
strings/Detect Capital.cpp:26
FunctiondetectCycle
Linked List/Linked List Cycle II.cpp:49
MethoddetectCycle
Function to detect cycle using DSU in an undirected graph.
Graph/Disjoint Set/Detect Cycle using DSU.cpp:36
MethoddetectCycle
Linked List/Linked List Cycle II.cpp:16
Methoddfs
Graph/Redundant Connection.cpp:16
Methoddfs
Graph/All Paths From Source to Target.cpp:40
Methoddfs
Graph/Minimum Score After Removals on a Tree.cpp:15
Methoddfs
Graph/All Paths from Source Lead to Destination.cpp:57
Methoddfs
Graph/Island Perimeter.cpp:18
Methoddfs
O(V+E)
Graph/Maximize the Number of Target Nodes After Connecting Trees II.cpp:30
← previousnext →1,101–1,200 of 3,557, ranked by callers