有一个题目不知道啥意思
英文版本C语言教程上有一道题:Modify the function bubble() so that it terminates after the first pass in which no two elements are interchanged.
C中好像没有bubble()这个函数.
[解决办法]
冒泡排序
[解决办法]
他的意思应该是书中有bubble这个函数吧 要不怎么让你改呢
[解决办法]
说的是对冒泡的改进 ,
当没有元素交换时,
就停止排序,表示已经排序完成!!!
添加一个元素交换的标志位就可以完成!!!