Sorting Algorithms (bubble sort, merge sort)
What aspect of sorting algorithms does this code help analyze?
function compareSort(arr) {
const arr1 = [...arr];
const arr2 = [...arr];
console.time('bubble');
bubbleSort(arr1);
console.timeEnd('bubble');
console.time('merge');
mergeSort(arr2);
console.timeEnd('merge');
}