Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Codensity30/Strivers-A2Z-DSA-Sheet
/ functions
Functions
668 in github.com/Codensity30/Strivers-A2Z-DSA-Sheet
⨍
Functions
668
◇
Types & classes
33
↓ 1 callers
Method
unionBySize
13. Graphs/5. MST Problems/07. Making Large Island.cpp:42
↓ 1 callers
Method
unionSize
13. Graphs/5. MST Problems/05. Account Merge.cpp:38
↓ 1 callers
Method
unionSize
13. Graphs/5. MST Problems/06. Number of islands 2.cpp:66
↓ 1 callers
Function
upperbound
02.Binary Search/1D Arrays/03.Implement_lower_upper_bound.cpp:44
Function
AllPrimeFactors
QUESTION: Given a number N, find its unique prime factors in increasing order. Example: Input: N = 100 Output: 2 5 Explanation: 2 and 5 are the uniqu
06.Bit Manipulation/3. Advanced Maths/01. Prime factors of number.cpp:21
Function
BSTIterator
12. Binary Search Trees/2. Practice Problems/09. BST Iterator.cpp:29
Method
DisjointSet
13. Graphs/5. MST Problems/05. Account Merge.cpp:25
Method
DisjointSet
13. Graphs/5. MST Problems/06. Number of islands 2.cpp:55
Method
DisjointSet
13. Graphs/5. MST Problems/04. Most stones removed.cpp:46
Method
DisjointSet
13. Graphs/5. MST Problems/02. Kruskal's Algorithm.cpp:39
Method
DisjointSet
13. Graphs/5. MST Problems/03. Number of Operations to make Network.cpp:28
Method
DisjointSet
13. Graphs/5. MST Problems/07. Making Large Island.cpp:29
Function
JobScheduling
10. Greedy Approach/2. Medium/05. Job Sequencing Problem.cpp:37
Method
KthLargest
09. Heaps/3. Hard Problems/03. Kth largest element in stream.cpp:44
Method
LRUCache
07.Stack and Queues/4. Implementation/04. LRU Cache.cpp:45
Function
LongestBitonicSequence
14. Dynamic Programming/7. DP on LIS/04. Longest Bitonic Subsequence.cpp:48
Method
MinStack
07.Stack and Queues/1. Learning/07. Implement min stack.cpp:43
Method
MyQueue
07.Stack and Queues/1. Learning/02. Implement queue using array.cpp:24
Method
MyStack
07.Stack and Queues/1. Learning/01. Implement stack using array.cpp:22
Method
MyStack
07.Stack and Queues/1. Learning/05. Implement stack using linked list.cpp:26
Function
NthRoot
02.Binary Search/In Search Space/02.Nth_root_of_integer.cpp:29
Method
StackNode
07.Stack and Queues/1. Learning/05. Implement stack using linked list.cpp:20
Method
StockSpanner
07.Stack and Queues/4. Implementation/02. Stock span problem.cpp:29
Method
Trie
15. Tries/1. Theory/01. Implement Trie (Prefix Tree).cpp:36
Method
Trie
15. Tries/2. Problems/03. Count distinct subsitrings.cpp:30
Method
Trie
15. Tries/2. Problems/05. Maximum XOR of two numbers.cpp:41
Method
Trie
15. Tries/2. Problems/02. Complete String.cpp:45
Method
Trie
15. Tries/2. Problems/01. Implement Trie 2.cpp:38
Method
TrieNode
15. Tries/1. Theory/01. Implement Trie (Prefix Tree).cpp:24
Method
TrieNode
15. Tries/2. Problems/03. Count distinct subsitrings.cpp:20
Method
TrieNode
15. Tries/2. Problems/05. Maximum XOR of two numbers.cpp:30
Method
TrieNode
15. Tries/2. Problems/02. Complete String.cpp:33
Method
TrieNode
15. Tries/2. Problems/01. Implement Trie 2.cpp:25
Function
Twitter
09. Heaps/3. Hard Problems/01. Design Twitter.cpp:35
Function
accountsMerge
13. Graphs/5. MST Problems/05. Account Merge.cpp:51
Method
add
09. Heaps/3. Hard Problems/03. Kth largest element in stream.cpp:54
Function
addNode
04.Linked List/2.Doubly Linked List/02.Insert_node_in_DLL.cpp:42
Function
addNum
09. Heaps/3. Hard Problems/05. Median in a stream.cpp:35
Function
addOne
04.Linked List/3.Medium Problems of LL/12.Add_1_to_LL.cpp:32
Function
addTwoNumbers
04.Linked List/3.Medium Problems of LL/13.Add_two_LL.cpp:22
Function
arrayRankTransform
09. Heaps/2. Medium Problems/05. Arrange by rank.cpp:24
Function
arraySortedOrNot
02.Binary Search/1D Arrays/05.Check_If_array_is_sorted.cpp:34
Function
asteroidCollision
07.Stack and Queues/3. Monotonic Stack and Queue/10. Asteroids Collision.cpp:26
Function
atoi
05.Recursion/1.Get Strong Hold/01.Implement_atoi_via_recursion.cpp:61
Function
beautySum
03.Strings/2.Medium/07.Sum_of_beauty_of_all_substrings.cpp:40
Function
bellman_ford
13. Graphs/4. Shortest Path Problems/08. Bellman Ford Algorithm.cpp:30
Function
bfsOfGraph
13. Graphs/1. Learning/03. BFS.cpp:22
Function
bitManipulation
QUESTION:- Given a 32-bit unsigned integer num and an integer i, perform the following operations on the number: 1. Get the ith bit. 2. Set the ith bi
06.Bit Manipulation/1. Learn Bit Manipulation/01.Bit Manipulation.cpp:24
Method
bottomUpHeapify
09. Heaps/1. Learning/01. Implement min heap.cpp:47
Function
boundaryTraversal
11. Binary Trees/2. Medium Problems/07. Boundary Traversal.cpp:59
Function
bstFromPreorder
12. Binary Search Trees/2. Practice Problems/08. Build BST from Preorder Traversal.cpp:40
Function
buildTree
11. Binary Trees/3. Hard/09. Construct BT from inorder and postorder.cpp:42
Function
buildTree
11. Binary Trees/3. Hard/08. Construct BT from inorder and preorder.cpp:42
Function
canFinish
13. Graphs/3. Topo Sort Problems/03. Course Scheduler 1.cpp:19
Function
canJump
10. Greedy Approach/2. Medium/02. Jump Game.cpp:27
Function
canPartition
14. Dynamic Programming/4. DP on Subsequences/02. Partition array in two equal sum subsets.cpp:92
Function
candy
10. Greedy Approach/2. Medium/06. Candy.cpp:30
Function
celebrity
07.Stack and Queues/4. Implementation/03. Celebrity Problem.cpp:30
Function
change
14. Dynamic Programming/4. DP on Subsequences/09. Coin Change 2.cpp:93
Function
characterReplacement
QUESTION: You are given a string s and an integer k. You can choose any character of the string and change it to any other uppercase English character
08. Sliding Window/1. Medium Problems/04. Longest Repeating Character.cpp:24
Function
check
CODE:-
01.Arrays/1.Easy/03.Check_if_array_is_sorted_and_rotated.cpp:33
Function
checkKthBit
QUESTION: Given a number N and a bit number K, check if the Kth index bit of N is set or not. A bit is called set if it is 1. The position of the set
06.Bit Manipulation/1. Learn Bit Manipulation/02.Check for the ith bit.cpp:14
Function
checkValidString
10. Greedy Approach/1. Easy/04. Valid Parenthesis String.cpp:39
Function
climbStairs
14. Dynamic Programming/2. 1D DP/01. Climbing Stairs.cpp:49
Function
coinChange
14. Dynamic Programming/4. DP on Subsequences/07. Coin Change.cpp:99
Function
combinationSum
05.Recursion/2.Subsequences Pattern/07.Combination Sum 1.cpp:48
Function
combinationSum2
05.Recursion/2.Subsequences Pattern/08.Combination Sum 2.cpp:52
Function
combinationSum3
05.Recursion/2.Subsequences Pattern/09.Combination Sum 3.cpp:51
Function
comp
10. Greedy Approach/1. Easy/02. Fractional Knapsack.cpp:37
Function
comp
10. Greedy Approach/2. Medium/08. Non Overlapping Intervals.cpp:28
Function
comp
10. Greedy Approach/2. Medium/05. Job Sequencing Problem.cpp:33
Function
completeString
15. Tries/2. Problems/02. Complete String.cpp:76
Function
connectRopes
09. Heaps/3. Hard Problems/02. Minimum Cost to join n ropes.cpp:31
Function
constructLL
04.Linked List/1. Single Linked List/01.Intro_to_linked_list.cpp:37
Function
convertMinToMaxHeap
09. Heaps/1. Learning/03. Convert min heap to max heap.cpp:42
Function
copyRandomList
QUESTION: A linked list of length n is given such that each node contains an additional random pointer, which could point to any node in the list, or
04.Linked List/5.Hard Promblems of LL/03.Copy_LL_with_random_pointers.cpp:40
Function
countAndSay
16. Strings (Hard)/Hard/02. Count and Say.cpp:30
Function
countDistinctIslands
13. Graphs/2. Traversal Problems/10. Distinct Islands.cpp:27
Function
countDistinctSubstring
15. Tries/2. Problems/03. Count distinct subsitrings.cpp:47
Function
countGoodNumbers
05.Recursion/1.Get Strong Hold/02.Count_good_numbers.cpp:36
Function
countNodes
11. Binary Trees/3. Hard/07. Count nodes in complete binary tree.cpp:45
Function
countNodesinLoop
04.Linked List/3.Medium Problems of LL/05.Count_nodes_in_loop.cpp:51
Function
countOccurrences
02.Binary Search/1D Arrays/07.Number_of_occurences.cpp:30
Function
countPartitions
14. Dynamic Programming/4. DP on Subsequences/05. Partition with given difference.cpp:103
Function
countPaths
13. Graphs/4. Shortest Path Problems/11. Number of ways to arrive the destination with minimum distance.cpp:26
Function
countPrimes
QUESTION: Given an integer n, return the number of prime numbers that are strictly less than n. Example: Input: n = 10 Output: 4 Explanation: There a
06.Bit Manipulation/3. Advanced Maths/03. Sieve of Eratosthenes.cpp:20
Function
countSetBits
QUESTION: You are given a number N. Find the total count of set bits for all numbers from 1 to N (both inclusive). Example: Input: N = 4 Output: 5 Ex
06.Bit Manipulation/1. Learn Bit Manipulation/08.Count set bit from numbers 1 to n.cpp:21
Function
countSquares
14. Dynamic Programming/9. DP on Squares/02. Count square submatrices.cpp:52
Method
countWordsEqualTo
15. Tries/2. Problems/01. Implement Trie 2.cpp:54
Method
countWordsStartingWith
15. Tries/2. Problems/01. Implement Trie 2.cpp:65
Function
countingGraphs
13. Graphs/1. Learning/01. Count the number of graphs.cpp:15
Function
create_tree
11. Binary Trees/1. Traversals/02. Binary Tree representation.cpp:45
Function
criticalConnections
13. Graphs/6. Other Algorithms/01. Bridges in graph.cpp:42
Function
cutRod
14. Dynamic Programming/4. DP on Subsequences/11. Rod Cutting Problem.cpp:65
Function
deleteAllOccurOfX
04.Linked List/4.Medium Problems of DLL/01.Delete_nodes_from_dll.cpp:25
Function
deleteMiddle
04.Linked List/3.Medium Problems of LL/09.Delete_mid_of_LL.cpp:26
Function
deleteNode
04.Linked List/1. Single Linked List/03.Deleting_node_in_linked_list.cpp:39
Function
deleteNode
Given a doubly linked list and a position. The task is to delete a node from given position in a doubly linked list. Example 1: Input: LinkedList =
04.Linked List/2.Doubly Linked List/03.Delete_node_in_DLL.cpp:31
Function
deleteNode
12. Binary Search Trees/2. Practice Problems/04. Delete from BST.cpp:33
Method
dequeue
07.Stack and Queues/1. Learning/04. Implement queue using stacks.cpp:30
← previous
next →
201–300 of 668, ranked by callers