0

what does this code snippet do

for (int i = 0; i < size - 1; i++) { for (int j = 0; j < size - i - 1; j++) { if (arr[j] > arr[j + 1]) { temp = arr[j]; arr[j] = arr[j + 1]; arr[j + 1] = temp; } } } please detail

7th Feb 2020, 10:35 AM
Polina
2 odpowiedzi
+ 3
please google Bubblesort
7th Feb 2020, 11:01 AM
Oma Falk
Oma Falk - avatar
0
Sorting.. See this.. For all sorting algorithms... https://www.sololearn.com/learn/774/?ref=app
7th Feb 2020, 11:18 AM
Jayakrishna 🇮🇳