MCPcopy Create free account

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

Functions122 in github.com/careercup/CtCI-6th-Edition-Go

↓ 20 callersFunctionGetLinkedListFromValues
(vals []int)
src/chapter2/linked_list.go:19
↓ 17 callersMethodPush
(int)
src/chapter3/stack.go:8
↓ 16 callersMethodPop
()
src/chapter3/stack.go:9
↓ 11 callersMethodIsEmpty
()
src/chapter3/stack.go:11
↓ 10 callersMethodRemove
()
src/chapter3/queue.go:9
↓ 8 callersMethodPeek
()
src/chapter3/stack.go:10
↓ 7 callersFunctionGetLinkedList
()
src/chapter2/linked_list.go:15
↓ 7 callersMethodInsert
Insert at end.
src/chapter2/linked_list.go:31
↓ 5 callersMethodAdd
(int)
src/chapter3/queue.go:8
↓ 5 callersMethodgetNode
(index int)
src/chapter2/linked_list.go:47
↓ 4 callersFunctionAreIntersecting
Only use next to simulate singly linked list.
src/chapter2/problem7.go:4
↓ 4 callersMethodLen
()
src/chapter2/linked_list.go:70
↓ 4 callersMethodgetMultiStackHead
(stack int)
src/chapter3/problem1.go:23
↓ 3 callersMethodSlice
Mostly used for testing.
src/chapter2/linked_list.go:56
↓ 3 callersMethodenqueue
(name string, petType PetType)
src/chapter3/problem6.go:85
↓ 3 callersMethodinsertNode
(newNode *node)
src/chapter2/linked_list.go:36
↓ 2 callersMethodFindLoopNode
()
src/chapter2/problem8.go:3
↓ 2 callersMethodGet
(index int)
src/chapter2/linked_list.go:66
↓ 2 callersFunctionGetQueueUsingStacks
()
src/chapter3/problem4.go:12
↓ 2 callersFunctionGetSetOfStacks
(max int)
src/chapter3/problem3.go:18
↓ 2 callersMethodIsEmpty
(stack int)
src/chapter3/problem1.go:54
↓ 2 callersMethodIsEmpty
()
src/chapter3/problem3.go:81
↓ 2 callersMethodKFromTail
Don't use prev to simulate singly linked list. Assume k=0 means tail, k=1 one before tail etc. Using the length of the list.
src/chapter2/problem2.go:6
↓ 2 callersMethodKFromTail2
Without knowledge of the length of the list.
src/chapter2/problem2.go:15
↓ 2 callersMethodnewToOld
()
src/chapter3/problem4.go:20
↓ 2 callersFunctiononeRemovalAway
(smaller, larger string)
src/chapter1/problem5.go:7
↓ 2 callersMethodremoveNode
(node *node)
src/chapter2/problem3.go:3
↓ 1 callersMethodAdd
(value int)
src/chapter3/queue.go:23
↓ 1 callersFunctionAddTwoLists
(l1, l2 *DoublyLinkedList)
src/chapter2/problem5.go:3
↓ 1 callersFunctionAreOneEditAway
(input1, input2 string)
src/chapter1/problem5.go:28
↓ 1 callersFunctionArePermutations
(input1, input2 string)
src/chapter1/problem2.go:3
↓ 1 callersFunctionBasicCompress
(input string)
src/chapter1/problem6.go:7
↓ 1 callersFunctionCreateLoopedList
Create a list with given values. Point tail to given index, creating a loop.
src/chapter2/problem8_test.go:9
↓ 1 callersFunctionGetMinStack
()
src/chapter3/problem2.go:12
↓ 1 callersFunctionGetPetShelter
()
src/chapter3/problem6.go:81
↓ 1 callersFunctionGetSliceMultiStack
(stacks, stackSize int)
src/chapter3/problem1.go:17
↓ 1 callersFunctionGetSortStack
()
src/chapter3/problem5.go:14
↓ 1 callersMethodIsPalindrome
Using doubly linked list which remembers head & tail.
src/chapter2/problem6.go:4
↓ 1 callersFunctionIsPalindromePerm
(input string)
src/chapter1/problem4.go:3
↓ 1 callersFunctionIsRotation
(input1, input2 string)
src/chapter1/problem9.go:7
↓ 1 callersFunctionIsUnique
Using map of runes for duplicate detection.
src/chapter1/problem1.go:4
↓ 1 callersFunctionMatrixRotate
(matrix [][]int)
src/chapter1/problem7.go:3
↓ 1 callersMethodMin
()
src/chapter3/problem2.go:50
↓ 1 callersMethodPivotAroundValue
(value int)
src/chapter2/problem4.go:3
↓ 1 callersMethodPop
()
src/chapter3/stack.go:31
↓ 1 callersMethodPopAt
(stack int)
src/chapter3/problem3.go:54
↓ 1 callersMethodPush
(value int)
src/chapter3/stack.go:23
↓ 1 callersMethodRemove
()
src/chapter3/queue.go:35
↓ 1 callersMethodRemoveDuplicates
Using hash table to track duplicates. Using remove solution from problem 3.
src/chapter2/problem1.go:5
↓ 1 callersFunctionURLify
O(n) time with O(n) extra space.
src/chapter1/problem3.go:4
↓ 1 callersFunctionURLifySlice
Less "real world" version taking a []rune with spaces on the end to be able to URLify in place. O(n), in place.
src/chapter1/problem3.go:33
↓ 1 callersFunctionZeroColumn
(matrix [][]int, col int)
src/chapter1/problem8.go:9
↓ 1 callersFunctionZeroMatrix
(matrix [][]int)
src/chapter1/problem8.go:15
↓ 1 callersFunctionZeroRow
(matrix [][]int, row int)
src/chapter1/problem8.go:3
↓ 1 callersMethoddequeueAny
()
src/chapter3/problem6.go:109
↓ 1 callersMethoddequeueCat
()
src/chapter3/problem6.go:101
↓ 1 callersMethoddequeueDog
()
src/chapter3/problem6.go:93
MethodAdd
(value int)
src/chapter3/problem4.go:16
MethodAdd
(name string, petType PetType)
src/chapter3/problem6.go:33
MethodIsEmpty
()
src/chapter3/problem4.go:70
MethodIsEmpty
()
src/chapter3/problem5.go:70
MethodIsEmpty
()
src/chapter3/problem2.go:57
MethodIsEmpty
()
src/chapter3/stack.go:47
MethodIsEmpty
()
src/chapter3/queue.go:11
MethodIsEmpty
()
src/chapter3/queue.go:54
MethodIsEmpty
()
src/chapter3/problem6.go:70
MethodLen
()
src/chapter3/stack_test.go:11
MethodLess
(i, j int)
src/chapter3/stack_test.go:13
MethodPeek
(stack int)
src/chapter3/problem1.go:47
MethodPeek
()
src/chapter3/problem4.go:50
MethodPeek
Peek is also Min in SortStack.
src/chapter3/problem5.go:59
MethodPeek
()
src/chapter3/problem2.go:43
MethodPeek
()
src/chapter3/stack.go:40
MethodPeek
()
src/chapter3/queue.go:10
MethodPeek
()
src/chapter3/queue.go:47
MethodPeek
()
src/chapter3/problem3.go:70
MethodPeek
()
src/chapter3/problem6.go:63
MethodPop
(stack int)
src/chapter3/problem1.go:37
MethodPop
()
src/chapter3/problem5.go:47
MethodPop
()
src/chapter3/problem2.go:33
MethodPop
()
src/chapter3/problem3.go:39
MethodPush
(stack, value int)
src/chapter3/problem1.go:27
MethodPush
(value int)
src/chapter3/problem5.go:18
MethodPush
(value int)
src/chapter3/problem2.go:16
MethodPush
(value int)
src/chapter3/problem3.go:27
MethodRemove
(index int)
src/chapter2/problem3.go:19
MethodRemove
()
src/chapter3/problem4.go:30
MethodRemove
()
src/chapter3/problem6.go:51
MethodSwap
(i, j int)
src/chapter3/stack_test.go:12
FunctionTestAddTwoLists
(t *testing.T)
src/chapter2/problem5_test.go:7
FunctionTestAreIntersectingNegative
(t *testing.T)
src/chapter2/problem7_test.go:40
FunctionTestAreIntersectingPositive
(t *testing.T)
src/chapter2/problem7_test.go:7
FunctionTestAreOneEditAway
(t *testing.T)
src/chapter1/problem5_test.go:7
FunctionTestArePermutations
(t *testing.T)
src/chapter1/problem2_test.go:7
FunctionTestBasicCompress
(t *testing.T)
src/chapter1/problem6_test.go:7
FunctionTestFindLoopNodeNegative
(t *testing.T)
src/chapter2/problem8_test.go:15
FunctionTestFindLoopNodePositive
(t *testing.T)
src/chapter2/problem8_test.go:38
FunctionTestIsPalindrome
(t *testing.T)
src/chapter2/problem6_test.go:7
FunctionTestIsPalindromePerm
(t *testing.T)
src/chapter1/problem4_test.go:7
FunctionTestIsRotation
(t *testing.T)
src/chapter1/problem9_test.go:7
next →1–100 of 122, ranked by callers