Changes

Jump to navigation Jump to search
No change in size ,  20:56, April 1, 2008
m
Line 9: Line 9:  
           '''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(x)                            //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
      −
[[category:computer science]]
+
[[Category:Computer Science]]

Navigation menu