MCPcopy Create free account

hub / github.com/careercup/CtCI-6th-Edition-cpp / functions

Functions434 in github.com/careercup/CtCI-6th-Edition-cpp

↓ 1 callersFunctionadd_followup
* [add_followup - adding list such that 1's digit is at tail( follow up part of question) * @param list1 * @param list2 * @return list3 represent
chapter-2-Linked-Lists/2-5-add-lists.cpp:194
↓ 1 callersFunctionadd_followup_helper
chapter-2-Linked-Lists/2-5-add-lists.cpp:173
↓ 1 callersFunctionadd_iterative
* [add_iterative iterative approach to add two given lists] * @param list1 * @param list2 * @return list3 */
chapter-2-Linked-Lists/2-5-add-lists.cpp:59
↓ 1 callersFunctionadd_recursive
* [add_recursive - recursive addititon of two lists * @param list1 * @param list2 * @param carry * @return list3 */
chapter-2-Linked-Lists/2-5-add-lists.cpp:121
↓ 1 callersFunctionanagram_check
Chapter-10-Sorting-and-Searching/10-2-Group-Anagrams/10-2-Group-Anagrams.cpp:15
↓ 1 callersFunctionbinarySearch
chapter-8-recursion-and-Dynamic-Programming/8.3_Magic_Index.cpp:6
↓ 1 callersFunctionbinaryToStringDiv
Ch 5. Bit Manipulation/C++14/5.2-BinaryToString.cpp:41
↓ 1 callersFunctionbinaryToStringMul
Ch 5. Bit Manipulation/C++14/5.2-BinaryToString.cpp:12
↓ 1 callersFunctionbuildCharFrequencyTable
Ch 1.Arrays And Strings/3.Palindrome Permutation/Palindrome Permutation.cpp:24
↓ 1 callersFunctionbuildOrder
Ch 4. Trees and Graphs/C++14/4.7d-BuildOrder.cpp:49
↓ 1 callersFunctionbuildOrder
Ch 4. Trees and Graphs/C++14/4.7-BuildOrder.cpp:17
↓ 1 callersFunctionbuildProject
Ch 4. Trees and Graphs/C++14/4.7d-BuildOrder.cpp:24
↓ 1 callersFunctioncheckMaxOneOdd
Ch 1.Arrays And Strings/3.Palindrome Permutation/Palindrome Permutation.cpp:36
↓ 1 callersFunctioncntways
chapter-8-recursion-and-Dynamic-Programming/8.2_Grid_Paths.cpp:5
↓ 1 callersFunctioncommonAncestor
We travel down to see where is the divergent point such that two query nodes are NOT in the same branch*/
Chapter-4-tree-and-graph/4.8_first_common_ancestor.cpp:34
↓ 1 callersFunctioncompress
Ch 1.Arrays And Strings/6.String_Compression/6.string_compression.cpp:12
↓ 1 callersFunctioncountFrequency
Ch 1.Arrays And Strings/4.Palindrome_Permutation/4-pallindrome-permutations.cpp:43
↓ 1 callersFunctioncountPathsWithSum
Ch 4. Trees and Graphs/C++14/4.12-PathsWithSum.cpp:36
↓ 1 callersFunctioncountWays
chapter-8-recursion-and-Dynamic-Programming/8-1-Triple-Step.cpp:6
↓ 1 callersFunctioncountWays
A recursive function used by countWays
chapter-8-recursion-and-Dynamic-Programming/8.1_Triple_Step.cpp:7
↓ 1 callersFunctioncountWordFreq
Chapter-16-moderate/word_freq.cpp:27
↓ 1 callersFunctioncreateBst
Chapter-4-tree-and-graph/4.2_minimal_tree.cpp:10
↓ 1 callersFunctioncreateMatrix
chapter-8-recursion-and-Dynamic-Programming/8-2-Robot-in-a-Grid.cpp:119
↓ 1 callersFunctioncreateMinimalBST
Ch 4. Trees and Graphs/4-2-Minimal-Tree.cpp:20
↓ 1 callersFunctioncreateMinimalBst
Chapter-4-tree-and-graph/4.8_first_common_ancestor.cpp:9
↓ 1 callersFunctioncreateMinimalBst
Chapter-4-tree-and-graph/4.11_random_node.cpp:12
↓ 1 callersFunctioncreateMinimalBst
Build a BST first, and searching for in-order successor of a given node.*/
Chapter-4-tree-and-graph/4.6_successor.cpp:11
↓ 1 callersFunctioncreateMinimalBst
Chapter-4-tree-and-graph/4.4_check_balanced.cpp:12
↓ 1 callersFunctioncreateMinimalBst
Chapter-4-tree-and-graph/4.5_validate_BST.cpp:12
↓ 1 callersFunctioncreateMinimalBst
Chapter-4-tree-and-graph/4.3_list_of_depths.cpp:13
↓ 1 callersFunctioncreateMinimalBst
Chapter-4-tree-and-graph/4.9_BST_sequences.cpp:10
↓ 1 callersFunctioncrossOff
Ch 6. Math and Logic Puzzles/Intro/SieveOfEratosthenes.cpp:6
↓ 1 callersFunctiondeleteList
* [deleteList - delete the entire list] * @param head - head of the list */
chapter-2-Linked-Lists/2-2-kthToLast.cpp:46
↓ 1 callersFunctiondeleteNode
* [deleteNode - delete the "node" from the list] * @param node [node to be deleted] */
chapter-2-Linked-Lists/2-3-delete-middle-node.cpp:39
↓ 1 callersFunctiondetectAndRemoveCycle
chapter-2-Linked-Lists/2-8-loop-detection.cpp:29
↓ 1 callersFunctionfindAllSeq
The crucial point is that root must come before all its children. We do it recursivley, at each level: We first compute all permutations of left s
Chapter-4-tree-and-graph/4.9_BST_sequences.cpp:37
↓ 1 callersFunctionfindLevelLinkedLists
Chapter-4-tree-and-graph/4.3_list_of_depths.cpp:28
↓ 1 callersFunctionfindMagic
chapter-8-recursion-and-Dynamic-Programming/8-3-Magic-Index.cpp:30
↓ 1 callersFunctionfindMagicUtil
chapter-8-recursion-and-Dynamic-Programming/8-3-Magic-Index.cpp:5
↓ 1 callersFunctionfindPermutations
chapter-8-recursion-and-Dynamic-Programming/8-8-Permutation-with-dups.cpp:7
↓ 1 callersFunctionfindPermutations
chapter-8-recursion-and-Dynamic-Programming/8-7-Permutations-without-Dups.cpp:7
↓ 1 callersFunctionflipToWin
Ch 5. Bit Manipulation/C++14/5.3-FlipBitToWin.cpp:16
↓ 1 callersFunctionfloodFill
It mainly finds the previous color on (x, y) and calls floodFillUtil()
chapter-8-recursion-and-Dynamic-Programming/8.10_Paint_Fill.cpp:31
↓ 1 callersFunctionfloodFillUtil
A recursive function to replace previous color 'prevC' at '(x, y)' and all surrounding pixels of (x, y) with new color 'newC' and
chapter-8-recursion-and-Dynamic-Programming/8.10_Paint_Fill.cpp:11
↓ 1 callersFunctiongetNextPrime
Ch 6. Math and Logic Puzzles/Intro/SieveOfEratosthenes.cpp:14
↓ 1 callersFunctiongetPath
Checks if path is valid and simultaneously adds position to a result vector
chapter-8-recursion-and-Dynamic-Programming/8-2-Robot-in-a-Grid.cpp:22
↓ 1 callersMethodgetRundomNode
Ch 4. Trees and Graphs/C++14/4.11-RandomNode.cpp:72
↓ 1 callersFunctiongetVolume
Ch 17. Hard/Q17_21_Volume_of_Histogram/histogramVolume.cpp:7
↓ 1 callersFunctiongroup_anagrams
Chapter-10-Sorting-and-Searching/10-2-Group-Anagrams/10-2-Group-Anagrams.cpp:23
↓ 1 callersFunctionhelper_reverse
Ch 1.Arrays And Strings/7.Rotate_matrix/7.rotate_matrix.cpp:23
↓ 1 callersFunctionhelper_transpose
Ch 1.Arrays And Strings/7.Rotate_matrix/7.rotate_matrix.cpp:12
↓ 1 callersFunctioninit
Ch 6. Math and Logic Puzzles/Intro/SieveOfEratosthenes.cpp:24
↓ 1 callersFunctioninsert
chapter-2-Linked-Lists/2-4-partition.cpp:26
↓ 1 callersFunctioninsert
* Insert to the head of the list * @param head - Current head of list * @param data - new node's data */
chapter-2-Linked-Lists/2-2-kthToLast.cpp:36
↓ 1 callersFunctioninsertion
Ch 5. Bit Manipulation/C++14/5.1-Insertion.cpp:15
↓ 1 callersFunctionintersectionPoint
* [intersectionPoint Returns the point of intersection of two lists] * @param head1 [ head of list 1 ] * @param head2 [ head of list 2 ] * @retur
chapter-2-Linked-Lists/2-7-intersection.cpp:47
↓ 1 callersMethodisAdjacentFor
Ch 4. Trees and Graphs/C++14/graph.hpp:39
↓ 1 callersFunctionisBST
The check is performed recursively. The min/max solution. We proceed through the tree with this approach. When we branch left, the max gets updated to
Chapter-4-tree-and-graph/4.5_validate_BST.cpp:28
↓ 1 callersFunctionisBalanced
Returns true if binary tree with root as root is height-balanced */
Chapter-4-tree-and-graph/4.4_check_balanced.cpp:28
↓ 1 callersFunctionisExactlyOneBitSet
Ch 1.Arrays And Strings/4.Palindrome_Permutation/4-pallindrome-permutations.cpp:141
↓ 1 callersFunctionisOneAway
Ch 1.Arrays And Strings/5. One Away/5.One Away.cpp:5
↓ 1 callersFunctionisPalindromeIter1
* [isPallindromeIter1 - Iteratively determine if list is palindrome using reversing the list] * @param head [Head node of the list] * @return
chapter-2-Linked-Lists/2-6-palindrome.cpp:71
↓ 1 callersFunctionisPalindromeIter2
chapter-2-Linked-Lists/2-6-palindrome.cpp:122
↓ 1 callersFunctionisPalindromeRecur
chapter-2-Linked-Lists/2-6-palindrome.cpp:196
↓ 1 callersFunctionisPalindromeRecurHelper
chapter-2-Linked-Lists/2-6-palindrome.cpp:175
↓ 1 callersFunctionisRotation
Ch 1.Arrays And Strings/9.String_rotation/9.string_rotation.cpp:17
↓ 1 callersFunctionisUniqueChars
Ch 1.Arrays And Strings/1.Is Unique/1. Is_unique.cpp:9
↓ 1 callersFunctionisUniqueChars_bitvector
Ch 1.Arrays And Strings/1.Is Unique/1. Is_unique.cpp:24
↓ 1 callersFunctionisUniqueChars_noDS
Ch 1.Arrays And Strings/1.Is Unique/1. Is_unique.cpp:37
↓ 1 callersFunctionkthToLastHelper
* [kthToLastHelper - helper routine to find nth node for recursive approach * @param head - head of the list * @param k - the k value for fin
chapter-2-Linked-Lists/2-2-kthToLast.cpp:74
↓ 1 callersFunctionkthToLastIterative
* kthToLastIterative - Iterative approach for finding kth to last element of list. * @param head - head of node * @param k - the k value for
chapter-2-Linked-Lists/2-2-kthToLast.cpp:105
↓ 1 callersFunctionkthToLastRecursive
* kthToLastRecursive - Recursive approach for finding kth to last element of list. * @param head - head of node * @param k - the k value for
chapter-2-Linked-Lists/2-2-kthToLast.cpp:94
↓ 1 callersFunctionleftmost
Chapter-4-tree-and-graph/4.6_successor.cpp:29
↓ 1 callersFunctionmerge
Chapter-10-Sorting-and-Searching/10-1-Sorted-Merge/10-1-Sorted-Merge.cpp:13
↓ 1 callersFunctionmerge
Ch 10. Sorting and Searching/10.1 - sortedMerge.cpp:13
↓ 1 callersFunctionmin_element
chapter-8-recursion-and-Dynamic-Programming/8.8_Permutations_with_Dups.cpp:15
↓ 1 callersFunctionmostLeft
Ch 4. Trees and Graphs/4.6_Successor.cpp:1
↓ 1 callersFunctionmultiply
chapter-8-recursion-and-Dynamic-Programming/8-5-Recursive-Multiply.cpp:5
↓ 1 callersFunctionmultiply1
chapter-8-recursion-and-Dynamic-Programming/8.5_Recursive_Multiply.cpp:12
↓ 1 callersFunctionmultiply2
The second method is the Solution 3 discussed in the book, where division operation is used.*/
chapter-8-recursion-and-Dynamic-Programming/8.5_Recursive_Multiply.cpp:19
↓ 1 callersFunctionnullifyCol
Ch 1.Arrays And Strings/8.Zero_matrix/8.zero_matrix.cpp:20
↓ 1 callersFunctionnullifyMatrix
Ch 1.Arrays And Strings/8.Zero_matrix/8.zero_matrix.cpp:27
↓ 1 callersFunctionpartition
We start with a new list. Elements bigger than the pivot element are put at the tail list and elements smaller are put at the head list*/
chapter-2-Linked-Lists/2-4-partition.cpp:50
↓ 1 callersFunctionpartition
Ch 1.Arrays And Strings/10.Ouicksort.cpp:14
↓ 1 callersFunctionpermute
chapter-8-recursion-and-Dynamic-Programming/8.8_Permutations_with_Dups.cpp:25
↓ 1 callersFunctionpermute
Function to print permutations of string This function takes three parameters: 1. String 2. Starting index of the string 3. Ending index o
chapter-8-recursion-and-Dynamic-Programming/8.7_Permutations_without_Dups.cpp:20
↓ 1 callersMethodpop
Chapter-3-Stacks-and-Queues/3.2_stack_min.cpp:22
↓ 1 callersMethodpop
Chapter-3-Stacks-and-Queues/C++14/3.2-StackMin.cpp:29
↓ 1 callersFunctionpostorder
Chapter-4-tree-and-graph/4.2_minimal_tree.cpp:25
↓ 1 callersFunctionpreOrder
Ch 4. Trees and Graphs/4-2-Minimal-Tree.cpp:11
↓ 1 callersFunctionprintAllSeq
Chapter-4-tree-and-graph/4.9_BST_sequences.cpp:106
↓ 1 callersFunctionprintKlines
Ch 12. C++/print_k_lines.cpp:9
↓ 1 callersFunctionprintLevelLinkedLists
Chapter-4-tree-and-graph/4.3_list_of_depths.cpp:48
↓ 1 callersFunctionprintList
* printList - Helper routine to print the list * @param head - Current head of the list. */
chapter-2-Linked-Lists/2-2-kthToLast.cpp:59
↓ 1 callersFunctionprintParenthesis
Wrapper over _printParenthesis()*/
chapter-8-recursion-and-Dynamic-Programming/8.9_Parens.cpp:9
↓ 1 callersFunctionprintPerms
chapter-8-recursion-and-Dynamic-Programming/8-8-Permutation-with-dups-alt.cpp:13
↓ 1 callersFunctionprintPowerSet
chapter-8-recursion-and-Dynamic-Programming/8.4_Power_Set.cpp:12
↓ 1 callersFunctionprint_all_parentheses
chapter-8-recursion-and-Dynamic-Programming/8-9-parens-alt.cpp:63
↓ 1 callersFunctionprint_all_parentheses
chapter-8-recursion-and-Dynamic-Programming/8-9-parens.cpp:20
↓ 1 callersFunctionprint_all_parentheses_internal
chapter-8-recursion-and-Dynamic-Programming/8-9-parens-alt.cpp:19
← previousnext →101–200 of 434, ranked by callers