Changes

Jump to navigation Jump to search
No change in size ,  16:16, July 3, 2007
m
Line 10: Line 10:  
           '''while''' y > -1 '''and''' Vals(x) > nextval                      //go through all the values to left and compare, the inequality sign will
 
           '''while''' y > -1 '''and''' Vals(x) > nextval                      //go through all the values to left and compare, the inequality sign will
 
                                                                   //vary based upon the sorting type (nondecreasing or nonincreasing)
 
                                                                   //vary based upon the sorting type (nondecreasing or nonincreasing)
−
                 Vals(y + 1) = Vals(i)                            //compare the value to the left because the conditions haven't been met yet
+
                 Vals(y + 1) = Vals(x)                            //compare the value to the left because the conditions haven't been met yet
 
                 y--                                              //decrease the counter
 
                 y--                                              //decrease the counter
 
           Vals(y + 1) = nextval                                  //store the value in the right position
 
           Vals(y + 1) = nextval                                  //store the value in the right position
3

edits

Navigation menu