Skip to content

Instantly share code, notes, and snippets.

@matthieu-D
Created July 21, 2017 12:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matthieu-D/c37259b16124dbf77a8653ae733f92d5 to your computer and use it in GitHub Desktop.
Save matthieu-D/c37259b16124dbf77a8653ae733f92d5 to your computer and use it in GitHub Desktop.
self.startQuickSort = function (){
const LENGTH = 20;
const MAX_VALUE = 2000;
const arr = [...new Array(LENGTH)]
.map(() => Math.round(Math.random() * MAX_VALUE));
const result = self.quickSort(arr, 0, arr.length - 1);
self.postMessage(result);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment