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
↓ 746 callers
Method
get
Design/LRU Cache.cpp:18
↓ 532 callers
Method
push
Design/Max Stack.cpp:39
↓ 455 callers
Method
add
Design/Design HashSet.cpp:16
↓ 406 callers
Function
solve
DP/Frog Jump.cpp:15
↓ 384 callers
Method
empty
Stack/Implement Queue using Stacks.cpp:52
↓ 325 callers
Method
pop
Design/Max Stack.cpp:44
↓ 314 callers
Method
put
Design/LRU Cache.cpp:38
↓ 301 callers
Method
top
Design/Max Stack.cpp:54
↓ 252 callers
Method
isEmpty
Design/Design Circular Queue.cpp:85
↓ 155 callers
Method
add
Arrays/Product of the Last K Numbers.cpp:22
↓ 143 callers
Method
append
Mathematical/Fancy Sequence.cpp:43
↓ 136 callers
Method
count
Design/Finding Pairs With a Certain Sum.cpp:32
↓ 134 callers
Method
insert
Inserts a word into the trie. */
Trie/Replace Words.cpp:35
↓ 125 callers
Method
find
Graph/Redundant Connection.cpp:127
↓ 107 callers
Function
dfs
Graph/BFS_DFS/Making A Large Island.cpp:391
↓ 106 callers
Method
pop
amortized O(1)
Stack/Implement Queue using Stacks.cpp:31
↓ 104 callers
Function
find
Complete the functions below*/
Graph/Disjoint Set/Disjoint set (Union-Find).cpp:8
↓ 102 callers
Method
contains
Returns true if this set contains the specified element */
Design/Design HashSet.cpp:25
↓ 102 callers
Function
solve
DP/1-D DP/Rotated Digits.cpp:187
↓ 100 callers
Method
remove
Design/Design HashMap.cpp:32
↓ 94 callers
Method
peek
Stack/Implement Queue using Stacks.cpp:45
↓ 93 callers
Function
DFS
DP/Minimum Path Sum.cpp:100
↓ 88 callers
Method
push
Stack/Implement Queue using Stacks.cpp:24
↓ 86 callers
Method
add
Tree/Add One Row to Tree.cpp:15
↓ 83 callers
Function
solve
Backtracking/N-Queens.cpp:217
↓ 80 callers
Method
back
Design/Design Browser History.cpp:26
↓ 74 callers
Function
find
Graph/BFS_DFS/Making A Large Island.cpp:493
↓ 67 callers
Function
solve
Tree/Even Odd Tree.cpp:152
↓ 62 callers
Method
add
Heap/Kth Largest Element in a Stream.cpp:28
↓ 62 callers
Function
solve
DP/DP on Grids/Dungeon Game.cpp:197
↓ 58 callers
Function
reverse
Recursion/Reverse a Stack.cpp:123
↓ 54 callers
Method
equals
HashMap/Longest Balanced Substring II.cpp:125
↓ 50 callers
Function
swap
Heap/Kth Largest Element in an Array.cpp:135
↓ 47 callers
Function
solve
Recursion/Subsets.cpp:61
↓ 45 callers
Method
getKey
Graph/Dijkstra'a Based Problems/Minimum Cost to Convert String I.cpp:95
↓ 44 callers
Function
dfs
Arrays/2-D Array/DFS/Count Unguarded Cells in the Grid.cpp:241
↓ 40 callers
Function
querySegmentTree
Function to query the segment tree for minimum value in range [start, end]
Segment Tree/Range Minimum Query.cpp:36
↓ 39 callers
Method
insert
Arrays/Intervals_Based_Qn/Insert Interval.cpp:15
↓ 38 callers
Method
empty
Returns whether the stack is empty. */
Design/Implement Stack using Queues.cpp:39
↓ 35 callers
Function
solve
DP/DP on Strings/Freedom Trail.cpp:115
↓ 28 callers
Function
buildSegmentTree
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 callers
Function
solve
Arrays/Intervals_Based_Qn/Two Best Non-Overlapping Events.cpp:151
↓ 27 callers
Function
isVowel
strings/Sort Vowels in a String.cpp:85
↓ 26 callers
Method
getValue
Design/Design Spreadsheet.cpp:46
↓ 25 callers
Function
getNode
Trie/Count Prefix and Suffix Pairs I.cpp:55
↓ 24 callers
Method
set
Design/Snapshot Array.cpp:31
↓ 23 callers
Function
findPower
Iterative Binary Exponentiation T.C : O(log(b))
Mathematical/Count the Number of Arrays with K Matching Adjacent Elements.cpp:168
↓ 22 callers
Function
dfs
Tree/Find Largest Value in Each Tree Row.cpp:128
↓ 22 callers
Method
find
DP/N-th Tribonacci Number.cpp:15
↓ 21 callers
Function
solve
Tree/Easy/Sum of Left Leaves.cpp:99
↓ 20 callers
Function
Union
Graph/Disjoint Set/Disjoint set (Union-Find-Rank&PathCompression).cpp:17
↓ 20 callers
Function
isValid
Backtracking/N-Queens.cpp:195
↓ 20 callers
Function
solve
strings/String Compression II.cpp:162
↓ 20 callers
Function
solve
DP/Count Vowels Permutation.cpp:114
↓ 19 callers
Function
check
DP/Interleaving String.cpp:180
↓ 19 callers
Function
isSafe
Graph/Number of Islands.cpp:167
↓ 19 callers
Function
solve
DP/Minimum Distance to Type a Word Using Two Fingers.cpp:282
↓ 18 callers
Function
getDistance
DP/Minimum Distance to Type a Word Using Two Fingers.cpp:276
↓ 17 callers
Function
BFS
Graph/BFS_Traversal.cpp:8
↓ 17 callers
Function
LCS
DP/Longest Common Subsequence.cpp:104
↓ 17 callers
Function
possible
Arrays/Binary Search/Maximum Running Time of N Computers.cpp:140
↓ 17 callers
Function
power
Iterative Binary Exponentiation
Arrays/Difference Array Technique/XOR After Range Multiplication Queries II.cpp:103
↓ 16 callers
Function
dfs
Backtracking/The Number of Beautiful Subsets.cpp:57
↓ 16 callers
Method
find
Graph/Disjoint Set/Remove Max Number of Edges to Keep Graph Fully Traversable.cpp:31
↓ 16 callers
Method
insert
Bit_Magic/Maximum XOR of Two Numbers in an Array.cpp:17
↓ 16 callers
Method
insert
Design/Map Sum Pairs.cpp:15
↓ 16 callers
Function
solve
DP/Edit Distance.cpp:151
↓ 16 callers
Function
solve
DP/Knapsack Series/0 - 1 Knapsack Problem Recursive.cpp:134
↓ 16 callers
Function
solve
Greedy/Greatest Sum Divisible by Three.cpp:172
↓ 15 callers
Function
check
Arrays/Binary Search/Maximize the Distance Between Points on a Square.cpp:229
↓ 15 callers
Function
generate
Arrays/Group Anagrams.cpp:110
↓ 15 callers
Function
inOrder
Tree/Leaf-Similar Trees.cpp:52
↓ 15 callers
Function
swap
Utility function to swap characters at positions i and j in a string
strings/Move Pieces to Obtain a String.cpp:143
↓ 14 callers
Function
findPath
Tree/Step-By-Step Directions From a Binary Tree Node to Another.cpp:225
↓ 14 callers
Function
reverse
strings/Reverse Words in a String III.cpp:77
↓ 14 callers
Function
reverse
Graph/BFS_DFS/Lexicographically Smallest String After Applying Operations.cpp:178
↓ 14 callers
Function
reverseList
Linked List/Reverse Linked List.cpp:104
↓ 13 callers
Function
gcd
Helper method to calculate GCD of two numbers
Linked List/Insert Greatest Common Divisors in Linked List.cpp:111
↓ 13 callers
Function
isValid
DP/DP on Grids/Number of Paths with Max Score.cpp:313
↓ 13 callers
Function
solve
DP/Maximum Score From Grid Operations.cpp:276
↓ 12 callers
Function
bfs
O(c + n)
Graph/BFS_DFS/Power Grid Maintenance.cpp:328
↓ 12 callers
Function
checkSubIsland
BFS
Arrays/2-D Array/Count Sub Islands.cpp:176
↓ 12 callers
Method
compareTo
HashMap/Leetcode Easy/Coupon Code Validator.cpp:124
↓ 12 callers
Method
find
Graph/Disjoint Set/Maximize Spanning Tree Stability with Upgrades.cpp:26
↓ 12 callers
Function
getIntFromChar
DP/DP on Grids/Number of Paths with Max Score.cpp:309
↓ 12 callers
Function
solve
DP/Digit DP/Find Sum of Array Product of Magical Sequences.cpp:214
↓ 12 callers
Function
subsetSum
DP/Target Sum.cpp:291
↓ 11 callers
Function
Kruskal
Graph/Find Critical and Pseudo-Critical Edges in Minimum Spanning Tree.cpp:50
↓ 11 callers
Function
binarySearch
Arrays/Two Pointer/Valid Triangle Number.cpp:146
↓ 11 callers
Function
check
DP/DP on Strings/Palindromic Substrings.cpp:193
↓ 11 callers
Function
dfs
Perform DFS to check if src is a prerequisite of target
Graph/Topological Sorting/Course Schedule IV.cpp:268
↓ 11 callers
Function
find
Design/Design a Number Container System.cpp:147
↓ 11 callers
Function
insert
Arrays/Intervals_Based_Qn/Insert Interval.cpp:119
↓ 11 callers
Function
isPalindrome
Linked List/Palindrome Linked List.cpp:199
↓ 11 callers
Function
isPossible
Arrays/Binary Search/House Robber IV.cpp:128
↓ 10 callers
Function
LPS
Copy paste of KMP LPS which I taught
strings/Minimum Time to Revert Word to Initial State II.cpp:78
↓ 10 callers
Function
check
Recursion/Find the Punishment Number of an Integer.cpp:135
↓ 10 callers
Function
countSubsets
O(2^n)
Arrays/Count Number of Maximum Bitwise-OR Subsets.cpp:128
↓ 10 callers
Function
dfs
Tree/BST/Find Mode in Binary Search Tree.cpp:96
↓ 10 callers
Function
dijkstra
Graph/Dijkstra'a Based Problems/Find Edges in Shortest Paths.cpp:110
next →
1–100 of 3,557, ranked by callers