什么是泡沫的那种好? [英] What is a bubble sort good for?

查看:188
本文介绍了什么是泡沫的那种好?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

不要泡各种各样有什么现实世界使用?每次看到人提到,它总是可以:

  1. 在一个排序算法学习用。
  2. 在一个排序算法的没有的使用的一个例子。
解决方案

这取决于你的数据分布的方式 - 如果你可以做一些假设

一,我发现,了解什么时候使用冒泡排序最好的链接 - 或者一些其它种类的,是这样的 - 对排序算法的动画视图:

http://www.sorting-algorithms.com/

Do bubble sorts have any real world use? Every time I see one mentioned, it's always either:

  1. A sorting algorithm to learn with.
  2. An example of a sorting algorithm not to use.

解决方案

It depends on the way your data is distributed - if you can make some assumptions.

One of the best links I've found to understand when to use a bubble sort - or some other sort, is this - an animated view on sorting algorithms:

http://www.sorting-algorithms.com/

这篇关于什么是泡沫的那种好?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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