1.0.0 • Published 2 years ago

array-manipulate v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

array-manipulate

SumArray: It will return the sum of all the numbers in the array.

MaxArray: It will return the maximum element in the array.

MinArray: It will return minimum element in the array.

AvgArray: It will return the average of the element of the array with sum(arr)/n. where n is number of element.

UniqArray: It will return the unique array and remove the duplicate in the array.

DescSortArray: It will return the array in descending order.

SortArray: It will return array in ascending order.

InsertArray: It have three input param, (arr, num, index) arr -> it should contain the array in which extra value need to insert. num -> it should contain the value to be inserted. index -> it is the optional param if its given, that value will be inserted in that specific index, otherwise we need to insert index value where we need to insert the value.

DeleteArray: It have three input param, (arr, num, index) arr -> it should contain the array in which extra value need to insert. num -> It is the number which we need to delete from array. index -> It is optional, if it is present element will delete based on this otherwise will go with number given as num.

MergeArray: It will merge two array.

1.0.0

2 years ago