1.0.8 • Published 2 years ago

dsia v1.0.8

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

dsia

dsia is the shortened name of data structure including algorithm.

Data Structure

Linked List

ObjectExtendConstructor
LinkedListnone
DoubleLinkedListLinkedListnone

Tree

ObjectExtendConstructor
Treedegree_of_tree: number
BinaryTreeTreenone
BinarySearchTreeBinaryTreenone
Heapis_max_heap: boolean = false

Graph

ObjectExtendConstructor
Graphnone
UndirectedGraphGraphnone
DirectedGraphGraphnone

Algorithm

Tree Algorithm

FunctionClassParameters
preOrderTraverseBinaryTree(node: Node, output: number[])
inOrderTraverseBinaryTree(node: Node, output: number[])
postOrderTraverseBinaryTree(node: Node, output: number[])
levelOrderTraverseBinaryTree(node: Node, output: number[])

Graph Algorithm

FunctionClassParametersDescription
dfsGraph(begin: any, end: any = null)If you put an end value, This method would process from begin to end. On the other way, if you didn't an end value, This method would process about all of the vertexes.
bfsGraph(begin: any, end: any = null)Same as above.
dijkstraDirectedGraph(begin: string, end: string = null)If you put an end value, This method would return an object that included distance and route path. On the other way, if you didn't an end value, This method would return each vertex that included distance and route what is compressed path to the vertex.

sort

FunctionParameters
bubbleSortNumber[]
selectionSortNumber[]
insertSortNumber[]
mergeSortNumber[]
quickSortNumber[]
1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago