Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/careercup/ctci
/ functions
Functions
1,645 in github.com/careercup/ctci
⨍
Functions
1,645
◇
Types & classes
400
↓ 1 callers
Method
isUniqueChars
(String str)
java/Chapter 1/Question1_1/Question.java:5
↓ 1 callers
Function
isUniqueChars2
using a boolean array
Go/Chapter 1/Question1_1/Question.go:20
↓ 1 callers
Method
isUniqueChars2
(String str)
java/Chapter 1/Question1_1/Question.java:18
↓ 1 callers
Method
isWithinStack
(int index, int total_size)
java/Chapter 3/Question3_1/StackData.java:14
↓ 1 callers
Method
is_allowed
Check whether (row, column) is a valid spot. Return True if (row, column) is inside the bounds of the grid and has not been marked a
python/Chapter 9/Question9_02/robot_paths.py:44
↓ 1 callers
Method
is_free
Check whether (row, column) is a valid square for a new queen. Returns False in case there already is a queen placed on the same row,
python/Chapter 9/Question9_09/queens_problem.py:50
↓ 1 callers
Method
iterator
()
java/Chapter 14/Question14_6/CircularArray.java:35
↓ 1 callers
Method
joinTo
(LockNode node)
java/Chapter 16/Question16_4/LockNode.java:25
↓ 1 callers
Function
kth_to_last
(linkedlist, k)
python/Chapter 2/Question2_2.py:5
↓ 1 callers
Function
leftMostChild
(treenode)
python/Chapter 4/Question4_6/ChapQ4.6.py:119
↓ 1 callers
Method
leftMostChild
(TreeNode n)
java/Chapter 4/Question4_6/Question.java:25
↓ 1 callers
Method
leftOf
(int i)
java/Chapter 16/Question16_3/Question.java:6
↓ 1 callers
Method
leftShift
(int index, boolean removeTop)
java/Chapter 3/Question3_3/SetOfStacks.java:44
↓ 1 callers
Method
lem
()
java/Chapter 14/Introduction/Introduction.java:4
↓ 1 callers
Method
length
(self)
python/Chapter 3/Question3_5/ChapQ3.5.py:15
↓ 1 callers
Function
lengthOfLinkedlist
(linkedlist)
python/Chapter 2/Question2_7.py:52
↓ 1 callers
Method
letterFromCode
TEST CODE
java/Chapter 17/Question17_5/Question.java:73
↓ 1 callers
Method
longestIncreasingSubsequence
(ArrayList<HtWt> array, ArrayList<HtWt>[] solutions, int current_index)
java/Chapter 11/Question11_7/Question.java:18
↓ 1 callers
Method
magicFast
(int[] array, int start, int end)
java/Chapter 9/Question9_3/Question.java:18
↓ 1 callers
Method
magicFast
(int[] array, int start, int end)
java/Chapter 9/Question9_3/QuestionB.java:18
↓ 1 callers
Function
main
()
python/Chapter 4/Question4_7/Q4_7.py:80
↓ 1 callers
Function
main
()
python/Chapter 4/Question4_9/Q4_9.py:49
↓ 1 callers
Method
makeChange1
(int n)
java/Chapter 9/Question9_8/Question.java:17
↓ 1 callers
Method
makeChange2
(int n)
java/Chapter 9/Question9_8/Question.java:22
↓ 1 callers
Function
makeColRowAsNull
Function to make the entire row or column as 0 if any row or col val is 0
go/chapter01/question1.7/question1_7.go:34
↓ 1 callers
Method
makePartialRectangle
(int l, int h, Rectangle rectangle)
java/Chapter 18/Question18_13/Question.java:79
↓ 1 callers
Method
makeRectangle
(int length, int height)
java/Chapter 18/Question18_13/Question.java:57
↓ 1 callers
Function
make_random_balanced_tree
(depth)
python/Chapter 4/Question4_1/ChapQ4.1.py:65
↓ 1 callers
Function
make_random_balanced_tree
(depth)
python/Chapter 4/Question4_4/ChapQ4.4.py:56
↓ 1 callers
Function
make_random_bsearch_tree
(depth = 3, l = -10, r = 10)
python/Chapter 4/Question4_5/ChapQ4.5.py:38
↓ 1 callers
Function
make_random_bsearch_tree
(depth = 2, l = -10, r = 10, parent = None)
python/Chapter 4/Question4_6/ChapQ4.6.py:45
↓ 1 callers
Function
make_random_btree
(depth = 3)
python/Chapter 4/Question4_5/ChapQ4.5.py:31
↓ 1 callers
Method
markUnavailable
()
java/Chapter 8/Question8_1/Card.java:28
↓ 1 callers
Function
matchTree
(r1,r2)
python/Chapter 4/Question4_8/ChapQ4.8.py:157
↓ 1 callers
Method
matchTree
(TreeNode r1, TreeNode r2)
java/Chapter 4/Question4_8/Question.java:32
↓ 1 callers
Method
matricesAreEqual
(int[][] m1, int[][] m2)
java/Chapter 1/Question1_7/Question.java:102
↓ 1 callers
Method
maxLevel
(TreeNode node)
java/CtCILibrary/CtCILibrary/BTreePrinter.java:76
↓ 1 callers
Method
maxRectangle
()
java/Chapter 18/Question18_13/Question.java:26
↓ 1 callers
Method
maxSubArray
(int array[], int N)
java/Chapter 18/Question18_12/QuestionC.java:37
↓ 1 callers
Method
maxSubMatrix
(int[][] matrix)
java/Chapter 18/Question18_12/QuestionC.java:13
↓ 1 callers
Method
merge
(int[] array, int[] helper, int low, int middle, int high)
java/Chapter 11/Introduction/MergeSort.java:20
↓ 1 callers
Method
merge
Merges array @param a first array @param b second array @param lastA number of "real" elements in a @param lastB number of "real" elements in b
java/Chapter 11/Question11_1/Question.java:14
↓ 1 callers
Method
mergesort
(Stack<Integer> inStack)
java/Chapter 3/Question3_6/Question.java:9
↓ 1 callers
Method
mergesort
(int[] array)
java/Chapter 11/Introduction/MergeSort.java:6
↓ 1 callers
Method
methodA
(String threadName)
java/Chapter 16/Question16_6/Foo.java:22
↓ 1 callers
Method
methodB
(String threadName)
java/Chapter 16/Question16_6/Foo.java:28
↓ 1 callers
Method
minus
(int a, int b)
java/Chapter 7/Question7_4/Question.java:16
↓ 1 callers
Method
moveDisk
(self, size, fr, helper, to)
python/Chapter 3/Question3_4/Q3_4.py:13
↓ 1 callers
Method
moveDisks
(int n, Tower destination, Tower buffer)
java/Chapter 3/Question3_4/Tower.java:34
↓ 1 callers
Method
moveTopTo
(Tower t)
java/Chapter 3/Question3_4/Tower.java:25
↓ 1 callers
Function
newTower
(i int)
Go/Chapter 3/Question3_4/Question.go:44
↓ 1 callers
Function
no_duplicates
Determine if str_ has all unique characters
python/Chapter 1/Question1_1/1-unique.py:11
↓ 1 callers
Function
no_duplicates_no_structures
Now without using additional data structures
python/Chapter 1/Question1_1/1-unique.py:15
↓ 1 callers
Function
nthToLast
if n = 2, find the 2nd element from the last node
Go/Chapter 2/Question2_2/Question.go:29
↓ 1 callers
Function
nthToLastHelper
* The algorithm is for single linked lists and can be used for doubly linkedlist too */ * Recursive helper function for the algorithm */
Go/Chapter 2/Question2_2/Question.go:17
↓ 1 callers
Method
nthToLastR1
(LinkedListNode head, int n)
java/Chapter 2/Question2_2/Question.java:7
↓ 1 callers
Method
nthToLastR3
(LinkedListNode head, int k)
java/Chapter 2/Question2_2/Question.java:44
↓ 1 callers
Method
nthToLastR3Helper
(LinkedListNode head, int k)
java/Chapter 2/Question2_2/Question.java:30
↓ 1 callers
Method
numToString100
(int number)
java/Chapter 17/Question17_7/Question.java:33
↓ 1 callers
Method
numberOf2s
(int n)
java/Chapter 18/Question18_4/QuestionBrute.java:5
↓ 1 callers
Method
numberOf2sInRange
(int n)
java/Chapter 18/Question18_4/QuestionBrute.java:16
↓ 1 callers
Method
numberOfElements
()
java/Chapter 3/Question3_1/QuestionB.java:43
↓ 1 callers
Method
numberOfFiles
()
java/Chapter 8/Question8_9/Directory.java:25
↓ 1 callers
Function
pairs
(seq)
python/Chapter 1/Question1_1/alluniq.py:9
↓ 1 callers
Function
parentheses
Return a generator of all the combinations of n-pairs of parentheses.
python/Chapter 9/Question9_06/parentheses.py:16
↓ 1 callers
Method
park
(Vehicle v)
java/Chapter 8/Question8_4/ParkingSpot.java:28
↓ 1 callers
Method
parkInSpot
(ParkingSpot spot)
java/Chapter 8/Question8_4/Vehicle.java:20
↓ 1 callers
Method
parkStartingAtSpot
(int spotNumber, Vehicle vehicle)
java/Chapter 8/Question8_4/Level.java:46
↓ 1 callers
Method
parkVehicle
(Vehicle vehicle)
java/Chapter 8/Question8_4/ParkingLot.java:15
↓ 1 callers
Method
parseOptimized
(int wordStart, int wordEnd, Hashtable<Integer, Integer> cache)
java/Chapter 17/Question17_14/Question.java:46
↓ 1 callers
Function
partition
(linkedlist, x)
python/Chapter 2/Question2_4.py:3
↓ 1 callers
Method
partition
(LinkedListNode node, int x)
java/Chapter 2/Question2_4/QuestionC.java:7
↓ 1 callers
Method
partition
(LinkedListNode node, int x)
java/Chapter 2/Question2_4/Question.java:7
↓ 1 callers
Method
partition
(LinkedListNode node, int x)
java/Chapter 2/Question2_4/QuestionB.java:7
↓ 1 callers
Method
partition
(int arr[], int left, int right)
java/Chapter 11/Introduction/Quicksort.java:12
↓ 1 callers
Method
partitionAndSearch
(int[][] matrix, Coordinate origin, Coordinate dest, Coordinate pivot, int elem)
java/Chapter 11/Question11_6/QuestionB.java:6
↓ 1 callers
Function
peek
(stackNum int)
Go/Chapter 3/Question3_1/Question.go:44
↓ 1 callers
Method
peek_front
(self)
python/Chapter 3/Question3_5/3_5.py:24
↓ 1 callers
Function
permutation
* Given two strings, decide if one is a permutation of the other */
Go/Chapter 1/Question1_3/Question.go:26
↓ 1 callers
Method
permutation
(String s, String t)
java/Chapter 1/Question1_3/Question.java:10
↓ 1 callers
Method
permutation
(String s, String t)
java/Chapter 1/Question1_3/QuestionB.java:4
↓ 1 callers
Function
permutations
Return a generator of all the permutations of the string.
python/Chapter 9/Question9_05/permutations.py:15
↓ 1 callers
Method
pickMIteratively
(int[] original, int m)
java/Chapter 18/Question18_3/QuestionAlternate.java:33
↓ 1 callers
Method
pickMRandomly
(int[] original, int m)
java/Chapter 18/Question18_3/Question.java:14
↓ 1 callers
Method
pickUp
()
java/Chapter 16/Question16_3/Philosopher.java:29
↓ 1 callers
Method
place
Place a queen on square (row, column).
python/Chapter 9/Question9_09/queens_problem.py:46
↓ 1 callers
Method
placeColor
(int row, int column, Color color)
java/Chapter 8/Question8_8/Board.java:27
↓ 1 callers
Method
placeQueens
(int row, Integer[] columns, ArrayList<Integer[]> results)
java/Chapter 9/Question9_9/Question.java:35
↓ 1 callers
Method
playAllHands
()
java/Chapter 8/Question8_1/BlackJackGameAutomator.java:56
↓ 1 callers
Method
playHand
(int i)
java/Chapter 8/Question8_1/BlackJackGameAutomator.java:40
↓ 1 callers
Method
playHanoi
(self)
python/Chapter 3/Question3_4/Q3_4.py:8
↓ 1 callers
Method
playPiece
(int row, int column)
java/Chapter 8/Question8_8/Player.java:13
↓ 1 callers
Method
playRandom
()
java/Chapter 8/Question8_8/Automator.java:58
↓ 1 callers
Function
pop
( stackNum int )
Go/Chapter 3/Question3_1/Question.go:35
↓ 1 callers
Method
pop
()
java/Chapter 3/Question3_2/StackWithMin2.java:19
↓ 1 callers
Method
pop
()
java/Chapter 3/Question3_3/SetOfStacks.java:31
↓ 1 callers
Method
popAt
(self, index)
python/Chapter 3/Question3_3/Q3_3.py:22
↓ 1 callers
Method
possibleScores
()
java/Chapter 8/Question8_1/BlackJackHand.java:24
↓ 1 callers
Function
potentialCompressString
Function to compress the string [potential]
go/chapter01/question1.5/question1_5.go:75
↓ 1 callers
Method
precomputeMatrix
(int[][] matrix)
java/Chapter 18/Question18_12/QuestionB.java:28
← previous
next →
701–800 of 1,645, ranked by callers