Renditja Me Bubble Sort (Zbrites) :: / (Më Poshtë Është Dhe Zgjidhja Për Insertion Sort)
Renditja Me Bubble Sort (Zbrites) :: / (Më Poshtë Është Dhe Zgjidhja Për Insertion Sort)
22 19 14 11 5 7 9 16 6 3
22 19 14 11 7 9 16 6 5 3
22 19 14 11 9 16 7 6 5 3
22 19 14 11 16 9 7 6 5 3
22 19 14 16 11 9 7 6 5 3
22 19 16 14 11 9 7 6 5 3
22 19 16 14 11 9 7 6 5 3
#include<iostream>
#include<cstdlib>
int i, j, m = 1;
int temp;
int nr = 10;
m = 0;
temp = array[j];
array[j] = array[j+1];
array[j+1] = temp;
m = 1;
return;
int i;
int main(){
int Tab[]={19,22,14,11,5,3,7,9,16,6};
bubblesort(Tab);
printArray(Tab);
return 0;
#include<iostream>
#include<cstdlib>
key = array[j];
{
array[i+1] = array[i];
array[i+1] = key;
return;
int i;
int main(){
int Tab[]={19,22,14,11,5,3,7,9,16,6};
insertionsort(Tab);
printArray(Tab);
return 0;