Write a function using python syntax (use function name: sortof)that receives two inputs. The first input (data_sorted) is an array of data, where all data values arereal, positive, non-zero numbers sorted from smallest to largest and there are noduplicates. The second input (data_unsorted) is another array of data, where all data values are real, positive, non-zero numbers but stored in the array in any random order(not sorted). Write an algorithm that inserts the unsorted data into the sorted data and outputs a single array (alldata_sorted) that contains all the data combined and sorted from smallest to largest. You may not use any built in functions for this algorithm(except you may use len)
Write a function using python syntax (use function name: sortof)that receives two inputs. The first input (data_sorted) is an array of data, where all data values arereal, positive, non-zero numbers sorted from smallest to largest and there are noduplicates. The second input (data_unsorted) is another array of data, where all data values are real, positive, non-zero numbers but stored in the array in any random order(not sorted). Write an
The answer is given in Python along with output and code screenshot
Step by step
Solved in 4 steps with 2 images