time complexity merging unsorted list code example
Example: write a function that takes in 2 arrays , merges them together an then return the new array sorted
// const twoArraysSorted = (arr) => {
// let copy = [...];
// copy.sort((a,b) => a-b).map(el=> el*2)
// return arr
// }