Most voted "bubblesort" questions
7 questions
Sort by count of
-
4
votes3
answers239
viewsOrdering arrays with Bubble Sort
I’m solving a question of my course which I need to use a vector ordering algorithm based on the Bubble Sort algorithm. Making a previous summary, the logic consists of going through all the values…
-
2
votes1
answer121
viewsProblem with animation of a sort algorithm
Good evening, I’m looking to do a simple bar animation of the sort algorithm bubblesort using canvas of html together with javascript but for some reason the bars don’t change position, as if they…
-
1
votes1
answer74
viewsBubble Sort implementation error
Good afternoon to you all. At the moment I’m trying to implement Bubble Sort, the sorting method, but I’m having trouble printing the values, that these values are Andom, using the Rand function.…
-
1
votes0
answers71
viewssee how many times a number changes position in c++ using Bubblesort
Could someone give an example of how I would do that? Type, a size 5 vector, with the following numbers: 33.64.21.85 and 15. I wonder how many times he compares the numbers and performs the…
-
0
votes2
answers72
viewsThere is some difference between these two ways of Bubble Sort°
Is there any difference between these codes? that: void bubble_sort(int array[], int n) { int count = -1; while (count != 0) { count = 0; int aux; for(int i = 0; i < n - 1; i++) { if(array[i]…
-
0
votes3
answers110
viewsBubble Sort algorithm error in Python
Currently I have studied a little Python and, amid the studies I am trying to perform a challenge where I need to implement a Bubble Sort algorithm in Python. The criteria are: The algorithm…
-
-1
votes1
answer44
viewsHow do you create voids that change the value of a variable without IF? (like Python methods)
To simplify my question, I will show the Bubble Sort in python: def bubbleSort(self): for i in range(len(self) - 1): for j in range(len(self) - 1): if self[j] > self[j+1]: self[j], self[j+1] =…