1.0.0 • Published 4 years ago

@softnami/mergesort v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

#MergeSort:

import {MergeSort} from '@softnami/mergesort'

let arry:number[] = [];

for(let i = 0; i<15000; i++){
	arry[i] =Math.floor(Math.random() * 15000) + 1;
}

console.log('Unsorted');
console.time('time to sort');

let sorter:MergeSort = new MergeSort();
sorter.sort(arry);

console.timeEnd('time to sort');
console.log('time to sort');

#Daily Coding Question: Visit http://www.softnami.com/dailycoding/signup.html to get daily coding question at your email.