00:01
All right, so this question says, write a program to merge two arrays.
00:07
For example, consider two arrays a and b, and then sort the array.
00:14
So let's say a is going to be, so it's important on five first.
00:19
So a is going to be this array.
00:26
So we'll say array, 10, 25, 35, 40, 55.
00:33
And b is this array.
00:34
It's going to be array 1535, 20, 45, 65.
00:46
So after sorting a, so let's sort that.
00:50
We'll say sorted.
00:54
And we'll sort b as well.
00:57
So after sorting, a is going to be equal to this, and b is going to be equal to this.
01:06
So that works.
01:08
And so the merged array should be another array, with these elements.
01:16
So let's do that.
01:17
We can use the nump by concatenate function, although it's c equals catnate a b, a comma, so now we have c and that is equal to this array.
01:36
Okay, so actually i want to submerge these arrays by taking the individual values of the two arrays one by one.
01:53
And inserting them in the appropriate position.
01:59
So i guess it wants us to sort this as well.
02:03
So what it wants us to do, i guess, is go 4i in range, lena.
02:10
We're going to say c equals array, lena plus lenb.
02:20
And so we're going to say c, and we're going to start with the make out an empty array...