Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/RodneyShag/Cracking-the-Coding-Interview_solutions
/ functions
Functions
663 in github.com/RodneyShag/Cracking-the-Coding-Interview_solutions
⨍
Functions
663
◇
Types & classes
302
↓ 1 callers
Method
majorityElement
(int[] array)
Chp. 17 - More Problems (Hard)/_17_10_Majority_Element/MajorityElement.java:16
↓ 1 callers
Method
makeChange
(int amount)
Chp. 08 - Recursion and Dynamic Programming/_8_11_Coins/Coins.java:8
↓ 1 callers
Method
makeLists
(int[] arrayA, int[] arrayB)
Chp. 17 - More Problems (Hard)/_17_18_Shortest_Supersequence/ShortestSupersequence.java:25
↓ 1 callers
Method
makeMap
(String[] words)
Chp. 17 - More Problems (Hard)/_17_15_Longest_Word/LongestWord.java:26
↓ 1 callers
Method
makeSolutionBoard
(char[][] board)
Chp. 08 - Recursion and Dynamic Programming/_8_12_Eight_Queens/EightQueens.java:50
↓ 1 callers
Method
makeSubsets
(int[] array, int i, List<List<Integer>> solutions, List<Integer> list)
Chp. 08 - Recursion and Dynamic Programming/_8_04_Power_Set/PowerSet.java:17
↓ 1 callers
Method
matches
(String str, String pattern)
Chp. 16 - More Problems (Moderate)/_16_18_Pattern_Matching/PatternMatching.java:15
↓ 1 callers
Method
maxAlive
(Person[] people, int min, int max)
Chp. 16 - More Problems (Moderate)/_16_10_Living_People/LivingPeople.java:6
↓ 1 callers
Method
maxChild
(int[] A, int i, int end)
Chp. 10 - Sorting and Searching/__Intro_Sorts/Sorts.java:225
↓ 1 callers
Method
maxMinutes1
(int[] massages)
Chp. 17 - More Problems (Hard)/_17_16_The_Masseuse/TheMasseuse.java:16
↓ 1 callers
Method
maxMinutes2
(int[] massages)
Chp. 17 - More Problems (Hard)/_17_16_The_Masseuse/TheMasseuse.java:37
↓ 1 callers
Method
maxSubArray
(int[] A)
Chp. 17 - More Problems (Hard)/_17_24_Max_Submatrix/MaxSubmatrix.java:120
↓ 1 callers
Method
maxSubarray
(char[] array)
Chp. 17 - More Problems (Hard)/_17_05_Letters_and_Numbers/LettersAndNumbers.java:30
↓ 1 callers
Method
maxSum
(int[] array)
Chp. 16 - More Problems (Moderate)/_16_17_Contiguous_Sequence/ContiguousSequence.java:6
↓ 1 callers
Method
merge
(List<Integer> listA, List<Integer> listB)
Chp. 17 - More Problems (Hard)/_17_11_Word_Distance/WordDistance.java:88
↓ 1 callers
Method
merge
(int[] array, int[] helper, int start, int mid, int end)
Chp. 10 - Sorting and Searching/__Intro_Sorts/Sorts.java:100
↓ 1 callers
Method
mergeSort
(int[] array)
Chp. 10 - Sorting and Searching/__Intro_Sorts/Sorts.java:84
↓ 1 callers
Method
minMax
(int[] array)
Chp. 16 - More Problems (Moderate)/_16_16_Sub_Sort/SubSort.java:11
↓ 1 callers
Method
moveDisks
(int n, Tower origin, Tower destination, Tower buffer)
Chp. 08 - Recursion and Dynamic Programming/_8_06_Towers_of_Hanoi/TowersOfHanoi.java:6
↓ 1 callers
Method
moveTop
(Tower origin, Tower destination)
Chp. 08 - Recursion and Dynamic Programming/_8_06_Towers_of_Hanoi/TowersOfHanoi.java:15
↓ 1 callers
Method
multiply
(int a, int b)
Chp. 16 - More Problems (Moderate)/_16_09_Operations/Operations.java:10
↓ 1 callers
Method
multiply
(int a, int b)
Chp. 08 - Recursion and Dynamic Programming/_8_05_Recursive_Multiply/RecursiveMultiply.java:6
↓ 1 callers
Method
negate
(int a)
Chp. 16 - More Problems (Moderate)/_16_09_Operations/Operations.java:52
↓ 1 callers
Method
numOnes
(int num)
Common/common/BitFunctions.java:30
↓ 1 callers
Method
numPathsIterative
(int n)
Chp. 08 - Recursion and Dynamic Programming/_8_01_Triple_Step/TripleStep.java:36
↓ 1 callers
Method
numPathsIterativeNoArray
(int n)
Chp. 08 - Recursion and Dynamic Programming/_8_01_Triple_Step/TripleStep.java:52
↓ 1 callers
Method
numPathsRecursive
(int n)
Chp. 08 - Recursion and Dynamic Programming/_8_01_Triple_Step/TripleStep.java:14
↓ 1 callers
Method
numToString
(int num)
Chp. 16 - More Problems (Moderate)/_16_08_English_Int/EnglishInt.java:18
↓ 1 callers
Method
numToString100
(int num)
Chp. 16 - More Problems (Moderate)/_16_08_English_Int/EnglishInt.java:39
↓ 1 callers
Method
numTrailingZeros
(int n)
Chp. 16 - More Problems (Moderate)/_16_05_Factorial_Zeros/FactorialZeros.java:25
↓ 1 callers
Method
numberOf2s
(int num)
Chp. 17 - More Problems (Hard)/_17_06_Count_of_2s/CountOf2s.java:17
↓ 1 callers
Method
oneAway
(String s1, String s2)
Chp. 01 - Arrays and Strings/_1_5_One_Away/OneAway.java:6
↓ 1 callers
Method
oneEditReplace
(String s1, String s2)
Chp. 01 - Arrays and Strings/_1_5_One_Away/OneAway.java:17
↓ 1 callers
Method
paintFillRecursive
(Color[][] screen, int x, int y, Color newColor, Color oldColor)
Chp. 08 - Recursion and Dynamic Programming/_8_10_Paint_Fill/PaintFill.java:14
↓ 1 callers
Method
palPerm
(String str)
Chp. 01 - Arrays and Strings/_1_4_Palindrome_Permutation/PalindromePermutation.java:11
↓ 1 callers
Method
palindrome
(Node head)
Chp. 02 - Linked Lists/_2_6_Palindrome/Palindrome.java:9
↓ 1 callers
Method
partition
(int[] A, int lo, int hi)
Chp. 17 - More Problems (Hard)/_17_14_Smallest_K/SmallestK.java:59
↓ 1 callers
Method
partition
(int[] array, int start, int end)
Chp. 10 - Sorting and Searching/__Intro_Sorts/Sorts.java:145
↓ 1 callers
Method
partition
(Node head, int x)
Chp. 02 - Linked Lists/_2_4_Partition/Partition.java:16
↓ 1 callers
Method
partition2
(Node n, int x)
Chp. 02 - Linked Lists/_2_4_Partition/Partition.java:34
↓ 1 callers
Method
permute
(int[] array)
Chp. 08 - Recursion and Dynamic Programming/_8_07_Permutations_without_Dups/PermutationsWithoutDups.java:8
↓ 1 callers
Method
permute
(int[] array)
Chp. 08 - Recursion and Dynamic Programming/_8_08_Permutations_with_Dups/PermutationsWithDups.java:8
↓ 1 callers
Method
pickUp
()
Chp. 15 - Threads and Locks/_15_3_Dining_Philosophers/Philosopher.java:41
↓ 1 callers
Method
placeQueens
(char[][] board, int n, List<List<String>> solutions, int row, Set<Integer> cols,
Chp. 08 - Recursion and Dynamic Programming/_8_12_Eight_Queens/EightQueens.java:22
↓ 1 callers
Method
pop
()
Chp. 03 - Stacks and Queues/_3_3_Stack_of_Plates/StackOfPlates.java:25
↓ 1 callers
Method
pop
()
Chp. 08 - Recursion and Dynamic Programming/_8_06_Towers_of_Hanoi/Tower.java:27
↓ 1 callers
Method
preProcess
(String[] words)
Chp. 17 - More Problems (Hard)/_17_11_Word_Distance/WordDistance.java:47
↓ 1 callers
Method
preprocess
(int[][] grid)
Chp. 17 - More Problems (Hard)/_17_24_Max_Submatrix/MaxSubmatrix.java:69
↓ 1 callers
Method
preprocessGrid
(int[][] grid)
Chp. 17 - More Problems (Hard)/_17_23_Max_Black_Square/MaxBlackSquare.java:22
↓ 1 callers
Method
printAllPaths
(List<List<Point>> solutionPaths)
Chp. 08 - Recursion and Dynamic Programming/_8_02_Robot_in_a_Grid/Tester.java:47
↓ 1 callers
Method
printBinary
(double num)
Chp. 05 - Bit Manipulation/_5_2_Binary_to_String/BinaryToString.java:16
↓ 1 callers
Method
printBoard
(List<String> board)
Chp. 08 - Recursion and Dynamic Programming/_8_12_Eight_Queens/Tester.java:16
↓ 1 callers
Method
printLevelOrder
(TreeNode root)
Common/common/TreeFunctions.java:67
↓ 1 callers
Method
printPairs
()
Introduction/introduction/ABCD.java:11
↓ 1 callers
Method
printPostOrder
(TreeNode node)
Common/common/TreeFunctions.java:58
↓ 1 callers
Method
printPreOrder
(TreeNode node)
Common/common/TreeFunctions.java:42
↓ 1 callers
Method
properParent
(TreeNode node)
Chp. 04 - Trees and Graphs/_4_06_Successor/Successor.java:31
↓ 1 callers
Method
push
(int data)
Chp. 03 - Stacks and Queues/_3_3_Stack_of_Plates/StackOfPlates.java:13
↓ 1 callers
Method
putChildIfAbsent
(char ch)
Chp. 16 - More Problems (Moderate)/_16_20_T9__Trie_Solution/TrieNode.java:11
↓ 1 callers
Method
quickSort
(int[] array)
Chp. 10 - Sorting and Searching/__Intro_Sorts/Sorts.java:126
↓ 1 callers
Method
quickselect
(int[] A, int n)
Chp. 17 - More Problems (Hard)/_17_14_Smallest_K/SmallestK.java:39
↓ 1 callers
Method
randomInt
(int n)
Chp. 15 - Threads and Locks/_15_3_Dining_Philosophers/Philosopher.java:80
↓ 1 callers
Method
randomIntInRange
(int min, int max)
Chp. 15 - Threads and Locks/_15_3_Dining_Philosophers/Philosopher.java:76
↓ 1 callers
Method
rehash
()
Chp. 07 - Object-Oriented Design/_7_12_Hash_Table/Hash.java:68
↓ 1 callers
Method
removeDuplicates
(Node head)
Chp. 02 - Linked Lists/_2_1_Remove_Dups/RemoveDups.java:9
↓ 1 callers
Method
replaceWhitespace
(char[] sentence, int trueLength)
Chp. 01 - Arrays and Strings/_1_3_URLify/URLify.java:6
↓ 1 callers
Method
reverseListIterative
(Node head)
Common/common/ListFunctions.java:62
↓ 1 callers
Method
rightOf
(int i, int numPhilosophers)
Chp. 15 - Threads and Locks/_15_3_Dining_Philosophers/Tester.java:30
↓ 1 callers
Method
rotate180
(int[][] image)
Chp. 01 - Arrays and Strings/_1_7_Rotate_Matrix/RotateMatrix.java:41
↓ 1 callers
Method
rotate90clockwise
(int[][] image)
Chp. 01 - Arrays and Strings/_1_7_Rotate_Matrix/RotateMatrix.java:8
↓ 1 callers
Method
routeExists
(GraphNode start, GraphNode end)
Chp. 04 - Trees and Graphs/_4_01_Route_Between_Nodes/RouteBetweenNodes.java:11
↓ 1 callers
Method
search
(int[] A, int target)
Chp. 10 - Sorting and Searching/_10_03_Search_in_Rotated_Array/SearchInRotatedArray.java:12
↓ 1 callers
Method
second
()
Chp. 15 - Threads and Locks/_15_5_Call_In_Order/CallInOrder.java:36
↓ 1 callers
Method
selectionSort
(int[] array)
Chp. 10 - Sorting and Searching/__Intro_Sorts/Sorts.java:46
↓ 1 callers
Method
set
(int index, T item)
Chp. 07 - Object-Oriented Design/_7_09_Circular_Array/CircularArray.java:20
↓ 1 callers
Method
setBit
(int num, int bit)
Chp. 17 - More Problems (Hard)/_17_01_Add_Without_Plus/AddWithoutPlus.java:93
↓ 1 callers
Method
setRange
(Range other)
Chp. 17 - More Problems (Hard)/_17_18_Shortest_Supersequence/Range.java:19
↓ 1 callers
Method
setUpDict
()
Chp. 17 - More Problems (Hard)/_17_22_Word_Transformer/WordTransformer.java:19
↓ 1 callers
Method
shortest
(String[] words, String word1, String word2)
Chp. 17 - More Problems (Hard)/_17_11_Word_Distance/WordDistance.java:16
↓ 1 callers
Method
shortest
(int[] arrayA, int[] arrayB)
Chp. 17 - More Problems (Hard)/_17_18_Shortest_Supersequence/ShortestSupersequence.java:20
↓ 1 callers
Method
shortest2
(String word1, String word2)
Chp. 17 - More Problems (Hard)/_17_11_Word_Distance/WordDistance.java:56
↓ 1 callers
Method
smallestDifference
(int[] array1, int[] array2)
Chp. 16 - More Problems (Moderate)/_16_06_Smallest_Difference/SmallestDifference.java:10
↓ 1 callers
Method
solution1
(int[][] grid)
Chp. 01 - Arrays and Strings/_1_8_Zero_Matrix/ZeroMatrix.java:19
↓ 1 callers
Method
solveNQueens
(int n)
Chp. 08 - Recursion and Dynamic Programming/_8_12_Eight_Queens/EightQueens.java:8
↓ 1 callers
Method
sortChars
(String str)
Chp. 10 - Sorting and Searching/_10_02_Group_Anagrams/GroupAnagrams.java:34
↓ 1 callers
Method
sortValleyPeak
(int[] array)
Chp. 10 - Sorting and Searching/_10_11_Peaks_and_Valleys/PeaksAndValleys.java:9
↓ 1 callers
Method
subtract
(int a, int b)
Chp. 16 - More Problems (Moderate)/_16_09_Operations/Operations.java:6
↓ 1 callers
Method
swap
(int[] cards, int i, int j)
Chp. 17 - More Problems (Hard)/_17_02_Shuffle/Shuffle.java:13
↓ 1 callers
Method
swap1
(int a, int b)
Chp. 16 - More Problems (Moderate)/_16_01_Number_Swapper/NumberSwapper.java:6
↓ 1 callers
Method
swap2
(int a, int b)
Chp. 16 - More Problems (Moderate)/_16_01_Number_Swapper/NumberSwapper.java:13
↓ 1 callers
Method
swapOddEven
(int num)
Chp. 05 - Bit Manipulation/_5_7_Pairwise_Swap/PairwiseSwap.java:6
↓ 1 callers
Method
test
(int[][] matrix)
Chp. 17 - More Problems (Hard)/_17_24_Max_Submatrix/Tester.java:16
↓ 1 callers
Method
test
(int[][] matrix)
Chp. 17 - More Problems (Hard)/_17_23_Max_Black_Square/Tester.java:16
↓ 1 callers
Method
test
(int[] histogram)
Chp. 17 - More Problems (Hard)/_17_21_Volume_of_Histogram/Tester.java:14
↓ 1 callers
Method
test
(String s1, String s2)
Chp. 17 - More Problems (Hard)/_17_22_Word_Transformer/Tester.java:14
↓ 1 callers
Method
test
(int[] arrayA, int[] arrayB)
Chp. 17 - More Problems (Hard)/_17_18_Shortest_Supersequence/Tester.java:15
↓ 1 callers
Method
test
(int[] array)
Chp. 17 - More Problems (Hard)/_17_16_The_Masseuse/Tester.java:13
↓ 1 callers
Method
test
(int[] arrayA, int[] arrayB, int lastA, int lastB)
Chp. 10 - Sorting and Searching/_10_01_Sorted_Merge/Tester.java:13
↓ 1 callers
Method
test
(int[] array)
Chp. 10 - Sorting and Searching/_10_04_Sorted_Search_No_Size/Tester.java:11
↓ 1 callers
Method
test
(int[] rotatedArray, int num)
Chp. 10 - Sorting and Searching/_10_03_Search_in_Rotated_Array/Tester.java:17
← previous
next →
301–400 of 663, ranked by callers