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
↓ 1 callers
Function
sorted
Time: O(n)
05. Arrays/06 Check Array Sorted/06 Check Array Sorted.cpp:5
↓ 1 callers
Function
sortedInsert
Time: O(N) Space: O(1)
11. Linked List/24 Sorted Insert in LL/24 Sorted Insert in LL.cpp:19
↓ 1 callers
Function
spiral
08. Matrix/06 Spiral Traversal/06 Spiral Traversal.cpp:4
↓ 1 callers
Function
spiral
Time: O(N) Space: O(N) W:width of tree
15. Binary Tree/19 Tree Traversal in Spiral Form/19a.cpp:21
↓ 1 callers
Function
spiral
Time: O(N) Space: O(N)
15. Binary Tree/19 Tree Traversal in Spiral Form/19b.cpp:21
↓ 1 callers
Function
split
time: O(n)
05. Arrays/29 Split Array in 3 Equal Subarrays/29 Split Array in 3 Equal Subarrays.cpp:5
↓ 1 callers
Function
sqRoot
06. Searching/06 Square Root/06b square root.cpp:4
↓ 1 callers
Function
sqRoot
06. Searching/06 Square Root/06a square root.cpp:4
↓ 1 callers
Function
stockBuy
time: O(n)
05. Arrays/15 Stock Buy and Sell/15 Stock Buy and Sell.cpp:5
↓ 1 callers
Function
subArray
Time: O(n^2)
05. Arrays/24 Find Subarray with Given Sum/24a Check Subarray with Given Sum.cpp:11
↓ 1 callers
Function
subsets
04. Recursion/12 Generate Subsets/12 Generate Subsets.cpp:12
↓ 1 callers
Function
sum
04. Recursion/08 Sum of N Natural Numbers/08 Sum of N Natural Numbers.cpp:7
↓ 1 callers
Function
sum1
01. Time and Space Analysis/01 Need of Asymptotic Analysis/code.cpp:4
↓ 1 callers
Function
sum2
01. Time and Space Analysis/01 Need of Asymptotic Analysis/code.cpp:19
↓ 1 callers
Function
sum3
01. Time and Space Analysis/01 Need of Asymptotic Analysis/code.cpp:30
↓ 1 callers
Function
sumDigits
04. Recursion/10 Sum of Digits/10 Sum of Digits using Recursion.cpp:7
↓ 1 callers
Function
threeSum
06. Searching/13 Count Triplet with Given Sum/13a count triplets with given sum.cpp:4
↓ 1 callers
Function
threeSum
two pointer approach - only applicable on sorted arrays
06. Searching/13 Count Triplet with Given Sum/13b count triplets with given sum.cpp:5
↓ 1 callers
Function
threeSum
06. Searching/11 Triplet Sum/11a triplet sum.cpp:9
↓ 1 callers
Function
threeSum
two pointer approach - only applicable on sorted arrays
06. Searching/11 Triplet Sum/11b triplet sum.cpp:10
↓ 1 callers
Function
topologicalSort
Kahn's BFS based algorithm
18. Graphs/08 Topological Sorting/08 Topological Sorting.cpp:5
↓ 1 callers
Method
topp1
12. Stacks/05 Two Stacks in an Array/05 Two Stacks in an Array.cpp:66
↓ 1 callers
Method
topp2
12. Stacks/05 Two Stacks in an Array/05 Two Stacks in an Array.cpp:78
↓ 1 callers
Function
towerOfHanoi
04. Recursion/13 Tower of Hanoi/13 Tower of Hanoi.cpp:7
↓ 1 callers
Function
trailingZeroes
time: O(n) space: O(1) not optimised to find zeros in factorial of large numbers
02. Mathematics/04 Trailing Zeroes in Factorial/04a.cpp:24
↓ 1 callers
Function
transpose
08. Matrix/04 Transpose/04a Transpose.cpp:5
↓ 1 callers
Function
transpose
08. Matrix/04 Transpose/04b Transpose.cpp:5
↓ 1 callers
Function
trapRainWater
time: O(n) space: O(n)
05. Arrays/16 Trapping Rain Water/16b Trapping Rain Water.cpp:6
↓ 1 callers
Function
trapRainWater
time: O(n) space: O(1)
05. Arrays/16 Trapping Rain Water/16c Trapping Rain Water.cpp:6
↓ 1 callers
Function
trapRainWater
time: O(n*n) space: O(1)
05. Arrays/16 Trapping Rain Water/16a Trapping Rain Water.cpp:6
↓ 1 callers
Function
twoSum
06. Searching/12 Count Pairs with Given Sum/12a count pairs with given sum.cpp:4
↓ 1 callers
Function
twoSum
06. Searching/12 Count Pairs with Given Sum/12b count pairs with given sum.cpp:4
↓ 1 callers
Function
twoSum
two pointer approach - only applicable on sorted arrays
06. Searching/10 Pair Sum/10b pair sum.cpp:10
↓ 1 callers
Function
twoSum
06. Searching/10 Pair Sum/10a pair sum.cpp:9
↓ 1 callers
Function
twoUnique
03. Bit Manipulation/06 Two Odd Occurring/06a two unique numbers.cpp:4
↓ 1 callers
Function
twoUnique
03. Bit Manipulation/06 Two Odd Occurring/06b two unique numbers.cpp:4
↓ 1 callers
Function
unionArray
09. Hashing/06 Union of Arrays/06 Union of Arrays.cpp:4
↓ 1 callers
Function
unionArrays
07. Sorting/09 Union of Two Sorted Arrays/09a Union of Two Sorted Arrays.cpp:4
↓ 1 callers
Function
unionArrays
07. Sorting/09 Union of Two Sorted Arrays/09b Union of Two Sorted Arrays.cpp:4
Method
Deque
14. Deque/02 Array Implementation of Deque/02.cpp:10
Method
Graph
constructor
18. Graphs/03 Graphs Implementation/03a Graphs Implementation.cpp:13
Method
MinHeap
17. Heaps/04 Heapify/04 Heapify.cpp:12
Method
MinHeap
17. Heaps/07 Delete/07 Delete.cpp:12
Method
MinHeap
17. Heaps/06 Decrease Key/06 Decrease Key.cpp:12
Method
MinHeap
17. Heaps/05 Extract Min/05 Extract Min.cpp:12
Method
MinHeap
17. Heaps/08 Build Heap/08 Build Heap.cpp:12
Method
MinHeap
17. Heaps/02 Implementation/02 Implementation.cpp:12
Method
MinHeap
17. Heaps/03 Insert/03 Insert.cpp:10
Method
Node
11. Linked List/11 Doubly Linked List Class/11 Doubly Linked List Class.cpp:11
Method
Node
11. Linked List/20 Insert At Tail Circular LL/20 Insert At Tail Circular LL.cpp:10
Method
Node
11. Linked List/28 Recursive Reverse of LL/28 Recursive Reverse of LL.cpp:10
Method
Node
11. Linked List/26 Find Nth Node From End Of LL/26a Find Nth Node From End Of LL.cpp:10
Method
Node
11. Linked List/26 Find Nth Node From End Of LL/26b Find Nth Node From End Of LL.cpp:10
Method
Node
11. Linked List/23 Circular Doubly Linked List/23 Circular Doubly Linked List.cpp:11
Method
Node
11. Linked List/07 Delete At Tail/07 Delete At Tail.cpp:10
Method
Node
11. Linked List/05 Insert At Tail/05 Insert At Tail.cpp:10
Method
Node
11. Linked List/12 Insert At Head Doubly LL/12 Insert At Head Doubly LL.cpp:11
Method
Node
11. Linked List/16 Delete At Tail Double LL/16 Delete At Tail Doubly LL.cpp:11
Method
Node
11. Linked List/38 Clone a LL with Random Pointer/38a Clone a LL with Random Pointer.cpp:11
Method
Node
11. Linked List/29 Remove Duplicates from Sorted LL/29 Remove Duplicates from Sorted LL.cpp:10
Method
Node
11. Linked List/40 Merge Two Sorted LL/40 Merge Two Sorted LL.cpp:10
Method
Node
11. Linked List/13 Insert At Tail Doubly LL/13 Insert At Tail Doubly LL.cpp:11
Method
Node
11. Linked List/02 Iterative Traversal/02 Iterative Traversal.cpp:10
Method
Node
11. Linked List/08 Insert At Given Position/08 Insert At Given Position.cpp:10
Method
Node
11. Linked List/31 Detect Loop/31a Detect Loop.cpp:10
Method
Node
11. Linked List/31 Detect Loop/31b Detect Loop.cpp:10
Method
Node
11. Linked List/10 Recursive Search/10 Recursive Search.cpp:10
Method
Node
11. Linked List/01 Linked List Class/01 Linked List Class.cpp:10
Method
Node
11. Linked List/18 Traversing Circular LL/18 Traversing Ciruclar LL.cpp:10
Method
Node
11. Linked List/19 Insert At Head Circular LL/19a Insert At Head Circular LL.cpp:10
Method
Node
11. Linked List/19 Insert At Head Circular LL/19b Insert At Head Circular LL.cpp:10
Method
Node
11. Linked List/21 Delete at Head Circular LL/21 Delete At Head Circular LL.cpp:10
Method
Node
11. Linked List/17 Circular Linked List Class/17 Circular Linked List Class.cpp:10
Method
Node
11. Linked List/32 Detect Loop Using Floyd Cycle Detection/32 Detect Loop Using Floyd Cycle Detection.cpp:10
Method
Node
11. Linked List/22 Delete Kth Node in Circular LL/22 Delete Kth Node in Circular LL.cpp:10
Method
Node
11. Linked List/36 Intersection Point of Two Linked Lists/36a Intersection Point of Two Linked Lists.cpp:10
Method
Node
11. Linked List/36 Intersection Point of Two Linked Lists/36b Intersection Point of Two Linked Lists.cpp:10
Method
Node
11. Linked List/06 Delete At Head/06 Delete At Head.cpp:10
Method
Node
11. Linked List/34 Delete Node With Only Pointer Given/34 Delete Node With Only Pointer Given.cpp:10
Method
Node
11. Linked List/33 Detect and Remove Loop/33 Detect and Remove Loop.cpp:10
Method
Node
11. Linked List/30 Reverse LL in group size of K/30a Reverse LL in group size of K.cpp:10
Method
Node
11. Linked List/30 Reverse LL in group size of K/30b Reverse LL in group size of K.cpp:10
Method
Node
11. Linked List/35 Seagregate Even Odd Nodes of LL/35 Segregate Even Odd Nodes of LL.cpp:10
Method
Node
11. Linked List/09 Iterative Search/09 Iterative Search.cpp:10
Method
Node
11. Linked List/25 Middle Of Linked List/25b Middle Of Linked List.cpp:10
Method
Node
11. Linked List/25 Middle Of Linked List/25a Middle Of Linked List.cpp:10
Method
Node
11. Linked List/14 Reverse Doubly LL/14 Reverse Doubly LL.cpp:11
Method
Node
11. Linked List/03 Recursive Traversal/04 Insert at Head.cpp:10
Method
Node
11. Linked List/03 Recursive Traversal/03 Recursive Traversal.cpp:10
Method
Node
11. Linked List/15 Delete At Head Doubly LL/15 Delete At Head Doubly LL.cpp:11
Method
Node
11. Linked List/24 Sorted Insert in LL/24 Sorted Insert in LL.cpp:10
Method
Node
11. Linked List/41 Palindrome Linked List/41 Palindrome Linked List.cpp:10
Method
Node
11. Linked List/37 Pairwise Node Swap of LL/37 Pairwise Node Swap of LL.cpp:10
Method
Node
11. Linked List/27 Iterative Reverse of LL/27a Iterative Reverse of LL.cpp:10
Method
Node
11. Linked List/27 Iterative Reverse of LL/27b Iterative Reverse of LL.cpp:10
Method
Node
16. Binary Search Tree/02 Insert in BST/02a Insert in BST.cpp:11
Method
Node
16. Binary Search Tree/02 Insert in BST/02b Insert in BST.cpp:11
Method
Node
16. Binary Search Tree/04 Floor in BST/04 Floor in BST.cpp:11
Method
Node
16. Binary Search Tree/03 Delete in BST/03 Delete in BST.cpp:11
Method
Node
16. Binary Search Tree/05 Ceil in BST/05 Ceil in BST.cpp:11
← previous
next →
501–600 of 1,161, ranked by callers