MCPcopy Create free account

hub / github.com/devparthgarg/Data-Structures-and-Algorithms / functions

Functions1,161 in github.com/devparthgarg/Data-Structures-and-Algorithms

↓ 99 callersMethodsize
13. Queue/03_Implement_Stack_using_Queue.cpp:52
↓ 82 callersMethodpush
13. Queue/03_Implement_Stack_using_Queue.cpp:15
↓ 46 callersMethodempty
12. Stacks/02 Implementation/02a Implementation using Arrays.cpp:54
↓ 46 callersMethodinsert
17. Heaps/07 Delete/07 Delete.cpp:34
↓ 38 callersMethodpop
13. Queue/03_Implement_Stack_using_Queue.cpp:31
↓ 23 callersMethodpush
12. Stacks/06 K Stacks in an Array/06 K Stacks in an Array.cpp:43
↓ 20 callersMethodtop
13. Queue/03_Implement_Stack_using_Queue.cpp:42
↓ 13 callersFunctionmin
21. Dynamic Programming/05 Edit Distance/05a Edit Distance.cpp:4
↓ 13 callersMethodpop
12. Stacks/06 K Stacks in an Array/06 K Stacks in an Array.cpp:58
↓ 12 callersMethodtop
12. Stacks/02 Implementation/02a Implementation using Arrays.cpp:39
↓ 10 callersMethodtop
12. Stacks/12 Design Stack with getMin in O(1)/12b Design Stack with getMin in O(1).cpp:40
↓ 9 callersFunctionaddEdge
18. Graphs/04 Breadth First Search/04c Breadth First Search.cpp:45
↓ 9 callersMethodpush
12. Stacks/02 Implementation/02a Implementation using Arrays.cpp:18
↓ 8 callersMethodpush
12. Stacks/02 Implementation/02c Implementation using Linked List.cpp:29
↓ 8 callersMethodpush
12. Stacks/02 Implementation/02b Implementation using Vectors.cpp:14
↓ 8 callersMethodsize
12. Stacks/02 Implementation/02a Implementation using Arrays.cpp:49
↓ 7 callersFunctionaddEdge
18. Graphs/04 Breadth First Search/04a Breadth First Search.cpp:32
↓ 7 callersFunctionaddEdge
18. Graphs/04 Breadth First Search/04b Breadth First Search.cpp:44
↓ 7 callersMethodpop
12. Stacks/02 Implementation/02a Implementation using Arrays.cpp:29
↓ 6 callersFunctionaddEdge
18. Graphs/05 Depth First Search/05a Depth First Search.cpp:27
↓ 6 callersMethodpop
12. Stacks/02 Implementation/02c Implementation using Linked List.cpp:37
↓ 6 callersMethodpop
12. Stacks/02 Implementation/02b Implementation using Vectors.cpp:19
↓ 5 callersFunctionaddEdge
18. Graphs/06 Shortest Path in Unweighted Graph/06 Shortest Path in Unweighted Graph.cpp:32
↓ 5 callersFunctionaddEdge
18. Graphs/08 Topological Sorting/08 Topological Sorting.cpp:44
↓ 5 callersMethodaddEdge
add edge
18. Graphs/03 Graphs Implementation/03a Graphs Implementation.cpp:30
↓ 5 callersFunctionisEmpty
22. Trie/03 Trie Delete.cpp:20
↓ 5 callersFunctionprint
16. Binary Search Tree/09 Set STL/09a Set STL.cpp:4
↓ 5 callersMethodtop
12. Stacks/12 Design Stack with getMin in O(1)/12a Design Stack with getMin in O(1).cpp:40
↓ 4 callersFunctionaddEdge
Adjacency List
18. Graphs/03 Graphs Implementation/03b Graphs Implementation.cpp:5
↓ 4 callersFunctionaddEdge
18. Graphs/05 Depth First Search/05b Depth First Search.cpp:33
↓ 4 callersFunctionaddEdge
18. Graphs/05 Depth First Search/05c Depth First Search.cpp:36
↓ 4 callersMethodgetMin
12. Stacks/12 Design Stack with getMin in O(1)/12b Design Stack with getMin in O(1).cpp:45
↓ 4 callersMethodgetMin
12. Stacks/12 Design Stack with getMin in O(1)/12a Design Stack with getMin in O(1).cpp:45
↓ 4 callersMethodpop
12. Stacks/12 Design Stack with getMin in O(1)/12b Design Stack with getMin in O(1).cpp:30
↓ 4 callersFunctionprint
14. Deque/03 Deque STL/03.cpp:4
↓ 4 callersMethodprint
14. Deque/04 Data Structure with Min Max Operation/04.cpp:49
↓ 4 callersMethodpush
12. Stacks/12 Design Stack with getMin in O(1)/12b Design Stack with getMin in O(1).cpp:13
↓ 4 callersFunctionreverse
10. Strings/13 Reverse Words in String/13b Reverse Words in String.cpp:4
↓ 3 callersFunctiongetSum
time: O(n*q) q: number of queries
05. Arrays/26 Find Query Sum/26a Find Query Sum.cpp:5
↓ 3 callersFunctiongetSum
time: O(1) (only time is taken by pre computation which is O(n))
05. Arrays/26 Find Query Sum/26b Find Query Sum.cpp:17
↓ 3 callersMethodinsertMax
14. Deque/04 Data Structure with Min Max Operation/04.cpp:24
↓ 3 callersMethodinsertMin
14. Deque/04 Data Structure with Min Max Operation/04.cpp:19
↓ 3 callersFunctionkthBit
Time: O(1)
03. Bit Manipulation/02 Check Kth Bit/02a check kth bit.cpp:9
↓ 3 callersFunctionkthBit
Time: O(1)
03. Bit Manipulation/02 Check Kth Bit/02b check kth bit.cpp:9
↓ 3 callersFunctionprint
11. Linked List/40 Merge Two Sorted LL/40 Merge Two Sorted LL.cpp:53
↓ 3 callersMethodpush
12. Stacks/12 Design Stack with getMin in O(1)/12a Design Stack with getMin in O(1).cpp:13
↓ 3 callersMethodpush1
12. Stacks/05 Two Stacks in an Array/05 Two Stacks in an Array.cpp:24
↓ 3 callersFunctionreverse
05. Arrays/11 Left Rotate Array by D Spaces/11c Left Rotate Array by D Spaces.cpp:4
↓ 3 callersMethodsize
12. Stacks/02 Implementation/02b Implementation using Vectors.cpp:29
↓ 2 callersFunctiondisplay
07. Sorting/13 Lomuto Partition/13b Lomuto Partitioning.cpp:27
↓ 2 callersFunctiondisplay
07. Sorting/13 Lomuto Partition/13a Lomuto Partitioning.cpp:24
↓ 2 callersFunctiondisplay
07. Sorting/12 Naive Partition/12 Naive Partitioning.cpp:47
↓ 2 callersFunctiondisplay
07. Sorting/15 Quick Sort/15b Quick Sort using Lomuto Partition.cpp:37
↓ 2 callersFunctiondisplay
07. Sorting/15 Quick Sort/15c Quick Sort using Hoare Partition.cpp:45
↓ 2 callersFunctiondisplay
07. Sorting/05 Insertion Sort/05 Insertion Sort.cpp:28
↓ 2 callersFunctiondisplay
07. Sorting/03 Bubble Sort/03a Bubble Sort.cpp:26
↓ 2 callersFunctiondisplay
07. Sorting/03 Bubble Sort/03b Bubble Sort Optimized.cpp:26
↓ 2 callersFunctiondisplay
07. Sorting/14 Hoare Partition/14a Hoare Partition.cpp:33
↓ 2 callersFunctiondisplay
07. Sorting/14 Hoare Partition/14b Hoare Partition.cpp:35
↓ 2 callersFunctiondisplay
07. Sorting/04 Selection Sort/04 Selection Sort.cpp:33
↓ 2 callersFunctiondisplay
05. Arrays/08 Remove Duplicates from Sorted Array/08 Remove Duplicates from Sorted Array.cpp:20
↓ 2 callersFunctiondisplay
05. Arrays/11 Left Rotate Array by D Spaces/11b Left Rotate Array by D Spaces.cpp:31
↓ 2 callersFunctiondisplay
05. Arrays/11 Left Rotate Array by D Spaces/11a Left Rotate Array by D Spaces.cpp:19
↓ 2 callersFunctiondisplay
05. Arrays/11 Left Rotate Array by D Spaces/11c Left Rotate Array by D Spaces.cpp:31
↓ 2 callersFunctiondisplay
05. Arrays/10 Left Rotate Array by One/10 Left Rotate Array by One.cpp:15
↓ 2 callersFunctiondisplay
05. Arrays/02 Insert/02 Insert.cpp:18
↓ 2 callersFunctiondisplay
05. Arrays/07 Reverse Array/07 Reverse Array.cpp:22
↓ 2 callersFunctiondisplay
05. Arrays/03 Delete/03 Delete.cpp:32
↓ 2 callersFunctiondisplay
05. Arrays/09 Move Zeros to End/09a Move Zero to End.cpp:23
↓ 2 callersFunctiondisplay
05. Arrays/09 Move Zeros to End/09b Move Zero to End.cpp:18
↓ 2 callersFunctiondisplay
08. Matrix/05 Rotate/05 Rotate.cpp:31
↓ 2 callersFunctiondivisors
time: O(sqrt(n)) space: O(1) order is not disturbed
02. Mathematics/09 Divisors of a Number/09c.cpp:12
↓ 2 callersFunctiondivisors
time: O(sqrt(n)) space: O(1) order is disturbed
02. Mathematics/09 Divisors of a Number/09b.cpp:12
↓ 2 callersFunctiondivisors
time: O(n) space: O(1)
02. Mathematics/09 Divisors of a Number/09a.cpp:11
↓ 2 callersFunctionfloor
Iterative Implementation Time: O(logN) Space: O(1)
16. Binary Search Tree/04 Floor in BST/04 Floor in BST.cpp:29
↓ 2 callersFunctionhcf
time: O(min(a,b)) space: O(1)
02. Mathematics/05 GCD or HCF of two Numbers/05a.cpp:21
↓ 2 callersFunctionhcf
time: O(min(a,b)) space: O(1)
02. Mathematics/05 GCD or HCF of two Numbers/05b.cpp:31
↓ 2 callersFunctionhcf
time: O(log(min(a,b))) space: O(log(min(a,b))) optimised Euclid's Algo
02. Mathematics/05 GCD or HCF of two Numbers/05c.cpp:32
↓ 2 callersFunctionheapify
17. Heaps/09 Heap Sort/09 Heap Sort.cpp:4
↓ 2 callersFunctionheight
15. Binary Tree/15 Check for Balanced Binary Tree/15a.cpp:19
↓ 2 callersFunctionisSame
10. Strings/15 Anagram Search/15b Anagram Search.cpp:4
↓ 2 callersFunctionkadane
05. Arrays/20 Max Circular Subarray Sum/20b Max Circular Subarray Sum.cpp:4
↓ 2 callersFunctionlcm
time: O(a*b) space: O(1)
02. Mathematics/06 LCM of two Numbers/06a.cpp:15
↓ 2 callersFunctionlcm
time: O(log(min(a,b))) space: O(log(min(a,b)))
02. Mathematics/06 LCM of two Numbers/06b.cpp:20
↓ 2 callersFunctionpath
15. Binary Tree/21 LCA of Binary Tree/21a.cpp:19
↓ 2 callersMethodpop
12. Stacks/12 Design Stack with getMin in O(1)/12a Design Stack with getMin in O(1).cpp:30
↓ 2 callersFunctionpower
time: O(n) space: O(1)
02. Mathematics/11 Computing Power/11a.cpp:10
↓ 2 callersFunctionpower
time: O(log(n)) space: O(logn(n))
02. Mathematics/11 Computing Power/11b.cpp:10
↓ 2 callersFunctionpower
02. Mathematics/12 Iterative Power/12c.cpp:13
↓ 2 callersFunctionpower
time: O(log(n)) space: O(1) optimised solution using bitwise operators
02. Mathematics/12 Iterative Power/12b.cpp:11
↓ 2 callersFunctionpower
time: O(log(n)) space: O(1)
02. Mathematics/12 Iterative Power/12a.cpp:10
↓ 2 callersFunctionprimeFactors
time: O(n*sqrt(n)) space: O(1)
02. Mathematics/08 Prime Factors/08a.cpp:39
↓ 2 callersFunctionprimeFactors
time: O(sqrt(n)) space: O(1)
02. Mathematics/08 Prime Factors/08b.cpp:11
↓ 2 callersFunctionprimeFactors
time: O(sqrt(n)) space: O(1) efficient for large values of n
02. Mathematics/08 Prime Factors/08c.cpp:12
↓ 2 callersFunctionprint
11. Linked List/20 Insert At Tail Circular LL/20 Insert At Tail Circular LL.cpp:43
↓ 2 callersFunctionprint
11. Linked List/28 Recursive Reverse of LL/28 Recursive Reverse of LL.cpp:32
↓ 2 callersFunctionprint
11. Linked List/23 Circular Doubly Linked List/23 Circular Doubly Linked List.cpp:40
↓ 2 callersFunctionprint
11. Linked List/07 Delete At Tail/07 Delete At Tail.cpp:46
↓ 2 callersFunctionprint
11. Linked List/05 Insert At Tail/05 Insert At Tail.cpp:42
↓ 2 callersFunctionprint
11. Linked List/12 Insert At Head Doubly LL/12 Insert At Head Doubly LL.cpp:36
next →1–100 of 1,161, ranked by callers