MCPcopy Create free account

hub / github.com/RodneyShag/Cracking-the-Coding-Interview_solutions / functions

Functions663 in github.com/RodneyShag/Cracking-the-Coding-Interview_solutions

↓ 1 callersMethodconvertBoardToInt
(char[][] board)
Chp. 16 - More Problems (Moderate)/_16_04_Tic_Tac_Win/TicTacWin.java:12
↓ 1 callersMethodconvertHeapToSortedList
(int[] A)
Chp. 10 - Sorting and Searching/__Intro_Sorts/Sorts.java:187
↓ 1 callersMethodcount2s
(int num)
Chp. 17 - More Problems (Hard)/_17_06_Count_of_2s/CountOf2s.java:8
↓ 1 callersMethodcountOf
(String str, char ch)
Chp. 16 - More Problems (Moderate)/_16_18_Pattern_Matching/PatternMatching.java:57
↓ 1 callersMethodcreateBST
(int[] sortedArray)
Chp. 04 - Trees and Graphs/_4_02_Minimal_Tree/MinimalTree.java:8
↓ 1 callersMethodcreateKey
(String str)
Chp. 10 - Sorting and Searching/_10_02_Group_Anagrams/GroupAnagrams.java:67
↓ 1 callersMethodcrossOffMultiplesOfPrime
(boolean[] flags, int prime)
Chp. 06 - Math and Logic Puzzles/__Intro_Prime/Prime.java:40
↓ 1 callersMethoddeepCopyPathIntoSolutions
(List<Point> path, List<List<Point>> solutionPaths)
Chp. 08 - Recursion and Dynamic Programming/_8_02_Robot_in_a_Grid/RobotInAGrid.java:111
↓ 1 callersMethoddeleteMid
(Node n)
Chp. 02 - Linked Lists/_2_3_Delete_Middle_Node/DeleteMiddleNode.java:8
↓ 1 callersMethoddeposit
(int value)
Chp. 15 - Threads and Locks/__Intro_Examples/LockedATM.java:30
↓ 1 callersMethoddequeueCat
()
Chp. 03 - Stacks and Queues/_3_6_Animal_Shelter/AnimalShelter.java:35
↓ 1 callersMethoddequeueDog
()
Chp. 03 - Stacks and Queues/_3_6_Animal_Shelter/AnimalShelter.java:39
↓ 1 callersMethoddfs
(TreeNode root, TreeNode p, TreeNode q)
Chp. 04 - Trees and Graphs/_4_08_First_Common_Ancestor/FirstCommonAncestor.java:26
↓ 1 callersMethoddivide
(int a, int b)
Chp. 16 - More Problems (Moderate)/_16_09_Operations/Operations.java:29
↓ 1 callersMethodeat
()
Chp. 15 - Threads and Locks/_15_3_Dining_Philosophers/Philosopher.java:30
↓ 1 callersMethodequals
(Object other)
Chp. 04 - Trees and Graphs/_4_11_Random_Node/Node.java:16
↓ 1 callersMethodestimate
(String guess, String solution)
Chp. 16 - More Problems (Moderate)/_16_15_Master_Mind/MasterMind.java:12
↓ 1 callersMethodevaluate
(String str)
Chp. 16 - More Problems (Moderate)/_16_26_Calculator/Calculator.java:13
↓ 1 callersMethodf
(String exp, boolean result)
Chp. 08 - Recursion and Dynamic Programming/_8_14_Boolean_Evaluation/BooleanEvaluation.java:13
↓ 1 callersMethodfibIterative
(int n)
Chp. 08 - Recursion and Dynamic Programming/__Intro_Fibonacci/Fibonacci.java:39
↓ 1 callersMethodfibIterativeNoArray
(int n)
Chp. 08 - Recursion and Dynamic Programming/__Intro_Fibonacci/Fibonacci.java:55
↓ 1 callersMethodfibRecursive
(int n)
Chp. 08 - Recursion and Dynamic Programming/__Intro_Fibonacci/Fibonacci.java:18
↓ 1 callersMethodfind
(String[] sortedArray, String str)
Chp. 10 - Sorting and Searching/_10_05_Sparse_Search/SparseSearch.java:11
↓ 1 callersMethodfindBeginning
(Node head)
Chp. 02 - Linked Lists/_2_8_Loop_Detection/LoopDetection.java:19
↓ 1 callersMethodfindBestLine
(Point[] points)
Chp. 16 - More Problems (Moderate)/_16_14_Best_Line/BestLine.java:20
↓ 1 callersMethodfindDeltas
(char[] array)
Chp. 17 - More Problems (Hard)/_17_05_Letters_and_Numbers/LettersAndNumbers.java:55
↓ 1 callersMethodfindDistance
(List<Integer> listA, List<Integer> listB)
Chp. 17 - More Problems (Hard)/_17_11_Word_Distance/WordDistance.java:61
↓ 1 callersMethodfindElement
(int[][] grid, int elem)
Chp. 10 - Sorting and Searching/_10_09_Sorted_Matrix_Search/SortedMatrixSearch.java:17
↓ 1 callersMethodfindLargestSubmatrix
(int[][] grid)
Chp. 17 - More Problems (Hard)/_17_24_Max_Submatrix/MaxSubmatrix.java:19
↓ 1 callersMethodfindLargestSubmatrix2
(int[][] grid)
Chp. 17 - More Problems (Hard)/_17_24_Max_Submatrix/MaxSubmatrix.java:50
↓ 1 callersMethodfindLargestSubmatrix3
(int[][] grid)
Chp. 17 - More Problems (Hard)/_17_24_Max_Submatrix/MaxSubmatrix.java:103
↓ 1 callersMethodfindLargestSubsquare
(int[][] grid)
Chp. 17 - More Problems (Hard)/_17_23_Max_Black_Square/MaxBlackSquare.java:11
↓ 1 callersMethodfindMax
(int[][] persons)
Chp. 17 - More Problems (Hard)/_17_08_Circus_Tower/CircusTower.java:8
↓ 1 callersMethodfindMaxAliveYear
(int[] deltas)
Chp. 16 - More Problems (Moderate)/_16_10_Living_People/LivingPeople.java:21
↓ 1 callersMethodfindMaxHeight
(List<Box> boxes)
Chp. 08 - Recursion and Dynamic Programming/_8_13_Stack_of_Boxes/StackOfBoxes.java:23
↓ 1 callersMethodfindMergeNode
(Node headA, Node headB)
Chp. 02 - Linked Lists/_2_7_Intersection/Intersection.java:15
↓ 1 callersMethodfindMissing
(ArrayList<BitSet> array)
Chp. 17 - More Problems (Hard)/_17_04_Missing_Number/MissingNumber.java:25
↓ 1 callersMethodfindNthSmallestNums
(int[] array, int n)
Chp. 17 - More Problems (Hard)/_17_14_Smallest_K/SmallestK.java:25
↓ 1 callersMethodfindNumber
(int[] input)
Chp. 10 - Sorting and Searching/_10_07_Missing_Int/MissingInt.java:10
↓ 1 callersMethodfindNumber2
(int[] input)
Chp. 10 - Sorting and Searching/_10_07_Missing_Int/MissingInt.java:35
↓ 1 callersMethodfindPondSize
(int[][] grid, int row, int col, int rows, int cols)
Chp. 16 - More Problems (Moderate)/_16_19_Pond_Sizes/PondSizes.java:24
↓ 1 callersMethodfindPonds
(int[][] grid)
Chp. 16 - More Problems (Moderate)/_16_19_Pond_Sizes/PondSizes.java:9
↓ 1 callersMethodfindSubsquare
(Cell[][] cellMatrix, int length)
Chp. 17 - More Problems (Hard)/_17_23_Max_Black_Square/MaxBlackSquare.java:39
↓ 1 callersMethodfindSum
(TreeNode node, int targetSum)
Chp. 04 - Trees and Graphs/_4_12_Paths_with_Sum/PathWithSums.java:10
↓ 1 callersMethodfirst
()
Chp. 15 - Threads and Locks/_15_5_Call_In_Order/CallInOrder.java:25
↓ 1 callersMethodflipBit
(int n)
Chp. 05 - Bit Manipulation/_5_3_Flip_Bit_to_Win/FlipBitToWin.java:6
↓ 1 callersMethodflipHorizontally
(int[][] image)
Chp. 01 - Arrays and Strings/_1_7_Rotate_Matrix/RotateMatrix.java:25
↓ 1 callersMethodfoo
(String name)
Chp. 15 - Threads and Locks/__Intro_Examples/MyObject.java:7
↓ 1 callersMethodgenerateParentheses
(int n)
Chp. 08 - Recursion and Dynamic Programming/_8_09_Parens/Parens.java:8
↓ 1 callersMethodgeneratePrimes
(int max)
Chp. 06 - Math and Logic Puzzles/__Intro_Prime/Prime.java:25
↓ 1 callersMethodgetAllPaths
(boolean[][] maze, int row, int col, List<List<Point>> solutionPaths, List<Point> path)
Chp. 08 - Recursion and Dynamic Programming/_8_02_Robot_in_a_Grid/RobotInAGrid.java:94
↓ 1 callersMethodgetCandidate
(int[] array)
Chp. 17 - More Problems (Hard)/_17_10_Majority_Element/MajorityElement.java:24
↓ 1 callersMethodgetDeltas
(Person[] people, int min, int max)
Chp. 16 - More Problems (Moderate)/_16_10_Living_People/LivingPeople.java:12
↓ 1 callersMethodgetItems
()
Chp. 16 - More Problems (Moderate)/_16_25_LRU_Cache/LRUCache.java:59
↓ 1 callersMethodgetKthMagicNumber
(int k)
Chp. 17 - More Problems (Hard)/_17_09_Kth_Multiple/KthMultiple.java:8
↓ 1 callersMethodgetLast
()
Chp. 16 - More Problems (Moderate)/_16_25_LRU_Cache/DoublyLinkedList.java:39
↓ 1 callersMethodgetMedian
()
Chp. 17 - More Problems (Hard)/_17_20_Continuous_Median/ContinuousMedian.java:32
↓ 1 callersMethodgetNeighbors
(String str)
Chp. 17 - More Problems (Hard)/_17_22_Word_Transformer/WordTransformer.java:60
↓ 1 callersMethodgetNext
(int num)
Chp. 05 - Bit Manipulation/_5_4_Next_Number/NextNumber.java:11
↓ 1 callersMethodgetNextPrime
(boolean[] flags, int prime)
Chp. 06 - Math and Logic Puzzles/__Intro_Prime/Prime.java:48
↓ 1 callersMethodgetNumber
(String str)
Chp. 16 - More Problems (Moderate)/_16_20_T9__HashMap_Solution/T9.java:37
↓ 1 callersMethodgetPrev
(int num)
Chp. 05 - Bit Manipulation/_5_4_Next_Number/NextNumber.java:45
↓ 1 callersMethodgetRandom
()
Chp. 04 - Trees and Graphs/_4_11_Random_Node/RandomizedCollection.java:51
↓ 1 callersMethodgetRandomNode
()
Chp. 04 - Trees and Graphs/_4_11_Random_Node/BST.java:55
↓ 1 callersMethodgetRankOfNumber
(int x)
Chp. 10 - Sorting and Searching/_10_10_Rank_from_Stream/RankFromStream.java:52
↓ 1 callersMethodgetSmallestRange
(Map<Integer, Deque<HeapNode>> map)
Chp. 17 - More Problems (Hard)/_17_18_Shortest_Supersequence/ShortestSupersequence.java:40
↓ 1 callersMethodgetSubsets
(int[] array)
Chp. 08 - Recursion and Dynamic Programming/_8_04_Power_Set/PowerSet.java:8
↓ 1 callersMethodgetSum
(int[][] grid, int rowStart, int rowEnd, int colStart, int colEnd)
Chp. 17 - More Problems (Hard)/_17_24_Max_Submatrix/MaxSubmatrix.java:36
↓ 1 callersMethodgetSum2
(int[][] processed, int rowStart, int rowEnd, int colStart, int colEnd)
Chp. 17 - More Problems (Hard)/_17_24_Max_Submatrix/MaxSubmatrix.java:92
↓ 1 callersMethodgetValidWords
(StringBuffer prefix, String number, Trie trie, TrieNode trienode, List<String> results)
Chp. 16 - More Problems (Moderate)/_16_20_T9__Trie_Solution/T9.java:27
↓ 1 callersMethodgroupAnagrams
(String[] array)
Chp. 10 - Sorting and Searching/_10_02_Group_Anagrams/GroupAnagrams.java:14
↓ 1 callersMethodgroupAnagrams2
(String[] array)
Chp. 10 - Sorting and Searching/_10_02_Group_Anagrams/GroupAnagrams.java:47
↓ 1 callersMethodhasChild
(int curr, int end)
Chp. 10 - Sorting and Searching/__Intro_Sorts/Sorts.java:221
↓ 1 callersMethodhashCode
()
Chp. 04 - Trees and Graphs/_4_11_Random_Node/Node.java:30
↓ 1 callersMethodheapSort
(int[] A)
Chp. 10 - Sorting and Searching/__Intro_Sorts/Sorts.java:171
↓ 1 callersMethodiParent
(int i)
Chp. 10 - Sorting and Searching/__Intro_Sorts/Sorts.java:217
↓ 1 callersMethodinitializeCards
()
Chp. 07 - Object-Oriented Design/_7_01_Deck_of_Cards/Deck.java:41
↓ 1 callersMethodinorderTraverse
(BiNode root)
Chp. 17 - More Problems (Hard)/_17_12_BiNode/Converter.java:15
↓ 1 callersMethodinsert
(int value)
Chp. 04 - Trees and Graphs/_4_11_Random_Node/BST.java:9
↓ 1 callersMethodinsert_M_into_N
(int N, int M, int i, int j)
Chp. 05 - Bit Manipulation/_5_1_Insertion/Insertion.java:8
↓ 1 callersMethodinsertionSort
(int[] array)
Chp. 10 - Sorting and Searching/__Intro_Sorts/Sorts.java:65
↓ 1 callersMethodinvertIfNecessary
(String pattern)
Chp. 16 - More Problems (Moderate)/_16_18_Pattern_Matching/PatternMatching.java:42
↓ 1 callersMethodisBST
(TreeNode root)
Chp. 04 - Trees and Graphs/_4_05_Validate_BST/ValidateBST.java:8
↓ 1 callersMethodisBalanced
(TreeNode root)
Chp. 04 - Trees and Graphs/_4_04_Check_Balanced/CheckBalanced.java:10
↓ 1 callersMethodisBalancedHelper
(TreeNode root)
Chp. 04 - Trees and Graphs/_4_04_Check_Balanced/CheckBalanced.java:15
↓ 1 callersMethodisMajorityValid
(int[] array, int majority)
Chp. 17 - More Problems (Hard)/_17_10_Majority_Element/MajorityElement.java:38
↓ 1 callersMethodisOlderThan
(Animal other)
Chp. 03 - Stacks and Queues/_3_6_Animal_Shelter/Animal.java:22
↓ 1 callersMethodisPermutation
(String s, String t)
Chp. 01 - Arrays and Strings/_1_2_Check_Permutations/CheckPermutations.java:19
↓ 1 callersMethodisPrime
(int n)
Chp. 06 - Math and Logic Puzzles/__Intro_Prime/Prime.java:7
↓ 1 callersMethodisRotation
(String s1, String s2)
Chp. 01 - Arrays and Strings/_1_9_String_Rotation/StringRotation.java:6
↓ 1 callersMethodisShorterThan
(Range other)
Chp. 17 - More Problems (Hard)/_17_18_Shortest_Supersequence/Range.java:24
↓ 1 callersMethodisValidSquare
(Cell[][] cellMatrix, int r, int c, int length)
Chp. 17 - More Problems (Hard)/_17_23_Max_Black_Square/MaxBlackSquare.java:53
↓ 1 callersMethodjoinWords
(String[] strings)
Chp. 01 - Arrays and Strings/__Intro_StringBuffer/IntroStringBuffer.java:9
↓ 1 callersMethodkthLast
(Node n, int k)
Chp. 02 - Linked Lists/_2_2_Return_Kth_to_Last/ReturnKthToLast.java:11
↓ 1 callersMethodleftMostChild
(TreeNode node)
Chp. 04 - Trees and Graphs/_4_06_Successor/Successor.java:19
↓ 1 callersMethodleftOf
(int i)
Chp. 15 - Threads and Locks/_15_3_Dining_Philosophers/Tester.java:26
↓ 1 callersMethodlevelOrder
(TreeNode root)
Chp. 04 - Trees and Graphs/_4_03_List_of_Depths/ListOfDepths.java:9
↓ 1 callersMethodlongestWord
(String[] words)
Chp. 17 - More Problems (Hard)/_17_15_Longest_Word/LongestWord.java:14
↓ 1 callersMethodmagicFast
(int[] sortedArray)
Chp. 08 - Recursion and Dynamic Programming/_8_03_Magic_Index/MagicIndex.java:7
↓ 1 callersMethodmagicFast2
(int[] sortedArray)
Chp. 08 - Recursion and Dynamic Programming/_8_03_Magic_Index/MagicIndex.java:26
← previousnext →201–300 of 663, ranked by callers