Merge Sort using the recursion approach

when we are storing the elements in the temp arrays :
first it will assign the value to temp of kth index then increment the kth index . Example : temp[k++] = a[I++], so I want to know that initialization is done first before the increment operation?

1 Like

@Vikaspal
Hello vikas
yeah you are right first value will assign to temp[k] and then increment.

you can think this line statement i.e
temp[k++]=a[l++]

is equivalent to

temp[k]=a[l];
k++;
l++;

@Vikaspal if u have any further query then pls ask otherwise mark your doubt as resolved