why we are merging two arrays …why we are not returning the value of cnt ? here before returning the cnt , we are meging the two arrays and copy them to the original array. why the merging part is important when our main focus is cnt
Why we are merging two arrays
hello @rick711c
after executing any function when we return to parent function(the calling function) and then it will also need both half sorted otherwise it will not be able to apply merge logic to compute count .
thats why it is need to to merge the two arrays into sorteed fashion