Computer Science, asked by rutikshagaonkar4091, 3 days ago

Write an algorithm to merge two sorted array into a third array

Answers

Answered by ahwanpradhan
0

Answer:

Method 3 to merge sorted arrays

Declare two arrays and input the array elements in both the arrays.

Take the first element from both the arrays and insert them into a min-heap.

The root element of the min-heap (minimum element) is moved to the output_array and the index of the output_array is incremented.

Explanation:

Similar questions
Math, 8 months ago