Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/devparthgarg/Data-Structures-and-Algorithms
/ functions
Functions
1,161 in github.com/devparthgarg/Data-Structures-and-Algorithms
⨍
Functions
1,161
◇
Types & classes
111
↓ 2 callers
Function
print
11. Linked List/16 Delete At Tail Double LL/16 Delete At Tail Doubly LL.cpp:47
↓ 2 callers
Function
print
11. Linked List/38 Clone a LL with Random Pointer/38a Clone a LL with Random Pointer.cpp:45
↓ 2 callers
Function
print
11. Linked List/29 Remove Duplicates from Sorted LL/29 Remove Duplicates from Sorted LL.cpp:45
↓ 2 callers
Function
print
11. Linked List/13 Insert At Tail Doubly LL/13 Insert At Tail Doubly LL.cpp:43
↓ 2 callers
Function
print
11. Linked List/08 Insert At Given Position/08 Insert At Given Position.cpp:55
↓ 2 callers
Function
print
11. Linked List/19 Insert At Head Circular LL/19a Insert At Head Circular LL.cpp:43
↓ 2 callers
Function
print
11. Linked List/19 Insert At Head Circular LL/19b Insert At Head Circular LL.cpp:41
↓ 2 callers
Function
print
11. Linked List/21 Delete at Head Circular LL/21 Delete At Head Circular LL.cpp:45
↓ 2 callers
Function
print
11. Linked List/22 Delete Kth Node in Circular LL/22 Delete Kth Node in Circular LL.cpp:73
↓ 2 callers
Function
print
11. Linked List/36 Intersection Point of Two Linked Lists/36a Intersection Point of Two Linked Lists.cpp:44
↓ 2 callers
Function
print
11. Linked List/36 Intersection Point of Two Linked Lists/36b Intersection Point of Two Linked Lists.cpp:53
↓ 2 callers
Function
print
11. Linked List/06 Delete At Head/06 Delete At Head.cpp:33
↓ 2 callers
Function
print
11. Linked List/34 Delete Node With Only Pointer Given/34 Delete Node With Only Pointer Given.cpp:33
↓ 2 callers
Function
print
11. Linked List/30 Reverse LL in group size of K/30a Reverse LL in group size of K.cpp:50
↓ 2 callers
Function
print
11. Linked List/30 Reverse LL in group size of K/30b Reverse LL in group size of K.cpp:50
↓ 2 callers
Function
print
11. Linked List/35 Seagregate Even Odd Nodes of LL/35 Segregate Even Odd Nodes of LL.cpp:72
↓ 2 callers
Function
print
11. Linked List/14 Reverse Doubly LL/14 Reverse Doubly LL.cpp:42
↓ 2 callers
Function
print
11. Linked List/03 Recursive Traversal/04 Insert at Head.cpp:27
↓ 2 callers
Function
print
11. Linked List/15 Delete At Head Doubly LL/15 Delete At Head Doubly LL.cpp:42
↓ 2 callers
Function
print
11. Linked List/24 Sorted Insert in LL/24 Sorted Insert in LL.cpp:47
↓ 2 callers
Function
print
11. Linked List/37 Pairwise Node Swap of LL/37 Pairwise Node Swap of LL.cpp:31
↓ 2 callers
Function
print
11. Linked List/27 Iterative Reverse of LL/27a Iterative Reverse of LL.cpp:43
↓ 2 callers
Function
print
11. Linked List/27 Iterative Reverse of LL/27b Iterative Reverse of LL.cpp:35
↓ 2 callers
Function
print
13. Queue/04_Reversing_Queue_Iterative.cpp:4
↓ 2 callers
Function
print
13. Queue/05_Reversing_Queue_Recursive.cpp:4
↓ 2 callers
Function
printPrimes
time: O(n*log(log(n))) space: O(1) Sieve Method
02. Mathematics/10 Sieve of Eratosthenes/10b.cpp:12
↓ 2 callers
Function
printPrimes
time: O(n*sqrt(n)) space: O(1)
02. Mathematics/10 Sieve of Eratosthenes/10a.cpp:39
↓ 2 callers
Function
printPrimes
time: O(n*log(log(n))) space: O(1) Sieve Method Much More Optimised and Code Length Reduced
02. Mathematics/10 Sieve of Eratosthenes/10d.cpp:12
↓ 2 callers
Function
printPrimes
time: O(n*log(log(n))) space: O(1) Sieve Method More Optimised
02. Mathematics/10 Sieve of Eratosthenes/10c.cpp:12
↓ 2 callers
Method
push2
12. Stacks/05 Two Stacks in an Array/05 Two Stacks in an Array.cpp:33
↓ 2 callers
Function
reverse
13. Queue/04_Reversing_Queue_Iterative.cpp:14
↓ 2 callers
Method
size
12. Stacks/02 Implementation/02c Implementation using Linked List.cpp:62
↓ 2 callers
Method
top
12. Stacks/02 Implementation/02c Implementation using Linked List.cpp:51
↓ 2 callers
Method
top
12. Stacks/02 Implementation/02b Implementation using Vectors.cpp:24
↓ 2 callers
Function
trailingZeroes
time: O(log5(n)) space: O(1) optimised
02. Mathematics/04 Trailing Zeroes in Factorial/04b.cpp:12
↓ 1 callers
Function
BTtoDLL
15. Binary Tree/17 Convert Binary Tree to Doubly Linked List/17.cpp:40
↓ 1 callers
Function
LCA
Time: O(N) space: O(H)
15. Binary Tree/21 LCA of Binary Tree/21b.cpp:21
↓ 1 callers
Function
LCA
Time: O(N) space: O(N)
15. Binary Tree/21 LCA of Binary Tree/21a.cpp:45
↓ 1 callers
Function
NthNode
Time: O(N) Space: O(1)
11. Linked List/26 Find Nth Node From End Of LL/26a Find Nth Node From End Of LL.cpp:19
↓ 1 callers
Function
NthNode
Time: O(N) Space: O(1)
11. Linked List/26 Find Nth Node From End Of LL/26b Find Nth Node From End Of LL.cpp:19
↓ 1 callers
Function
activitySelection
time: O(n*logn) space: O(1)
19. Greedy Algorithms/02 Activity Selection/02 Activity Selection.cpp:6
↓ 1 callers
Function
allocatePages
06. Searching/17 Allocate Minimum Pages/17.cpp:34
↓ 1 callers
Function
balancedTree
Time: O(N) Space: O(H)
15. Binary Tree/15 Check for Balanced Binary Tree/15b.cpp:29
↓ 1 callers
Function
balancedTree
Time: O(N*N) Space: O(LogN)
15. Binary Tree/15 Check for Balanced Binary Tree/15a.cpp:39
↓ 1 callers
Function
bfs
find number of islands problem or find number of connected components
18. Graphs/04 Breadth First Search/04c Breadth First Search.cpp:5
↓ 1 callers
Function
bfs
given undirected graph with source vertex print BFS
18. Graphs/04 Breadth First Search/04a Breadth First Search.cpp:5
↓ 1 callers
Function
bfs
no source given and graph mey be disconnected
18. Graphs/04 Breadth First Search/04b Breadth First Search.cpp:5
↓ 1 callers
Function
bfsCon
18. Graphs/04 Breadth First Search/04c Breadth First Search.cpp:27
↓ 1 callers
Function
bfsDis
18. Graphs/04 Breadth First Search/04b Breadth First Search.cpp:29
↓ 1 callers
Function
binarySearch
time: O(logn)
06. Searching/01 Binary Search/01a.cpp:5
↓ 1 callers
Function
binarySearch
time: O(logn) space: O(logn)
06. Searching/01 Binary Search/01b.cpp:6
↓ 1 callers
Function
binarySearch
06. Searching/07 Search in Infinite Sized Array/07b search in infinite sorted array.cpp:4
↓ 1 callers
Function
bonacciseries
time: O(m)
05. Arrays/25 N-Bonnaci Number/25 N-Bonnaci Number.cpp:5
↓ 1 callers
Function
boundaryTraversal
08. Matrix/03 Boundary Traversal/03 Boundary Traversal.cpp:5
↓ 1 callers
Function
bubbleSort
time: O(n*n) space: O(1)
07. Sorting/03 Bubble Sort/03a Bubble Sort.cpp:12
↓ 1 callers
Function
bubbleSort
time: O(n*n) space: O(1)
07. Sorting/03 Bubble Sort/03b Bubble Sort Optimized.cpp:6
↓ 1 callers
Function
buildheap
17. Heaps/09 Heap Sort/09 Heap Sort.cpp:22
↓ 1 callers
Function
burnTree
15. Binary Tree/22 Burn Binary Tree from Leaf/22.cpp:21
↓ 1 callers
Function
ceil
Iterative Implementation Time: O(logN) Space: O(1)
16. Binary Search Tree/05 Ceil in BST/05 Ceil in BST.cpp:29
↓ 1 callers
Function
check
20. Backtracking/01 Print Permutations of Strings with Given Condition/01b Print Permutations of Strings with Given Condition.cpp:9
↓ 1 callers
Function
checkSubarray0Sum
time: O(n) space: O(n)
05. Arrays/30 Check if Subarray with Zero Sum/30 Check if Subarray with Zero sum.cpp:6
↓ 1 callers
Function
childrenSum
Time: O(N) Space: O(H)
15. Binary Tree/14 Children Sum Property/14.cpp:34
↓ 1 callers
Function
circularTour
time: O(N*N) space: O(1)
14. Deque/06 First Circular Tour/06a.cpp:17
↓ 1 callers
Function
circularTour
time: O(N) space: O(1)
14. Deque/06 First Circular Tour/06b.cpp:17
↓ 1 callers
Function
clone
Time: O(N) Space: O(N)
11. Linked List/38 Clone a LL with Random Pointer/38a Clone a LL with Random Pointer.cpp:21
↓ 1 callers
Function
coinChange
Memoization
21. Dynamic Programming/04 Coin Change/04b Coin Change.cpp:7
↓ 1 callers
Function
coinChange
Tabulation
21. Dynamic Programming/04 Coin Change/04c Coin Change.cpp:5
↓ 1 callers
Function
coinChange
Recursion
21. Dynamic Programming/04 Coin Change/04a Coin Change.cpp:5
↓ 1 callers
Function
count
Time: O(N) Space: O(H)
15. Binary Tree/23 Count Nodes in Complete Binary Tree/23a.cpp:28
↓ 1 callers
Function
count
Time: O(LogN*logN) Space: O(H)
15. Binary Tree/23 Count Nodes in Complete Binary Tree/23b.cpp:28
↓ 1 callers
Function
count1s
time: O(n)
06. Searching/05 Count 1s in Sorted Binary Array/05a.cpp:5
↓ 1 callers
Function
count1s
06. Searching/05 Count 1s in Sorted Binary Array/05b.cpp:11
↓ 1 callers
Function
countAndMerge
07. Sorting/10 Count Inversions in Array/10b count inversions in array.cpp:4
↓ 1 callers
Function
countDigits
time: O(log10(n)) space: O(1)
02. Mathematics/01 Count Digits/01.cpp:10
↓ 1 callers
Function
countDistinct
09. Hashing/03 Count Distinct/03b Count Distinct.cpp:4
↓ 1 callers
Function
countDistinct
09. Hashing/03 Count Distinct/03a Count Distinct.cpp:4
↓ 1 callers
Function
countInversions
07. Sorting/10 Count Inversions in Array/10b count inversions in array.cpp:57
↓ 1 callers
Function
countInversions
07. Sorting/10 Count Inversions in Array/10a count inversions in array.cpp:6
↓ 1 callers
Function
countOccurrence
time: O(logn)
06. Searching/04 Count Occurrences/04b.cpp:73
↓ 1 callers
Function
countOccurrence
time: O(n)
06. Searching/04 Count Occurrences/04a.cpp:5
↓ 1 callers
Function
countSubset
04. Recursion/15 Subset Sum Problem/15 Subset Sum Problem.cpp:4
↓ 1 callers
Function
del
Time: O(n) delete at begin Time: O(1) delete at end
05. Arrays/03 Delete/03 Delete.cpp:6
↓ 1 callers
Function
del
16. Binary Search Tree/03 Delete in BST/03 Delete in BST.cpp:35
↓ 1 callers
Method
delMax
14. Deque/04 Data Structure with Min Max Operation/04.cpp:44
↓ 1 callers
Method
delMin
14. Deque/04 Data Structure with Min Max Operation/04.cpp:39
↓ 1 callers
Function
deleteAtHead
Time: O(N) Space: O(1)
11. Linked List/21 Delete at Head Circular LL/21 Delete At Head Circular LL.cpp:19
↓ 1 callers
Function
deleteAtHead
11. Linked List/22 Delete Kth Node in Circular LL/22 Delete Kth Node in Circular LL.cpp:17
↓ 1 callers
Function
deleteAtHead
Time: O(1) Space: O(1)
11. Linked List/06 Delete At Head/06 Delete At Head.cpp:19
↓ 1 callers
Function
deleteAtHead
Time: O(1) Space: O(1)
11. Linked List/15 Delete At Head Doubly LL/15 Delete At Head Doubly LL.cpp:21
↓ 1 callers
Function
deleteAtTail
Time: O(N) Space: O(1)
11. Linked List/07 Delete At Tail/07 Delete At Tail.cpp:19
↓ 1 callers
Function
deleteAtTail
Time: O(N) Space: O(1)
11. Linked List/16 Delete At Tail Double LL/16 Delete At Tail Doubly LL.cpp:21
↓ 1 callers
Function
deleteKthNode
Time: O(N) Space: O(1)
11. Linked List/22 Delete Kth Node in Circular LL/22 Delete Kth Node in Circular LL.cpp:45
↓ 1 callers
Function
deleteNode
Time: O(1) Space: O(1)
11. Linked List/34 Delete Node With Only Pointer Given/34 Delete Node With Only Pointer Given.cpp:19
↓ 1 callers
Function
deserialize
Time: O(N) space: O(N)
15. Binary Tree/24 Serialize and Deserialize Binary Tree/24.cpp:41
↓ 1 callers
Function
detectLoop
Time: O(N) Space: O(N)
11. Linked List/31 Detect Loop/31a Detect Loop.cpp:19
↓ 1 callers
Function
detectLoop
Time: O(N) Space: O(1)
11. Linked List/31 Detect Loop/31b Detect Loop.cpp:24
↓ 1 callers
Function
detectLoop
Time: O(N) Space: O(1)
11. Linked List/32 Detect Loop Using Floyd Cycle Detection/32 Detect Loop Using Floyd Cycle Detection.cpp:19
↓ 1 callers
Function
dfs
sorce given and graph may be disconnected
18. Graphs/05 Depth First Search/05b Depth First Search.cpp:19
↓ 1 callers
Function
dfs
count number of connected components
18. Graphs/05 Depth First Search/05c Depth First Search.cpp:18
↓ 1 callers
Function
dfs
given undirected graph with source vertex print DFS
18. Graphs/05 Depth First Search/05a Depth First Search.cpp:19
← previous
next →
101–200 of 1,161, ranked by callers