Posts by Lucas Rodrigues Costa • 9 points
1 post
-
0
votes0
answers305
viewsQ: Shell Sort Ordering Algorithm Comparisons and Exchanges Count
How can I count the number of Shell Sort comparisons and exchanges? Where to use counters correctly? void ShellSort(int vetor[], int n) { int i , j , val, comp=0, swap=0; int gap = 1; while(gap <…