Inversion count dry run of code

According to code :
int x= inversion_count(a,s,mid); …(1)
int y=inversion_count(a,mid+1,e); …(2)
int z= merge(a,s,e); …(3)
in this first (1) breaks the array and works further for left part of the array and (2) breaks the array and works further for right part of the array so x and y both divide the array till a single element is present in the array and then the merge function starts merging the array along with increasing the inversion count . Acoording to the recursion tree after the array is divided till a single element is left and then from there it starts to backtrack and merges the array along with increasing the inversion count . This is what I have understood from the video please tell whether the understanding is correct or not

hello @vijayraghav18
yeah u r right.

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.