MCPcopy Create free account

hub / github.com/0xAX/go-algorithms / functions

Functions86 in github.com/0xAX/go-algorithms

↓ 6 callersFunctionInsert
(value interface{}, list *List)
list/list.go:25
↓ 5 callersMethodEnqueue
Puts a given item into Queue
queue/queue.go:50
↓ 5 callersMethodPush
Pushes a given item into Stack
stack/stack.go:23
↓ 4 callersFunctionFastPow
O(log n) function for pow(x, y)
numerical/fast_pow.go:4
↓ 4 callersMethodInsert
(value interface{})
binaryTree/binaryTree.go:34
↓ 4 callersFunctionNew
(compareFun Comparable)
binaryTree/binaryTree.go:12
↓ 4 callersFunctionfactorial
(num int)
numerical/factorial.go:3
↓ 3 callersFunctionBinPow
BinPow evaluates (base ^ deg) % rem
numerical/bin_pow.go:4
↓ 3 callersFunctionGCD
GCD returns gcd of x and y
numerical/gcd.go:4
↓ 3 callersMethodMin
()
binaryTree/binaryTree.go:55
↓ 3 callersFunctionfibo
using recursion
numerical/fibonacci.go:4
↓ 2 callersMethodFirst
()
list/list.go:44
↓ 2 callersFunctionHas
(value interface{}, list *List)
list/list.go:60
↓ 2 callersFunctionLength
(list *List)
list/list.go:117
↓ 2 callersFunctionMax
* O(n) solution for calculating maximum subarray sum. */
numerical/max_sub_array.go:8
↓ 2 callersFunctionPrimesUpTo
PrimesUpTo finds all prime numbers from 1 to upperBound It's implemented using eratosthenes sieve Works in O(upperBound) time and space
numerical/prime_finder.go:6
↓ 2 callersMethodSearch
(value interface{})
binaryTree/binaryTree.go:19
↓ 2 callersFunctionmaxSubarray
(array []int)
numerical/max_sub_array.go:15
↓ 2 callersFunctionsift
* * Heap sort - https://en.wikipedia.org/wiki/Heapsort */
sorting/heap_sort.go:7
↓ 2 callersFunctionswap
(x, y *int)
numerical/swap.go:5
↓ 1 callersMethodDequeue
Extracts first item from the Queue
queue/queue.go:65
↓ 1 callersMethodLast
()
list/list.go:48
↓ 1 callersMethodMax
()
binaryTree/binaryTree.go:48
↓ 1 callersFunctionMerge
* * Merge sort - http://en.wikipedia.org/wiki/Merge_sort */
sorting/merge_sort.go:7
↓ 1 callersFunctionNew
Initialzes new Stack
stack/stack.go:15
↓ 1 callersFunctionNew
Initializes new Queue and return it
queue/queue.go:41
↓ 1 callersFunctionNew
()
list/list.go:19
↓ 1 callersMethodPop
Deletes top of a stack and return it
stack/stack.go:29
↓ 1 callersFunctionRemove
(value interface{}, list *List)
list/list.go:81
↓ 1 callersFunctionarrayEquals
(a, b []int)
numerical/prime_finder_test.go:5
↓ 1 callersFunctionbreadthFirstSearch
(start, end int, nodes []int, edges [][]bool)
searching/breadthFirstSearch.go:23
↓ 1 callersFunctiondfs
(start, end int, nodes []int, edges [][]bool)
searching/depthFirstSearch.go:23
↓ 1 callersFunctionfloydWarshall
(g [][]graph)
graph/shortest_distance_fw.go:16
↓ 1 callersFunctiongetIdx
(target int, nodes []int)
searching/breadthFirstSearch.go:5
↓ 1 callersFunctiongetIdx
(target int, nodes []int)
searching/depthFirstSearch.go:5
↓ 1 callersFunctiongetK
* * Counting sort - https://en.wikipedia.org/wiki/Counting_sort */
sorting/counting_sort.go:7
↓ 1 callersFunctioninorderCopy
inorder traversal algorithm Copies the elements of the bst to the array in sorted order
sorting/treesort.go:37
↓ 1 callersFunctioninsert
insert nodes into a binary search tree
sorting/treesort.go:23
↓ 1 callersFunctionjumpSearch
(arr []int, key int)
searching/jumpSearch.go:5
↓ 1 callersFunctionnewNode
allocating a new node
sorting/treesort.go:18
↓ 1 callersFunctionnotExist
(target int, slice []int)
searching/breadthFirstSearch.go:14
↓ 1 callersFunctionnotExist
(target int, slice []int)
searching/depthFirstSearch.go:14
↓ 1 callersFunctionradixsort
(data []int32)
sorting/radix_sort.go:20
↓ 1 callersFunctionsearch
(arr []int, key int)
searching/linearSearch.go:4
↓ 1 callersFunctiontreesort
(array []int, tree *btree)
sorting/treesort.go:46
FunctionBenchmarkSort
(b *testing.B)
sorting/sort_test.go:40
FunctionBubbleSort
* * Bubble sort - http://en.wikipedia.org/wiki/Bubble_sort */
sorting/bubble_sort.go:7
FunctionCocktailSort
* * Cocktail sort - https://en.wikipedia.org/wiki/Cocktail_sort */
sorting/cocktail_sort.go:7
FunctionCombSort
* * Comb sort - https://en.wikipedia.org/wiki/Combsort */
sorting/comb_sort.go:7
FunctionCountingSort
(arr []int)
sorting/counting_sort.go:23
FunctionGnomeSort
* * Gnome sort - https://en.wikipedia.org/wiki/Gnome_sort */
sorting/gnome_sort.go:6
FunctionHeapSort
(arr []int)
sorting/heap_sort.go:35
FunctionInsertionSort
* * Insertion sort - https://en.wikipedia.org/wiki/Insertion_sort */
sorting/insertion_sort.go:7
FunctionMergeSort
(arr []int)
sorting/merge_sort.go:29
MethodNext
()
list/list.go:56
FunctionOddEvenSort
* * Odd-Even sort - https://en.wikipedia.org/wiki/Odd-even_sort */
sorting/odd_even_sort.go:7
MethodPeek
Peek returns top of a stack without deletion
stack/stack.go:41
MethodPrev
()
list/list.go:52
FunctionRandArray
(n int)
utils.go:8
FunctionSelectionSort
* * Selection sort - http://en.wikipedia.org/wiki/Selection_sort */
sorting/selection_sort.go:7
FunctionShellSort
* * Shell sort - http://en.wikipedia.org/wiki/Shellsort */
sorting/shell_sort.go:6
FunctionTestBinPow
TestBinPow tests binpow function
numerical/bin_pow_test.go:6
FunctionTestFastPow
TestFastPow tests fastpow function
numerical/fast_pow_test.go:6
FunctionTestFibonacci
(t *testing.T)
numerical/fibonacci_test.go:5
FunctionTestGcd
TestGcd tests gcd
numerical/gcd_test.go:6
FunctionTestPrimeFinder
TestPrimeFinder tests prime finding
numerical/prime_finder_test.go:18
FunctionTestQueue
(t *testing.T)
queue/queue_test.go:30
FunctionTestSort
(t *testing.T)
sorting/sort_test.go:26
FunctionTestStack
(t *testing.T)
stack/stack_test.go:5
FunctionTestSwap
(t *testing.T)
numerical/swap_test.go:9
FunctionTest_New
(t *testing.T)
list/list_test.go:5
FunctionTest_binaryTree
(t *testing.T)
binaryTree/binaryTree_test.go:9
FunctionTest_minmax
(t *testing.T)
binaryTree/binaryTree_test.go:28
FunctionTestfactorial
Testfactorial tests factorial function
numerical/factorial_test.go:6
Functioncompare
(x interface{}, y interface{})
binaryTree/binaryTree_test.go:5
Functionmain
tester
sorting/treesort.go:57
Functionmain
()
sorting/radix_sort.go:12
Functionmain
()
numerical/swap.go:9
Functionmain
()
numerical/max_sub_array.go:25
Functionmain
()
graph/shortest_distance_fw.go:43
Functionmain
()
searching/breadthFirstSearch.go:50
Functionmain
()
searching/linearSearch.go:14
Functionmain
()
searching/jumpSearch.go:36
Functionmain
()
searching/binarySearch.go:5
Functionmain
()
searching/depthFirstSearch.go:50
Functionquick_sort
(arr []int)
sorting/quick_sort.go:9