IDEA Instructions
developed by
Sándor P. Fekete
and
Sebastian Morr.
Mergesort library for JavaScript. See docs. Parent is aureooms/js-sort.
import * as array from '@aureooms/js-array' ;
import * as merging from '@aureooms/js-merging' ;
import * as mergesort from '@aureooms/js-mergesort' ;
const sort = mergesort.recursive( merging.tapemerge , array.copy ) ;
let data = [ /*...*/ ] ;
let a = data.slice();
let b = new Array(data.length) ;
import { increasing } from '@aureooms/js-compare' ;
sort(increasing, a, 0, a.length, b, 0, b.length) ;
import { issorted } from '@aureooms/js-sort' ;
issorted(increasing, b, 0, b.length) ; // true