test whether the number of comparison is over 1000, if it is then print every 1000th number, and then print the total number of comparisons
Type: Posts; User: mia_tech
test whether the number of comparison is over 1000, if it is then print every 1000th number, and then print the total number of comparisons
ok, I got it.... is working now, but I have one more question, if I need to display the same for both selection sort and merge sort, wouldn't be better to create a method for that?
I was thinking to implement a if statement right after counter that output to screen in increments of 1000, but it is not working, it outputs wired numbers, besides what if total comparisons are...
gusy, I have the following merge sort algorithm, and if the number of comparisons is over 1000, I need to display every 1000th comparison, but in this case is kind of tricky since the merge sort is...