i am not getting how after dividing up to a base case digits are merging for example:
if we have 6 4 1 3 2 in array
so according to algo;
we first divide it into two half ;
6 4 1 and 3 2
again 6 4 1 will be divide in two part and so on ,at the end we’ll get 6,4 and 1 ,
now i am not getting how this half is sorting i mean
how just after mergesort(a,s,mid)
merge(a,s,e) is working we have mergesort(a,mid+1,e) in between