MCPcopy Create free account

hub / github.com/FSou1/typescript-algorithms / functions

Functions110 in github.com/FSou1/typescript-algorithms

↓ 55 callersMethodaddEdge
* @param {GraphEdge} edge * @return {Graph} * @memberof Graph
src/data-structures/graph/graph.ts:42
↓ 42 callersMethodtoString
* Returns an string representation of a linked list * @param {(value:any)=>string} callback? * @returns string
src/data-structures/linked-list/linkedList.ts:226
↓ 33 callersMethodappend
* Append a new element to a linked list * @param {any} value * @returns LinkedList
src/data-structures/linked-list/linkedList.ts:29
↓ 30 callersMethodgetKey
* @return {string} * @memberof GraphVertex
src/data-structures/graph/graphVertex.ts:28
↓ 21 callersMethodpush
* Appends a new element to a stack * @param {any} value
src/data-structures/stack/stack.ts:22
↓ 18 callersMethodset
(key: string, value: any)
src/data-structures/hash-table/hashTable.ts:17
↓ 13 callersMethodenqueue
* @param {*} item * @return {Queue} * @memberof Queue
src/data-structures/queue/queue.ts:23
↓ 12 callersMethodfind
* Find an element in a linked list * @param {} {value=null * @param {} callback=null} * @returns LinkedListNode
src/data-structures/linked-list/linkedList.ts:145
↓ 12 callersMethodgetVertex
* @param {GraphVertex} vertex * @return {GraphVertex} * @memberof Graph
src/data-structures/graph/graph.ts:68
↓ 12 callersMethodhash
(key: string)
src/data-structures/hash-table/hashTable.ts:10
↓ 10 callersMethodhas
(key: string)
src/data-structures/hash-table/hashTable.ts:34
↓ 9 callersMethodaddVertex
* Add a vertex to the graph * * @param {GraphVertex} vertex * @return {Graph} * @memberof Graph
src/data-structures/graph/graph.ts:32
↓ 8 callersMethoddequeue
* * * @return {Queue} * @memberof Queue
src/data-structures/queue/queue.ts:34
↓ 7 callersMethoddelete
* Delete an element from a linked list * @param {any} value * @returns LinkedListNode
src/data-structures/linked-list/linkedList.ts:64
↓ 7 callersMethodget
(key: string)
src/data-structures/hash-table/hashTable.ts:38
↓ 6 callersMethodgetVertices
* * * @return {GraphVertex[]} * @memberof Graph
src/data-structures/graph/graph.ts:78
↓ 5 callersMethodisEmpty
* Returns true if a stack is empty * @returns boolean
src/data-structures/stack/stack.ts:42
↓ 5 callersMethodpop
* Removes the last element from a stack and returns it * @returns any
src/data-structures/stack/stack.ts:50
↓ 4 callersFunctiondepthFirstSearch
( graph: Graph, startVertex: GraphVertex, config: GraphConfig = null, )
src/algorithms/graph/depth-first-search/depthFirstSearch.ts:14
↓ 4 callersFunctionfindPeak
(array: number[][])
src/algorithms/search/peak-finder/2d/peakFinder2d.ts:10
↓ 4 callersMethodgetNeighbors
* @param {GraphVertex} vertex * @return {GraphVertex[]} * @memberof Graph
src/data-structures/graph/graph.ts:97
↓ 4 callersMethodpeek
* Returns the first element of a stack * @returns any
src/data-structures/stack/stack.ts:30
↓ 4 callersMethodreverse
* Reverse a linked list. * Origin: https://github.com/trekhleb/javascript-algorithms/blob/4b6c601158b7b0284c9aad3a899fe97285fc7c1a/src/data-struc
src/data-structures/linked-list/linkedList.ts:171
↓ 4 callersMethodtoString
* Returns a string representation of a stack * @param {(value:any)=>string} callback?
src/data-structures/stack/stack.ts:62
↓ 3 callersMethoddelete
(key: string)
src/data-structures/hash-table/hashTable.ts:44
↓ 3 callersMethoddeleteHead
* Delete a head of a linked list * @returns LinkedListNode
src/data-structures/linked-list/linkedList.ts:122
↓ 3 callersMethoddeleteTail
* Delete a tail of a linked list * @returns LinkedListNode
src/data-structures/linked-list/linkedList.ts:98
↓ 3 callersFunctionfindPeak
(array: number[])
src/algorithms/search/peak-finder/1d/peakFinder1d.ts:8
↓ 3 callersMethodgetLength
* @return {number} * @memberof Queue
src/data-structures/queue/queue.ts:52
↓ 3 callersMethodgetValues
()
src/data-structures/hash-table/hashTable.ts:64
↓ 3 callersMethodisEmpty
* @return {boolean} * @memberof Queue
src/data-structures/queue/queue.ts:44
↓ 3 callersMethodprepend
* Prepend a new element to a linked list * @param {any} value
src/data-structures/linked-list/linkedList.ts:48
↓ 3 callersFunctionsort
(array: number[])
src/algorithms/sort/heap/heapSort.ts:8
↓ 3 callersFunctionswap
(array: number[], i: number, j: number)
src/algorithms/sort/heap/heapSort.ts:111
↓ 2 callersFunctionbellmanFord
( graph: Graph, source: GraphVertex, )
src/algorithms/graph/bellman-ford/bellmanFord.ts:16
↓ 2 callersFunctionbreadthFirstSearch
( graph: Graph, startVertex: GraphVertex, config: GraphConfig = null, )
src/algorithms/graph/breadth-first-search/breadthFirstSearch.ts:15
↓ 2 callersFunctionbuildMaxHeap
(array: number[])
src/algorithms/sort/heap/heapSort.ts:38
↓ 2 callersFunctiondotProduct
* Calculates dotProduct between two vectors * * @param {number[]} vector1 * @param {number[]} vector2 * @return {number}
src/algorithms/string/document-distance/documentDistance.ts:72
↓ 2 callersMethodequals
(vector: vec2)
src/data-structures/vector/vec2.ts:24
↓ 2 callersMethodfromArray
* @param {any[]} items
src/data-structures/linked-list/linkedList.ts:199
↓ 2 callersFunctiongetDigit
(number: number, n: number)
src/algorithms/sort/radix/radixSort.ts:86
↓ 2 callersFunctiongetWordFrequencies
* Transforms the 'this is a fox this' string to an array of word frequencies: * [['this', 2], ['is', 1], ['a', 1], ['fox', 1]] * @param {string} str
src/algorithms/string/document-distance/documentDistance.ts:36
↓ 2 callersFunctionheapify
( array: number[], n: number, i: number, )
src/algorithms/sort/heap/heapSort.ts:65
↓ 2 callersFunctionmagnitude
* * * @param {number[]} vector * @return {number}
src/algorithms/string/document-distance/documentDistance.ts:95
↓ 2 callersFunctionmerge
(left: number[], right:number[])
src/algorithms/sort/merge/mergeSort.ts:33
↓ 2 callersMethodtoArray
* Returns an array representation of a linked list * @returns LinkedListNode
src/data-structures/linked-list/linkedList.ts:209
↓ 2 callersMethodtoArray
* Returns an array representation of a stack * @returns any
src/data-structures/stack/stack.ts:70
↓ 2 callersMethodtoString
* @return {string} * @memberof Graph
src/data-structures/graph/graph.ts:120
↓ 1 callersMethodadd
(vector: vec2)
src/data-structures/vector/vec2.ts:28
↓ 1 callersFunctionbinarySearch
(array: number[], element: number, left: number, right: number)
src/algorithms/search/binary/binarySearch.ts:9
↓ 1 callersFunctioncompression
(input: string)
src/algorithms/string/compression/compression.ts:8
↓ 1 callersMethodcopy
()
src/data-structures/vector/vec2.ts:15
↓ 1 callersFunctioncosineSimilarity
* Calculates cosine similarity between two non-zero vectors as: * d(x,y) = inner_product(x,y) / (norm(x)*norm(y)) * where: * inner_product(x,y)
src/algorithms/string/document-distance/documentDistance.ts:55
↓ 1 callersFunctioncountingSort
* Sort an array with a counting sort algorithm, which is based on digit * * @param {number[]} array * @param {number} digit * @return {number[]}
src/algorithms/sort/radix/radixSort.ts:38
↓ 1 callersFunctiondepthFirstSearchRecursive
* * * @param {Graph} graph * @param {GraphVertex} currentVertex * @param {GraphConfig} config
src/algorithms/graph/depth-first-search/depthFirstSearch.ts:38
↓ 1 callersFunctiondijkstra
( graph: Graph, source: GraphVertex, )
src/algorithms/graph/dijkstra/dijsktra.ts:17
↓ 1 callersMethoddivide
(vector: vec2)
src/data-structures/vector/vec2.ts:40
↓ 1 callersFunctiondocumentDistance
(a: string, b: string)
src/algorithms/string/document-distance/documentDistance.ts:10
↓ 1 callersMethodfindEdge
* @param {GraphVertex} start * @param {GraphVertex} end * @return {GraphEdge} * @memberof Graph
src/data-structures/graph/graph.ts:107
↓ 1 callersFunctionfindMax
(array: number[])
src/algorithms/sort/radix/radixSort.ts:74
↓ 1 callersMethodgetEdges
* * * @return {GraphEdge[]} * @memberof Graph
src/data-structures/graph/graph.ts:88
↓ 1 callersMethodgetKeys
()
src/data-structures/hash-table/hashTable.ts:60
↓ 1 callersMethodhash
* Creates a hash representation of the word * * @param {string} word * @return {number} * @memberof SimpleHasher
src/algorithms/cryptography/polynomial-hash/simpleHash.ts:28
↓ 1 callersFunctioninitConfig
* @param {GraphConfig} config * @return {GraphConfig}
src/algorithms/graph/breadth-first-search/breadthFirstSearch.ts:52
↓ 1 callersFunctioninitConfig
* @param {GraphConfig} config * @return {GraphConfig}
src/algorithms/graph/depth-first-search/depthFirstSearch.ts:59
↓ 1 callersFunctionisFirstEnter
* @param {GraphVertex} vertex * @return {boolean}
src/algorithms/graph/breadth-first-search/breadthFirstSearch.ts:64
↓ 1 callersFunctionisFirstEnter
* @param {GraphVertex} vertex * @return {boolean}
src/algorithms/graph/depth-first-search/depthFirstSearch.ts:71
↓ 1 callersMethodlength
()
src/data-structures/vector/vec2.ts:55
↓ 1 callersMethodmultiply
(vector: vec2)
src/data-structures/vector/vec2.ts:36
↓ 1 callersMethodnegate
()
src/data-structures/vector/vec2.ts:19
↓ 1 callersMethodnormalize
()
src/data-structures/vector/vec2.ts:49
↓ 1 callersFunctionpermutationsV1
(a: string, b: string)
src/algorithms/string/permutation/permutationsV1.ts:7
↓ 1 callersFunctionpermutationsV2
(a: string, b: string)
src/algorithms/string/permutation/permutationsV2.ts:9
↓ 1 callersMethodreset
()
src/data-structures/vector/vec2.ts:10
↓ 1 callersMethodroll
* Creates hash representation of the word based on * previous word (shifted by one character left) hash value * * @param {number} prevHash
src/algorithms/cryptography/polynomial-hash/simpleHash.ts:52
↓ 1 callersFunctionrotateMatrix
(matrix: number[][])
src/algorithms/string/rotate-matrix/rotateMatrix.ts:6
↓ 1 callersMethodscale
(value: number)
src/data-structures/vector/vec2.ts:44
↓ 1 callersFunctionsort
(array: number[])
src/algorithms/sort/merge/mergeSort.ts:8
↓ 1 callersFunctionsort
(array: number[])
src/algorithms/sort/insertion/simple/insertionSort.ts:8
↓ 1 callersFunctionsort
(array: number[], k: number = 255)
src/algorithms/sort/counting/countingSort.ts:9
↓ 1 callersFunctionsort
(array: number[])
src/algorithms/sort/radix/radixSort.ts:8
↓ 1 callersMethodsubtract
(vector: vec2)
src/data-structures/vector/vec2.ts:32
↓ 1 callersMethodtoString
* @return {string} * @memberof Queue
src/data-structures/queue/queue.ts:60
↓ 1 callersFunctiontopological
( graph: Graph, config: GraphConfig = null, )
src/algorithms/graph/topological/topological.ts:15
↓ 1 callersFunctionuniqueV1
(input: string)
src/algorithms/string/unique/uniqueV1.ts:8
↓ 1 callersFunctionuniqueV2
(input: string)
src/algorithms/string/unique/uniqueV2.ts:9
↓ 1 callersFunctionurlify
(input: string, len: number)
src/algorithms/string/urlify/urlify.ts:7
MethodaddEdge
* @param {GraphEdge} edge * @return {GraphVertex} * @memberof GraphVertex
src/data-structures/graph/graphVertex.ts:37
FunctioncomparatorFunction
(a, b)
src/data-structures/linked-list/__test__/linkedList.test.ts:196
Methodconstructor
(x: number, y: number)
src/data-structures/vector/vec2.ts:5
Methodconstructor
(value: any, next: LinkedListNode = null)
src/data-structures/linked-list/linkedListNode.ts:6
Methodconstructor
* Create an instance of LinkedList. * @param {(a:any,b:any)=>number} comparator?
src/data-structures/linked-list/linkedList.ts:18
Methodconstructor
*Creates an instance of Stack. * @memberof Stack
src/data-structures/stack/stack.ts:14
Methodconstructor
*Creates an instance of Queue. * @memberof Queue
src/data-structures/queue/queue.ts:14
Methodconstructor
(bucketsLength: number = 32)
src/data-structures/hash-table/hashTable.ts:5
Methodconstructor
* Creates an instance of Graph. * @param {boolean} directed * @memberof Graph
src/data-structures/graph/graph.ts:20
Methodconstructor
*Creates an instance of GraphConfig. * @param {*} {enterVertex, leaveVertex, allowEnterVertex} * @memberof GraphConfig
src/data-structures/graph/graphConfig.ts:20
Methodconstructor
*Creates an instance of GraphEdge. * @param {GraphVertex} startVertex * @param {GraphVertex} endVertex * @param {number} [weight=0] * @mem
src/data-structures/graph/graphEdge.ts:22
Methodconstructor
*Creates an instance of GraphVertex. * @param {string} key * @memberof GraphVertex
src/data-structures/graph/graphVertex.ts:19
Methodconstructor
*Creates an instance of SimpleHasher * @param {*} [base=DEFAULT_BASE] * @memberof SimpleHasher
src/algorithms/cryptography/polynomial-hash/simpleHash.ts:17
next →1–100 of 110, ranked by callers