0.2.0
Class for sorting arrays containing numerical data.
Sort an array of numbers using the Bubble Sort algorithm. Iterating through all items in the array, we compare the current item with the next one in the array. If the current one is greater, the positions are swapped. This is repeated until there is no more swapping necessary.
Array<Number>
:
An array of sorted numbers.
Sort an array of numbers using the Insertion Sort algorithm. Insertion merge is a simple sorting algorithm that builds the final sorted array (or list) one item at a time. The array elements are compared with each other sequentially and then arranged simultaneously in some particular order. The analogy can be understood from the style we arrange a deck of cards.
Array<Number>
:
An array of sorted numbers.
Sort an array of numbers using the Merge Sort algorithm. The MergeSort function repeatedly divides the array into two halves until we reach a stage where we try to perform MergeSort on a subarray of size 1 i.e. p == r. After that, the merge function comes into play and combines the sorted arrays into larger arrays until the whole array is merged.
Array<Number>
:
An array of sorted numbers.
Sort an array of numbers using the Quick Sort algorithm. QuickSort is a Divide and Conquer algorithm. It picks an element as pivot and partitions the given array around the picked pivot. There are many different versions of quickSort that pick pivot in different ways.
Array<Number>
:
An array of sorted numbers.
Class for working with arrays of any types
Chunk one flat array into a series of arrays of a certain size.
(Array)
A an array of values (string, number, etc.).
(Number)
The size of chunks to split the array into.
Array<Array>
:
An array containing arrays of the specified size, containing
the original data from the flat array.
Class for working with arrays containing numbers and numerical data.
Class for working with arrays containing objects with key/value data.
Normalize the values in an object array associated with a specific key between 0 and 1 or a custom range based on the minimums and maximums contained in the object array by that key.
(Array)
A an array containing objects.
(String)
A key which exists in the objects in the array, with associated numerical values.
(Number
= 0
)
(Optional) A custom minimum value to normalize to.
(Number
= 1
)
(Optional) A custom maximum value to normalize to.
Array
:
The modified object array.
Normalize the values in an object array associated with specific keys between 0 and 1 or a custom range based on the minimums and maximums contained in the object array by those keys.
(Array)
A an array containing objects.
(Number
= 0
)
(Optional) A custom minimum value to normalize to.
(Number
= 1
)
(Optional) A custom maximum value to normalize to.
Array
:
The modified object array.
Normalize all the values in an object array associated with keys which have numerical value pairs between 0 and 1 or a custom range based on the minimums and maximums contained in the object array by those keys.
(Array)
A an array containing objects.
(Number
= 0
)
(Optional) A custom minimum value to normalize to.
(Number
= 1
)
(Optional) A custom maximum value to normalize to.
Array
:
The modified object array.
Turn a flat array of objects containing common properties into a nested object hierarchy based on parent/child keys. ex. Folders, File Versions, etc.
(String)
The common property of the objects to establish primary identity.
(String)
The common property of the objects to establish parent -> child relationships.
Array<Object>
:
An array of objects, nested using the .children accessor based on the
parent -> child hierarchy established.
Stack data structure.
Get the count of the number of items in the stack.
number
:
The number of items in the stack.
Remove the top item from the stack.
any
:
Get the item at the top of the stack, without removing it.
any
:
The item at the top of the stack.
Class for creating mock data for algorithm/visualization testing.
Create mock data for a network/graph algorithm.
(any)
The amount of data points to create
{nodes: Array<{size: Number, x: null, y: null}>, links: Array<{source: number, target: number}>}
:
An array
of objects which can be used as nodes and connections in network/graph algorithm testing scenarios.
Class for working with numbers and numerical data.
Normalize a number between 0 and 1 based on a known minimum and maximum value.
Number
:
The random float between the min and max input.
Normalize a number between a custom range (max,min) based on a known minimum and maximum value of the original dataset.
(Number)
The value to normalize.
(Number)
The minimum extent in the original range.
(Number)
The maximum extent in the original range.
(Number)
The minimum extent in the new, custom range.
(Number)
The maximum extent in the new, custom range.
Number
:
Class for working with string data.
Class for working with Cyrillic string data.
Get an array of all the Cyrillic words from a monolithic string.
(any)
The string to break up into individual words.
RegExpMatchArray
:
An array of individual Cyrillic words.
Class for working with Latin string data.
Queue data structure.