MCPcopy Create free account

hub / github.com/TheAlgorithms/Go / functions

Functions1,378 in github.com/TheAlgorithms/Go

↓ 95 callersMethodPush
(...T)
structure/tree/example_test.go:12
↓ 65 callersFunctionNew
NewMatrix creates a new Matrix based on the provided arguments.
math/matrix/matrix.go:17
↓ 60 callersMethodKey
()
structure/tree/tree.go:16
↓ 49 callersFunctionNew
New gives new set.
structure/set/set.go:7
↓ 46 callersMethodAdd
Add: adds new element to the set
structure/set/set.go:20
↓ 45 callersMethodRight
()
project_euler/problem_18/problem18.go:39
↓ 44 callersMethodLeft
()
project_euler/problem_18/problem18.go:38
↓ 41 callersMethodDelete
(T)
structure/tree/example_test.go:13
↓ 35 callersMethodLen
Len: gives the length of the set (total no. of elements in set)
structure/set/set.go:24
↓ 31 callersMethodGet
(T)
structure/tree/example_test.go:14
↓ 28 callersMethodFind
Find finds the root of the set to which the given element belongs. It performs path compression to make future Find operations faster.
graph/unionfind.go:37
↓ 27 callersMethodEnqueue
Enqueue adds an item to the rear of the queue. Returns an error if the queue is full.
structure/circularqueue/circularqueuearray.go:43
↓ 27 callersMethodHeight
()
structure/tree/avl.go:42
↓ 27 callersFunctiontestFramework
(t *testing.T, sortingFunction func([]int) []int)
sort/sorts_test.go:12
↓ 26 callersFunctionbenchmarkFramework
END TESTS
sort/sorts_test.go:207
↓ 22 callersMethodGetItems
GetItems: gives the array( []T ) of elements of the set.
structure/set/set.go:26
↓ 21 callersMethodAddEdge
AddEdge will add a new edge between the provided vertices in the graph
graph/coloring/graph.go:34
↓ 21 callersMethodInOrder
()
structure/tree/example_test.go:23
↓ 19 callersMethodColumns
()
math/matrix/matrix.go:87
↓ 18 callersMethodMax
()
structure/tree/example_test.go:18
↓ 18 callersMethodRows
()
math/matrix/matrix.go:83
↓ 17 callersMethodMin
()
structure/tree/example_test.go:19
↓ 17 callersFunctionNewFromElements
NewFromElements creates a new Matrix from the given elements.
math/matrix/matrix.go:43
↓ 16 callersFunctionInt
Int is a function which returns the minimum of all the integers provided as arguments.
math/min/min.go:6
↓ 15 callersMethodAddAtBeg
AddAtBeg Add a node to the beginning of the linkedlist
structure/linkedlist/doubly.go:56
↓ 15 callersFunctionInt
Int is a function which returns the maximum of all the integers provided as arguments.
math/max/max.go:6
↓ 15 callersMethodRemove
Remove zero, one or more words lazily from the Trie, no node is actually removed.
structure/trie/trie.go:92
↓ 15 callersMethodSet
(row, col int, val T)
math/matrix/matrix.go:74
↓ 14 callersFunctionEnQueue
EnQueue it will be added new value into our list
structure/queue/queuearray.go:15
↓ 14 callersFunctionGetTransition
GetTransition Returns ending state for transition σ(fromState,overChar), '-1' if there is none.
strings/ahocorasick/shared.go:121
↓ 14 callersMethodSuccessor
(T)
structure/tree/example_test.go:21
↓ 13 callersMethodIn
In: checks whether item is present in set or not.
structure/set/set.go:28
↓ 13 callersMethodSearch
(key T)
structure/tree/btree.go:74
↓ 13 callersMethodString
String implements the fmt.Stringer interface for Matrix.
math/matrix/string.go:6
↓ 13 callersMethodenqueue
enqueue it will be added new value into queue
structure/queue/queuelinkedlist.go:26
↓ 11 callersMethodHas
(T)
structure/tree/example_test.go:16
↓ 11 callersMethodPredecessor
(T)
structure/tree/example_test.go:20
↓ 11 callersMethodPush
push add value to last index
structure/stack/stacklinkedlist.go:25
↓ 11 callersMethodSubMatrix
SubMatrix extracts a submatrix from the current matrix.
math/matrix/submatrix.go:10
↓ 11 callersMethodverify
--------------- helper functions --------------------------- verify if provided words are present
structure/trie/trie_test.go:131
↓ 11 callersMethodverifySizeCapa
verify expected size and capacity
structure/trie/trie_test.go:150
↓ 10 callersMethodCheckEqual
CheckEqual checks if the current matrix is equal to another matrix (m2). Two matrices are considered equal if they have the same dimensions and all th
math/matrix/checkequal.go:9
↓ 10 callersMethodInsert
Insert zero, one or more words at a Trie node.
structure/trie/trie.go:36
↓ 10 callersMethodIsEmpty
IsEmpty function is check that the array has value or not
structure/dynamicarray/dynamicarray.go:78
↓ 10 callersFunctionNewNode
NewNode creates a new Trie node with initialized children map.
structure/trie/trie.go:14
↓ 9 callersFunctionBitwise
Bitwise computes using bitwise operator the maximum of all the integer input and returns it
math/max/bitwisemax.go:13
↓ 9 callersMethodContains
Contains checks if the given key is stored in the hashmap
structure/hashmap/hashmap.go:75
↓ 9 callersMethodCount
Count Number of nodes in the linkedlist
structure/linkedlist/doubly.go:138
↓ 9 callersMethodDequeue
Dequeue removes and returns the item from the front of the queue. Returns an error if the queue is empty.
structure/circularqueue/circularqueuearray.go:57
↓ 9 callersMethodSubtract
Subtract subtracts two matrices.
math/matrix/subtract.go:10
↓ 9 callersMethodValue
()
project_euler/problem_18/problem18.go:36
↓ 9 callersFunctiongenerateBenchmarkTestCase
This function generate consistent testcase for benchmark test.
search/testcases.go:61
↓ 8 callersMethodDepth
()
structure/tree/example_test.go:17
↓ 8 callersMethodGetID
()
project_euler/problem_18/problem18.go:37
↓ 8 callersMethodMatchDimensions
MatchDimensions checks if two matrices have the same dimensions.
math/matrix/matchdimensions.go:4
↓ 8 callersMethodPut
Put cache with key and value to lru
cache/lru.go:52
↓ 8 callersMethodPut
Put the key in LFU cache
cache/lfu.go:67
↓ 8 callersMethodUnion
Union merges the sets, if not already merged, to which the given elements belong. It performs union by rank to keep the tree as flat as possible.
graph/unionfind.go:46
↓ 7 callersFunctionDeQueue
DeQueue it will be removed the first value that added into the list
structure/queue/queuearray.go:20
↓ 7 callersMethodDeterminant
Calculates the determinant of the matrix. This method only works for square matrices (e.i. matrices with equal rows and columns).
math/matrix/determinant.go:18
↓ 7 callersMethodFind
Find words at a Trie node.
structure/trie/trie.go:43
↓ 7 callersMethodInsert
(Node)
project_euler/problem_18/problem18.go:46
↓ 7 callersFunctionIsBalanced
IsBalanced returns true if provided input string is properly nested. Input is a sequence of brackets: '(', ')', '[', ']', '{', '}'. A sequence of br
other/nested/nestedbrackets.go:23
↓ 7 callersFunctionMillerTestMultiple
MillerTestMultiple is like MillerTest but runs the test for multiple witnesses.
math/prime/millerrabintest.go:85
↓ 7 callersMethodMultiply
Multiply multiplies the current matrix (m1) with another matrix (m2) and returns the result as a new matrix.
math/matrix/multiply.go:15
↓ 7 callersMethodPop
pop remove last item as first output
structure/stack/stacklinkedlist.go:36
↓ 7 callersMethodisInQueue
isInQueue is a method that avoids duplicates in the tree
project_euler/problem_18/tree.go:222
↓ 6 callersMethodAccessNodesByLayer
()
structure/tree/example_test.go:26
↓ 6 callersMethodAddWeightedEdge
AddWeightedEdge will add a new weighted edge between the provided vertices in the graph
graph/graph.go:42
↓ 6 callersMethodCapacity
Capacity returns the number of nodes in the Trie
structure/trie/trie.go:55
↓ 6 callersMethodCopy
()
math/matrix/copy.go:11
↓ 6 callersMethodIsEmpty
Empty check our stack has value or not
structure/stack/stacklinkedlistwithlist.go:56
↓ 6 callersMethodIsEmpty
isEmpty to check our array is empty or not
structure/stack/stacklinkedlist.go:49
↓ 6 callersMethodLen
Len it will return the length of list
structure/queue/queuelinklistwithlist.go:63
↓ 6 callersFunctionMax
Max function - possible duplicate
dynamic/knapsack.go:14
↓ 6 callersMethodPut
Put inserts a new key-value pair into the hashmap
structure/hashmap/hashmap.go:50
↓ 6 callersMethodValidateColorsOfVertex
(colors map[int]Color)
graph/coloring/graph.go:44
↓ 6 callersMethoddequeue
dequeue it will be removed the first value into queue (First In First Out)
structure/queue/queuelinkedlist.go:43
↓ 6 callersFunctionfillList
(list *Cyclic[int], n int)
structure/linkedlist/cyclic_test.go:8
↓ 6 callersMethodheight
(root *AVLNode[T])
structure/tree/avl.go:295
↓ 6 callersMethodleftRotate
(x *AVLNode[T])
structure/tree/avl.go:323
↓ 6 callersMethodrightRotate
(x *AVLNode[T])
structure/tree/avl.go:341
↓ 5 callersMethodAdd
Add function is add new element to our array
structure/dynamicarray/dynamicarray.go:41
↓ 5 callersMethodAddEdge
AddEdge will add a new edge between the provided vertices in the graph
graph/graph.go:36
↓ 5 callersMethodDequeue
Dequeue will be removed the first value that input (First In First Out - FIFO)
structure/queue/queuelinklistwithlist.go:30
↓ 5 callersMethodEmpty
Empty is check our list is empty or not
structure/queue/queuelinklistwithlist.go:68
↓ 5 callersMethodEmpty
()
structure/tree/example_test.go:15
↓ 5 callersFunctionEncrypt
Encrypt encrypts by right shift of "key" each character of "input"
cipher/caesar/caesar.go:10
↓ 5 callersMethodEnqueue
Enqueue will be added new value
structure/queue/queuelinklistwithlist.go:25
↓ 5 callersFunctionExponentiation
Exponentiation returns base^exponent % mod
math/modular/exponentiation.go:24
↓ 5 callersMethodGet
Get value from lru if not found, return nil
cache/lru.go:41
↓ 5 callersMethodGet
Get the key in cache by LFU
cache/lfu.go:53
↓ 5 callersMethodGet
(row, col int)
math/matrix/matrix.go:66
↓ 5 callersMethodIdx
()
sort/heapsort.go:118
↓ 5 callersMethodIsEmpty
IsEmpty checks if the queue is empty.
structure/circularqueue/circularqueuearray.go:78
↓ 5 callersFunctionIsValid
IsValid checks if the input matrix has consistent row lengths.
math/matrix/isvalid.go:6
↓ 5 callersMethodLength
Length return length of our stack
structure/stack/stacklinkedlistwithlist.go:51
↓ 5 callersMethodLength
len use to return length of our stack
structure/stack/stacklinkedlist.go:54
↓ 5 callersFunctionNew
New returns a randomly generated global unique identifier.
strings/guid/guid.go:28
↓ 5 callersFunctionNewPolybius
NewPolybius returns a pointer to object of Polybius. If the size of "chars" is longer than "size", "chars" are truncated to "size".
cipher/polybius/polybius.go:25
next →1–100 of 1,378, ranked by callers