[Home]
[Contents]
[Chapter]
[Previous Algorithm]
[Next Algorithm]



exchange( r, i, j ) /*** interchange entries r[i] and r[j] ***/ ArrayToSort r; int i, j; { ArrayEntry tempr; tempr = r[i]; r[i] = r[j]; r[j] = tempr; };

C source (41.exch.c)



© Addison-Wesley Publishing Co. Inc.