Top "Bubble-sort" questions

Bubble sort is a simple sorting algorithm that works by repeatedly stepping through the list to be sorted, comparing each pair of adjacent items and swapping them if they are in the wrong order.

overloaded function with no contextual type information | cannot resolve overloaded function 'swap' based on conversion to type 'int'

I am trying to write my own bubble sort algorithm as an exercise. I do not understand the two error …

c++ bubble-sort
Javascript: Bubble Sort

I have made a bubble sort algorithm (sorta) using JS. It works sometimes, but the problem is that it only …

javascript algorithm sorting bubble-sort
Insertion sort better than Bubble sort?

I am doing my revision for the exam. Would like to know under what condition will Insertion sort performs better …

algorithm sorting bubble-sort insertion-sort
What's the most elegant way to bubble-sort in C#?

Can this be cleaned up? using System; class AscendingBubbleSort { public static void Main() { int i = 0,j = 0,t = 0; int []c=new …

c# .net arrays bubble-sort
Using the Bubble sort method for an array in Ruby

I'm trying to implement the Bubble sort method into an easy coding problem for Ruby, but I'm having some trouble. …

ruby-on-rails ruby ruby-on-rails-3 ruby-on-rails-3.1 bubble-sort
Bubble-sorting doubly linked list

I have a problem with my bubble-sorting function for the doubly linked list. It is working when I'm sorting the …

c list sorting bubble-sort doubly-linked-list
SelectionSort and BubbleSort - how to count number of comparisons and number swapping?

First of all, I have seen a similar question relating to C++, but I didn't quite understand it - plus …

java sorting bubble-sort
C OpenMP parallel bubble sort

I have an implementation of parallel bubble sort algorithm(Odd-Even transposition sort) in C, using OpenMP. However, after I tested …

c openmp bubble-sort
sorting array of structures using bubble sort - how to speed up exchange of struct members

I have a structure consisting of two elements char *word and int number. When I want to sort them using …

c bubble-sort
How do you use a bubble sort with pointers in c++?

So here's what I have so far: void sortArray(int amountOfScores, int* testScores) { for(int i = 0; i < amountOfScores; i++) { …

c++ arrays pointers bubble-sort