Skip to content

Instantly share code, notes, and snippets.

@tejus07
tejus07 / Print_Sorted_Array
Created September 14, 2021 06:21
the function named 'algorithm' takes an array and prints the sorted array.
/*
* Pesudo Code
for(int times=1; times<n-1; times++){
//repeated swapping
for(int j=0; j<=n - times -1; j++){
if(arr[j]>arr[j+1]){
swap(arr[j],arr[j+1]);
}
}
}