Notice how the bubble sort algorithms are can be compiled be used in native and managed code.
注意如何编译冒泡排序算法,使之能用于本机代码和托管代码。
Quick sort (Quicksort) is a bubble sort of an improvement.
快速排序(Quicksort)是对冒泡排序的一种改进。
Rabbits, large values around the beginning of the list, do not pose a problem in bubble sort.
相對地,兔子,亦即在陣列前端的大數值,不影響泡沫排序的效能。
Unlike Bubble Sort, it usually doesn't require comparing every pair of books.
与"冒泡排序"不同的是, 这种方法通常不必比对所有相邻的书。
This approach is called Bubble Sort.
这个方法被称为 "冒泡排序"。
The improvement idea is simple: If we go through the inner loop with no swapping at all, it means that the array is already sorted and we can stop Bubble Sort at that point.
改进的思路很简单:如果我们通过内部循环完全不交换,这意味着数组已经排序,我们可以在这个点上停止冒泡排序。
Some sorting algorithms have certain additional options. You may toggle the options as you wish before clicking "Go". For example, in Bubble Sort (and Merge Sort), there is an option to also compute the inversion index of the input array (this is an advanced topic).
一些排序算法有一些额外的选项。 在点击"开始"之前,您可以根据需要切换选项。 例如,在冒泡排序(和归并排序)中,还可以选择计算输入数组的反向指数(这是一个高级主题)。
Discussion: How about Bubble Sort, Selection Sort, Insertion Sort, Quick Sort (randomized or not), Counting Sort, and Radix Sort. Which ones are in-place?
讨论:冒泡排序,选择排序,插入排序,快速排序(是否随机),计数排序和基数排序如何?哪些是就地?
this is not exactly bubble sort, but it's fun to look at how it get sorted.
这不完全是冒泡排序法,但是研究一下它是如何排序的也很有意思。
sort the elements in the row using bubble sort based on their lengths
基于行中元素的长度,使用冒泡排序法对这些元素排序
sort the list using bubble sort
使用冒泡排序法对列表排序
But when the kid comes to us and asks, "So, what is a bubble sort algorithm?"
可当我们的孩子跑来问我们"那么,什么是冒泡排序法?"
Given an array of N elements, Bubble Sort will
给定一个N个元素的数组,冒泡法排序将: