Question: Data Structures and Algorithms Merge two unsorted lists. Use the binary tree shown in class. What is O(nLOGn)? list1={16, 2, 49, 7,18} list2={10, 39, 8,
Data Structures and Algorithms
Merge two unsorted lists. Use the binary tree shown in class. What is O(nLOGn)?
list1={16, 2, 49, 7,18} list2={10, 39, 8, 28, 40} function nLogNfunc(n){ let y = n; while(n>1){ n = Math.floor(n/2); for(let i = 1; i <= y; i++){ console.log(i); } } }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
