A doubt over here

As in the merge function, We are merging two arrays so in the merge function, we need to pass the two arrays, only then it will gonna work. We are just passing one array and having s and e on that array only.
Please tell ASAP.

hello @cbcao263,
yeah right we are passing single array (from s to e ) to thr merge function.
but in merge function we are treating s to mid as one array and from mid+1 to e as second array.

and then by using merge logic we are merging this two differnt part of same array .

I have a doubt in merging, Sir when we use s and e over there that will gonna work for a single array only. Why for 2 arrays.
I understand the concept how the arrays are being merged but have a very basic doubt in this one. So Please help for that.

see range s…e is representing two array.

values of first array is stored from range s… mid and
values of second array is stored from range mid+1 …e

here mid is equal to (s+e)/2

Ohk Sir, I think here the a here is the complete array that we are passing and I and j are the two pointers on that array only.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.