Logical error in "copying the rest of second array elements" in the Lecture 20 -> mergeSortedArray.cpp
Tamalckb531 opened this issue · 0 comments
Tamalckb531 commented
//copy kardo second array k remaining element ko
while(j<m) {
arr2[k++] = arr2[j++];
}
here the correct logic will be
//copy kardo second array k remaining element ko
while(j<m) {
arr3[k++] = arr2[j++];
}