Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/devweekends/DW-Fellowship-DSA-Roadmap
/ functions
Functions
315 in github.com/devweekends/DW-Fellowship-DSA-Roadmap
⨍
Functions
315
◇
Types & classes
140
Method
dfs
Level 1/Week 12/Graph/695. Max Area of Island/code.cpp:45
Method
dfs
Level 1/Week 12/Graph/133. Clone Graph/code.cpp:53
Method
diameterOfBinaryTree
Level 0/8 Trees/01. 0543-diameter-of-binary-tree/code.cpp:37
Method
evalRPN
Level 1/Week 06/Stack/150. Evaluate Reverse Polish Notation/code.cpp:25
Function
even
------------------------------------------ 🔹 Approach 1: Modulo Operator (%) - If a number divided by 2 has no remainder, it is even. - Classic and
Common/Math/Even/even_number.cpp:12
Function
even_bitwise
------------------------------------------ 🔹 Approach 2: Bitwise AND Operator (&) - Binary trick: even numbers have 0 as the last bit. - Checking (n &
Common/Math/Even/even_number.cpp:24
Function
even_division
------------------------------------------ 🔹 Approach 3: Integer Division Trick - Divide the number by 2 and multiply it back. - If the result equals
Common/Math/Even/even_number.cpp:36
Function
even_recursive
------------------------------------------ 🔹 Approach 4: Recursive Method - Subtract 2 recursively until 0 or 1. - Base Case: 0 = even, 1 = odd. - Gre
Common/Math/Even/even_number.cpp:48
Method
exist
Level 1/Week 10/Backtracking/79. Word Search/code.cpp:23
Function
factorial
Level 1/Week 04/Recursion/Factorial of a Number/code.cpp:21
Function
fib
Level 1/Week 04/Recursion/Fibonacci Number (Nth Term)/code.cpp:27
Method
fib
Main function - using the most optimal approach
Level 1/Week 11/Dynamic Programming/509. Fibonacci Number/code.cpp:64
Method
fibMemo
Approach 2: Memoization (Top-Down DP) Time: O(n), Space: O(n) - memoization table + recursion stack
Level 1/Week 11/Dynamic Programming/509. Fibonacci Number/code.cpp:23
Method
fibMemoHelper
Level 1/Week 11/Dynamic Programming/509. Fibonacci Number/code.cpp:29
Method
fibOptimized
Approach 4: Space Optimization Time: O(n), Space: O(1) - only two variables
Level 1/Week 11/Dynamic Programming/509. Fibonacci Number/code.cpp:52
Method
fibRecursion
Approach 1: Recursion (Brute Force) Time: O(2^n), Space: O(n) - recursion stack
Level 1/Week 11/Dynamic Programming/509. Fibonacci Number/code.cpp:16
Method
fibTabulation
Approach 3: Tabulation (Bottom-Up DP) Time: O(n), Space: O(n) - DP array
Level 1/Week 11/Dynamic Programming/509. Fibonacci Number/code.cpp:39
Method
findDuplicate
Level 1/Week 02/2 pointers/287. Find the Duplicate Number/code.cpp:16
Method
findMax
Helper to find the maximum element in the array
Level 0/9 Modified Binary Search/08. 0907-koko-eating-bananas/0907-koko-eating-bananas.cpp:3
Method
findMax
Level 1/Week 05/Modified Binary Search/875. Koko Eating Bananas/code.cpp:42
Method
findMaxAverage
Level 1/Week 02/Sliding windows/643. Maximum Average Subarray I/code.cpp:18
Method
findMaximizedCapital
Level 1/Week 07/K way merge [Heaps]/IPO/code.cpp:21
Method
findMedian
Level 1/Week 07/K way merge [Heaps]/Find Median from Data Stream/code.cpp:35
Method
findMedianSortedArrays
Level 1/Week 05/Modified Binary Search/4. Median of Two Sorted Arrays/code.cpp:54
Method
findMiddle
Helper function to find the middle of the list
Level 1/Week 10/Recursion/148. Sort List/code.cpp:50
Method
findMin
Level 0/9 Modified Binary Search/03. 0153-find-minimum-in-rotated-sorted-array/0153-find-minimum-in-rotated-sorted-array.cpp:3
Method
findMin
Level 1/Week 05/Modified Binary Search/153. Find Minimum in Rotated Sorted Array/code.cpp:35
Method
findOrder
Level 1/Week 12/Graph/210. Course Schedule II/code.cpp:21
Method
findPeakElement
Level 0/9 Modified Binary Search/06. 0162-find-peak-element/0162-find-peak-element.cpp:3
Method
findRedundantConnection
Level 1/Week 12/Graph/684. Redundant Connection/code.cpp:21
Method
fourSum
Level 1/Week 02/2 pointers/18. 4Sum/code.cpp:32
Method
generateParenthesis
Level 1/Week 06/Stack/22. Generate Parentheses/code.cpp:27
Method
getMin
Level 1/Week 06/Stack/155. Min Stack/code.cpp:51
Method
goodNodes
Level 0/8 Trees/06. 1448-count-good-nodes-in-binary-tree/code.cpp:35
Method
groupAnagrams
Level 1/Week 01/Arrays & Hashing/49. Group Anagrams/code.cpp:26
Method
hasCycle
Level 1/Week 03/LinkedList/141. Linked List Cycle/code.cpp:21
Method
hasCycle
Level 1/Week 12/Graph/210. Course Schedule II/code.cpp:47
Method
hasCycle
Level 1/Week 12/Graph/207. Course Schedule/code.cpp:44
Method
helper
Level 1/Week 04/Trees/105. Construct Binary Tree from Preorder and Inorder Traversal/code.cpp:47
Method
inorder
Inorder traversal to find kth smallest element
Level 0/8 Trees/08. 0230-kth-smallest-element-in-a-bst/code.cpp:19
Method
inorder
Level 1/Week 04/Trees/230. Kth Smallest Element in a BST/code.cpp:35
Method
invert
Level 1/Week 04/Trees/226. Invert Binary Tree/code.cpp:28
Method
invertTree
Level 1/Week 04/Trees/226. Invert Binary Tree/code.cpp:39
Method
isAnagram
Level 1/Week 01/Arrays & Hashing/242. Valid Anagram/code.cpp:24
Function
isArmstrong
------------------------------------------ 🔹 Approach 1: Iterative with Full If-Else - Extracts each digit - Cubes it and adds to sum - Compares sum t
Common/Math/Armstrog Number/Armstrong.cpp:13
Function
isArmstrong1
Common/Math/Armstrog Number/Armstrong.cpp:61
Function
isArmstrong2
Common/Math/Armstrog Number/Armstrong.cpp:76
Function
isArmstrong3
Common/Math/Armstrog Number/Armstrong.cpp:96
Method
isBalanced
Level 1/Week 04/Trees/110. Balanced Binary Tree/code.cpp:44
Method
isPalindrome
Helper function to check if a substring is palindrome
Level 0/10 Backtracking/06. 0131-palindrome-partitioning/code.cpp:6
Method
isPalindrome
Level 1/Week 04/Recursion/Check if a Number is a Palindrome/code.cpp:80
Method
isPalindrome
Helper function to check if a substring is a palindrome
Level 1/Week 10/Backtracking/131. Palindrome Partitioning/code.cpp:55
Function
isPalindromeArray1
🔸 Approach 1: Two-Pointer Technique
Common/Math/Palindrome/palindrome.cpp:46
Function
isPalindromeArray2
🔸 Approach 2: Reverse and Compare
Common/Math/Palindrome/palindrome.cpp:56
Function
isPalindromeArray3
Common/Math/Palindrome/palindrome.cpp:68
Function
isPalindromeArray4
🔸 Approach 4: Compare First Half with Second Half
Common/Math/Palindrome/palindrome.cpp:73
Function
isPalindromeNumber1
🔸 Approach 1: Reverse Integer and Compare
Common/Math/Palindrome/palindrome.cpp:5
Function
isPalindromeNumber2
🔸 Approach 2: String-Based Two Pointers
Common/Math/Palindrome/palindrome.cpp:16
Function
isPalindromeNumber3
Common/Math/Palindrome/palindrome.cpp:35
Function
isPrimeBruteForce
--------------------------------------------------- 🔸 Approach 1: Brute Force - Check all numbers from 2 to n-1 - If any divides n evenly, it is not p
Common/Math/Prime/prime_number.cpp:12
Function
isPrimeOptimized
--------------------------------------------------- 🔸 Approach 2: Optimized Check (Up to √n) - If n has a factor larger than √n, then it must have o
Common/Math/Prime/prime_number.cpp:30
Function
isPrimeRecursive
Helper function with divisor `i`
Common/Math/Prime/prime_number.cpp:49
Method
isSafe
Check if it's safe to place a queen at (row, col)
Level 1/Week 10/Backtracking/51. N-Queens/code.cpp:67
Method
isSameTree
Helper function to check if two trees are identical
Level 0/8 Trees/02. 0572-subtree-of-another-tree/code.cpp:16
Method
isSubtree
Level 0/8 Trees/02. 0572-subtree-of-another-tree/code.cpp:34
Method
isValid
Helper function to check if placing queen at (row, col) is valid
Level 0/10 Backtracking/08. 0051-n-queens/code.cpp:6
Method
isValid
Level 1/Week 06/Stack/20. Valid Parentheses/code.cpp:17
Method
isValidBST
Level 0/8 Trees/07. 0098-validate-binary-search-tree/code.cpp:33
Method
isValidBST
Level 1/Week 04/Trees/98. Validate Binary Search Tree/code.cpp:44
Method
isValidBSTHelper
Helper function to check if tree is valid BST within given range
Level 0/8 Trees/07. 0098-validate-binary-search-tree/code.cpp:16
Method
isValidSudoku
Level 1/Week 01/Arrays & Hashing/36. Valid Sudoku/code.cpp:30
Method
jump
Level 1/Week 09/Greedy/45. Jump Game II/code.cpp:24
Method
kthSmallest
Level 0/8 Trees/08. 0230-kth-smallest-element-in-a-bst/code.cpp:39
Method
kthSmallest
Level 1/Week 04/Trees/230. Kth Smallest Element in a BST/code.cpp:49
Method
ladderLength
Level 1/Week 12/Graph/127. Word Ladder/code.cpp:24
Method
largestRectangleArea
Level 1/Week 06/Stack/84. Largest Rectangle in Histogram/code.cpp:33
Method
lastStoneWeight
Level 1/Week 07/K way merge [Heaps]/1046. Last Stone Weight/code.cpp:22
Method
lengthOfLongestSubstring
Level 1/Week 02/Sliding windows/3. Longest Substring Without Repeating Characters/code.cpp:19
Method
letterCombinations
Level 0/10 Backtracking/07. 0017-letter-combinations-of-a-phone-number/code.cpp:35
Method
letterCombinations
Level 1/Week 10/Backtracking/17. Letter Combinations of a Phone Number/code.cpp:23
Method
levelOrder
Level 0/8 Trees/04. 0102-binary-tree-level-order-traversal/code.cpp:15
Method
levelOrder
Level 1/Week 04/Trees/102. Binary Tree Level Order Traversal/code.cpp:51
Method
levelOrder1
Level 1/Week 04/Trees/102. Binary Tree Level Order Traversal/code.cpp:30
Method
longestConsecutive
Level 1/Week 01/Arrays & Hashing/128. Longest Consecutive Sequence/code.cpp:26
Method
lowestCommonAncestor
Level 0/8 Trees/03. 0235-lowest-common-ancestor-of-a-bst/code.cpp:13
Method
lowestCommonAncestor
Level 1/Week 04/Trees/235. Lowest Common Ancestor of a Binary Search Tree/code.cpp:31
Function
main
🔹 Driver Code
Common/Math/Print Divisors/print_all_divisors.cpp:76
Function
main
🔹 Driver Code
Common/Math/Reverse Number/reverse_number.cpp:50
Function
main
Common/Math/Extract Digits/extract_digit.cpp:34
Function
main
🔹 Driver Code
Common/Math/GCD_HCF_Calculation/gcd.cpp:64
Function
main
Common/Math/Count Digits/count.cpp:39
Method
maxAreaOfIsland
Level 1/Week 12/Graph/695. Max Area of Island/code.cpp:21
Method
maxDepth
Level 1/Week 04/Trees/104. Maximum Depth of Binary Tree/code.cpp:27
Method
maxPathSum
Level 0/8 Trees/10. 0124-binary-tree-maximum-path-sum/code.cpp:39
Method
maxPathSum
Level 1/Week 04/Trees/124. Binary Tree Maximum Path Sum/code.cpp:36
Method
maxPathSum1
Level 1/Week 04/Trees/124. Binary Tree Maximum Path Sum/code.cpp:27
Method
maxPathSumHelper
Returns the maximum path sum that can be extended from current node
Level 0/8 Trees/10. 0124-binary-tree-maximum-path-sum/code.cpp:18
Method
maxSlidingWindow
Level 1/Week 06/Queue/239. Sliding Window Maximum/code.cpp:20
Method
maxSlidingWindow
Level 1/Week 02/Sliding windows/239. Sliding Window Maximum/code.cpp:32
Method
maxSubArray
Level 1/Week 09/Greedy/53. Maximum Subarray/code.cpp:25
← previous
next →
101–200 of 315, ranked by callers