问题描述
我得到了以下算法:
Supersort(A,i,j):
if(j = i): return
if(j = i + 1):
if(A[i] > A[j]):
swap(A[i],A[j])
else:
k = floor of ( (j-i+1)/3 )
Supersort(A,j-k) // sort first two thirds
Supersort(A,i+k,j) // sort last two thirds
Supersort(A,j-k) // sort first two thirds again
我真的不确定在最坏的情况下如何分析该算法进行多少次比较。我不想给我答案,我什至不知道如何开始解决这个问题。谢谢您的帮助
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)