Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何构造一个需要 Theta(n*sqrt(n)) 交换的具有 n 个数字的数组?我没有 Bubble 需要 (n^2-n)/2 交换的最坏情况是当数组以错误的方向排序时。也许当数组的一部分被排序而另一个 par 以错误的方向排序时是可能的?