The Make it Make Sense Unit

mern architecture

Time Activity
6:30 - 8:30 Watching Videos
8:30 - 10:45 pm Testing & Divide and Conquer Sorting Algorithms
10:45pm Exit Tickets

Once you complete the videos and testing, try to take what you learned and complete Merge Sort and Quick Sort

function mergeSort(arr) {
  // YOUR CODE HERE

}


// HELPER FUNCTION: merge two sorted arrays
function merge(arr1, arr2) {
  var result = [];

  while (arr1.length && arr2.length) {
    if(arr1[0] <= arr2[0]) {
      result.push(arr1.shift());
    } else {
      result.push(arr2.shift());
    }
  }

  return result.concat(arr1, arr2);
}


function quickSort(arr){
  // YOUR CODE HERE

}