You're right the whole list will come in sorted form. You dont need to call bubblesort() again. Take two counters for the two arrays and do what you're doing in your for loop in merge() but make sure...
Type: Posts; User: BEN10
You're right the whole list will come in sorted form. You dont need to call bubblesort() again. Take two counters for the two arrays and do what you're doing in your for loop in merge() but make sure...
One more mistake. Suppose the size of both the arrays is 3, then your for loop in merge() will run till 5 iterations but what will the value of array1[4], array1[5] and same for array2. So the loop...
Do you want the merged array to be in sorted order? If so, then you'll have to call bubblesort function again after calling merge function.