Sorting algorithms/Bubble sort: Difference between revisions

Content added Content deleted
Line 473: Line 473:
if ${ft[$(( a[j+1] < a[j] ))]}
if ${ft[$(( a[j+1] < a[j] ))]}
then
then
t=${a[j+1]}
t=${a[j+1]}
a[j+1]=${a[j]}
a[j+1]=${a[j]}
a[j]=$t
a[j]=$t
fi
fi
t=$(( ++j ))
t=$(( ++j ))
done
done