Nonvoluntary Professional Mangling
Get unlimited public & private packages + package-based permissions with npm Pro.Get started »

@softnami/quicksort

1.0.5 • Public • Published

Quicksort:

import {Quicksort} from '@softnami/quicksort';
 
let arry: number[] = [];
 
for (let i = 0; i < 10; i++) {
  arry[i] = Math.floor(Math.random() * 5 + 0);
}
 
for (let i = 0; i < 10; i++) {
 
  let randomindex = Math.floor(Math.random() * 9 + 0);
  let temp = arry[i];
  arry[i] = arry[randomindex];
  arry[randomindex] = temp;
}
 
console.log('UnsortedArray', arry);
 
 
let sorter: Quicksort = new Quicksort();
            sorter.sort(arry);
 
console.log('Sorted Array', arry);
 

Daily Coding Question:

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

Install

npm i @softnami/quicksort

DownloadsWeekly Downloads

1

Version

1.0.5

License

MIT

Unpacked Size

2.86 kB

Total Files

3

Last publish

Collaborators

  • avatar