I have the pseudocode for my bubble sort but I have a question?
Pseudocode:
IF full array key (start-loc) > full array key (next-loc)
THEN move full array entry (next-loc) to save entry
MOVE full array entry (start-loc) to full array entry (next-loc)
MOVE save entry to full array entry (start-loc)
ADD 1 to swap -count
ELSE continue
END-IF
How I wrote my source code:
IF (strcmp(cp[StartLoc].number, cp [NextLoc].number)>0);
NextLoc= SaveEntry ????(Is the correct?)
SaveEntry=StartLoc;
swap-count++;
Question???????
Is my source code correct ? If not what do I need to fix?