iptteacherssuck
Member
- Joined
- Aug 10, 2002
- Messages
- 193
in page125 of ur book, I think the sorting algorithm is wrong in the middle section where you shift the array by one..
one would think...
store the array's current value to a temp variable
then
shift everything by one..overwriting the current value
then assign current value to the comparison value..
instead u,
store the array's current INDEX to a temp variaable then
shift
then you try to assign back the current value to comparison value using
item [current] whih has been overwrited by the shift...
do you nkow what i mean ??
one would think...
store the array's current value to a temp variable
then
shift everything by one..overwriting the current value
then assign current value to the comparison value..
instead u,
store the array's current INDEX to a temp variaable then
shift
then you try to assign back the current value to comparison value using
item [current] whih has been overwrited by the shift...
do you nkow what i mean ??