难道一个"二叉排序"算法存在吗? [英] Does a "binary sort" algorithm exist?

查看:153
本文介绍了难道一个"二叉排序"算法存在吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一个名为二进制排序排序算法?像归并排序,选择排序,或其他类型的排序,并二进制排序存在吗?

Is there a sorting algorithm that is named "binary sort"? Like merge sort, selection sort, or the other kinds of sorting, does a binary sort exist?

推荐答案

并有折半插入排序。这两个都差不多pretty的。他们都是二次(为O(n ^ 2))时间的算法。

There's this and there's binary insertion sort. The two are pretty similar. They're both quadratic (O(n^2)) time algorithms.

这两种算法做为O(n log n)的的比较数字,但实际上,你还必须四处移动元素,这将使整个算法二次。

Both algorithms do O(n log n) number of comparisons, but in practice you would also have to move elements around, which would make the entire algorithm quadratic.

这篇关于难道一个"二叉排序"算法存在吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆