MCPcopy Create free account

hub / github.com/MAZHARMIK/Interview_DS_Algo / functions

Functions3,557 in github.com/MAZHARMIK/Interview_DS_Algo

↓ 746 callersMethodget
Design/LRU Cache.cpp:18
↓ 532 callersMethodpush
Design/Max Stack.cpp:39
↓ 455 callersMethodadd
Design/Design HashSet.cpp:16
↓ 406 callersFunctionsolve
DP/Frog Jump.cpp:15
↓ 384 callersMethodempty
Stack/Implement Queue using Stacks.cpp:52
↓ 325 callersMethodpop
Design/Max Stack.cpp:44
↓ 314 callersMethodput
Design/LRU Cache.cpp:38
↓ 301 callersMethodtop
Design/Max Stack.cpp:54
↓ 252 callersMethodisEmpty
Design/Design Circular Queue.cpp:85
↓ 155 callersMethodadd
Arrays/Product of the Last K Numbers.cpp:22
↓ 143 callersMethodappend
Mathematical/Fancy Sequence.cpp:43
↓ 136 callersMethodcount
Design/Finding Pairs With a Certain Sum.cpp:32
↓ 134 callersMethodinsert
Inserts a word into the trie. */
Trie/Replace Words.cpp:35
↓ 125 callersMethodfind
Graph/Redundant Connection.cpp:127
↓ 107 callersFunctiondfs
Graph/BFS_DFS/Making A Large Island.cpp:391
↓ 106 callersMethodpop
amortized O(1)
Stack/Implement Queue using Stacks.cpp:31
↓ 104 callersFunctionfind
Complete the functions below*/
Graph/Disjoint Set/Disjoint set (Union-Find).cpp:8
↓ 102 callersMethodcontains
Returns true if this set contains the specified element */
Design/Design HashSet.cpp:25
↓ 102 callersFunctionsolve
DP/1-D DP/Rotated Digits.cpp:187
↓ 100 callersMethodremove
Design/Design HashMap.cpp:32
↓ 94 callersMethodpeek
Stack/Implement Queue using Stacks.cpp:45
↓ 93 callersFunctionDFS
DP/Minimum Path Sum.cpp:100
↓ 88 callersMethodpush
Stack/Implement Queue using Stacks.cpp:24
↓ 86 callersMethodadd
Tree/Add One Row to Tree.cpp:15
↓ 83 callersFunctionsolve
Backtracking/N-Queens.cpp:217
↓ 80 callersMethodback
Design/Design Browser History.cpp:26
↓ 74 callersFunctionfind
Graph/BFS_DFS/Making A Large Island.cpp:493
↓ 67 callersFunctionsolve
Tree/Even Odd Tree.cpp:152
↓ 62 callersMethodadd
Heap/Kth Largest Element in a Stream.cpp:28
↓ 62 callersFunctionsolve
DP/DP on Grids/Dungeon Game.cpp:197
↓ 58 callersFunctionreverse
Recursion/Reverse a Stack.cpp:123
↓ 54 callersMethodequals
HashMap/Longest Balanced Substring II.cpp:125
↓ 50 callersFunctionswap
Heap/Kth Largest Element in an Array.cpp:135
↓ 47 callersFunctionsolve
Recursion/Subsets.cpp:61
↓ 45 callersMethodgetKey
Graph/Dijkstra'a Based Problems/Minimum Cost to Convert String I.cpp:95
↓ 44 callersFunctiondfs
Arrays/2-D Array/DFS/Count Unguarded Cells in the Grid.cpp:241
↓ 40 callersFunctionquerySegmentTree
Function to query the segment tree for minimum value in range [start, end]
Segment Tree/Range Minimum Query.cpp:36
↓ 39 callersMethodinsert
Arrays/Intervals_Based_Qn/Insert Interval.cpp:15
↓ 38 callersMethodempty
Returns whether the stack is empty. */
Design/Implement Stack using Queues.cpp:39
↓ 35 callersFunctionsolve
DP/DP on Strings/Freedom Trail.cpp:115
↓ 28 callersFunctionbuildSegmentTree
C++ ***************************************************************************/ Using Segment Tree T.C : O(q*log(n)) S.C : O(4*n) Function to build t
Segment Tree/Range Minimum Query.cpp:16
↓ 28 callersFunctionsolve
Arrays/Intervals_Based_Qn/Two Best Non-Overlapping Events.cpp:151
↓ 27 callersFunctionisVowel
strings/Sort Vowels in a String.cpp:85
↓ 26 callersMethodgetValue
Design/Design Spreadsheet.cpp:46
↓ 25 callersFunctiongetNode
Trie/Count Prefix and Suffix Pairs I.cpp:55
↓ 24 callersMethodset
Design/Snapshot Array.cpp:31
↓ 23 callersFunctionfindPower
Iterative Binary Exponentiation T.C : O(log(b))
Mathematical/Count the Number of Arrays with K Matching Adjacent Elements.cpp:168
↓ 22 callersFunctiondfs
Tree/Find Largest Value in Each Tree Row.cpp:128
↓ 22 callersMethodfind
DP/N-th Tribonacci Number.cpp:15
↓ 21 callersFunctionsolve
Tree/Easy/Sum of Left Leaves.cpp:99
↓ 20 callersFunctionUnion
Graph/Disjoint Set/Disjoint set (Union-Find-Rank&PathCompression).cpp:17
↓ 20 callersFunctionisValid
Backtracking/N-Queens.cpp:195
↓ 20 callersFunctionsolve
strings/String Compression II.cpp:162
↓ 20 callersFunctionsolve
DP/Count Vowels Permutation.cpp:114
↓ 19 callersFunctioncheck
DP/Interleaving String.cpp:180
↓ 19 callersFunctionisSafe
Graph/Number of Islands.cpp:167
↓ 19 callersFunctionsolve
DP/Minimum Distance to Type a Word Using Two Fingers.cpp:282
↓ 18 callersFunctiongetDistance
DP/Minimum Distance to Type a Word Using Two Fingers.cpp:276
↓ 17 callersFunctionBFS
Graph/BFS_Traversal.cpp:8
↓ 17 callersFunctionLCS
DP/Longest Common Subsequence.cpp:104
↓ 17 callersFunctionpossible
Arrays/Binary Search/Maximum Running Time of N Computers.cpp:140
↓ 17 callersFunctionpower
Iterative Binary Exponentiation
Arrays/Difference Array Technique/XOR After Range Multiplication Queries II.cpp:103
↓ 16 callersFunctiondfs
Backtracking/The Number of Beautiful Subsets.cpp:57
↓ 16 callersMethodfind
Graph/Disjoint Set/Remove Max Number of Edges to Keep Graph Fully Traversable.cpp:31
↓ 16 callersMethodinsert
Bit_Magic/Maximum XOR of Two Numbers in an Array.cpp:17
↓ 16 callersMethodinsert
Design/Map Sum Pairs.cpp:15
↓ 16 callersFunctionsolve
DP/Edit Distance.cpp:151
↓ 16 callersFunctionsolve
DP/Knapsack Series/0 - 1 Knapsack Problem Recursive.cpp:134
↓ 16 callersFunctionsolve
Greedy/Greatest Sum Divisible by Three.cpp:172
↓ 15 callersFunctioncheck
Arrays/Binary Search/Maximize the Distance Between Points on a Square.cpp:229
↓ 15 callersFunctiongenerate
Arrays/Group Anagrams.cpp:110
↓ 15 callersFunctioninOrder
Tree/Leaf-Similar Trees.cpp:52
↓ 15 callersFunctionswap
Utility function to swap characters at positions i and j in a string
strings/Move Pieces to Obtain a String.cpp:143
↓ 14 callersFunctionfindPath
Tree/Step-By-Step Directions From a Binary Tree Node to Another.cpp:225
↓ 14 callersFunctionreverse
strings/Reverse Words in a String III.cpp:77
↓ 14 callersFunctionreverse
Graph/BFS_DFS/Lexicographically Smallest String After Applying Operations.cpp:178
↓ 14 callersFunctionreverseList
Linked List/Reverse Linked List.cpp:104
↓ 13 callersFunctiongcd
Helper method to calculate GCD of two numbers
Linked List/Insert Greatest Common Divisors in Linked List.cpp:111
↓ 13 callersFunctionisValid
DP/DP on Grids/Number of Paths with Max Score.cpp:313
↓ 13 callersFunctionsolve
DP/Maximum Score From Grid Operations.cpp:276
↓ 12 callersFunctionbfs
O(c + n)
Graph/BFS_DFS/Power Grid Maintenance.cpp:328
↓ 12 callersFunctioncheckSubIsland
BFS
Arrays/2-D Array/Count Sub Islands.cpp:176
↓ 12 callersMethodcompareTo
HashMap/Leetcode Easy/Coupon Code Validator.cpp:124
↓ 12 callersMethodfind
Graph/Disjoint Set/Maximize Spanning Tree Stability with Upgrades.cpp:26
↓ 12 callersFunctiongetIntFromChar
DP/DP on Grids/Number of Paths with Max Score.cpp:309
↓ 12 callersFunctionsolve
DP/Digit DP/Find Sum of Array Product of Magical Sequences.cpp:214
↓ 12 callersFunctionsubsetSum
DP/Target Sum.cpp:291
↓ 11 callersFunctionKruskal
Graph/Find Critical and Pseudo-Critical Edges in Minimum Spanning Tree.cpp:50
↓ 11 callersFunctionbinarySearch
Arrays/Two Pointer/Valid Triangle Number.cpp:146
↓ 11 callersFunctioncheck
DP/DP on Strings/Palindromic Substrings.cpp:193
↓ 11 callersFunctiondfs
Perform DFS to check if src is a prerequisite of target
Graph/Topological Sorting/Course Schedule IV.cpp:268
↓ 11 callersFunctionfind
Design/Design a Number Container System.cpp:147
↓ 11 callersFunctioninsert
Arrays/Intervals_Based_Qn/Insert Interval.cpp:119
↓ 11 callersFunctionisPalindrome
Linked List/Palindrome Linked List.cpp:199
↓ 11 callersFunctionisPossible
Arrays/Binary Search/House Robber IV.cpp:128
↓ 10 callersFunctionLPS
Copy paste of KMP LPS which I taught
strings/Minimum Time to Revert Word to Initial State II.cpp:78
↓ 10 callersFunctioncheck
Recursion/Find the Punishment Number of an Integer.cpp:135
↓ 10 callersFunctioncountSubsets
O(2^n)
Arrays/Count Number of Maximum Bitwise-OR Subsets.cpp:128
↓ 10 callersFunctiondfs
Tree/BST/Find Mode in Binary Search Tree.cpp:96
↓ 10 callersFunctiondijkstra
Graph/Dijkstra'a Based Problems/Find Edges in Shortest Paths.cpp:110
next →1–100 of 3,557, ranked by callers