英语翻译
问题描述:
英语翻译
1.Consider the bubble sort algorithm encoded at bubble.m.Observe that if,for any k,no swops are performed by the inner for loop,then the vector x is sorted.
Use this observation to code an improved algorithm,say bubble1.m.Test it for
computational speed against bubble.m for randomly chosen x
2.Devise and implement a computational experiment to assess the growth in com-
plexity of the MATLAB built-in sort function sort as n grows,where n is the
number of numbers to be sorted.
可能的话请大虾帮我编一下哈,周六前要阿,做好的我会额外送点的。虽然我也没多少
答
1 .考虑到泡沫排序算法编码bubble.m .观察认为,如果任何钾,没有swops是由内部的循环,那么x是向量排序.使用此代码观察一个改进的算法,说bubble1.m .它的试验运算速度为bubble.m对随机选择x 2.Devise和执行一项计算实...