View algorithms on Arrays
Question: We have 2 sorted arrays and we want to combine them into a single sorted array. Input: arr1[] = 1, 4, 6, 8, 13, 25 || arr2[] = 2, 7, 10, 11, 19, 50 Output: 1, 2, 4, 6, 7, 8, 10, 11, 13, 19, 50 One of the simplest ways to solve this problem would be to copy both the arrays into a new array and then apply some sorting technique on them. But this method will not utilize the fact that both the arrays are already sorted.…