#include <iostream>
using namespace std;
bool bubbleSort(int array[],size_t arrLen){
if(arrLen<0){
cout<<"Please check your input."<<endl;
return false;
}
for(int orderedNum=0;orderedNum<arrLen;++orderedNum){
bool isExchanged=false;
for(int i=0;i<arrLen-orderedNum-1;++i){
if(array[i]>array[i+1]){
int temp=array[i];
array[i]=array[i+1];
array[i+1]=temp;
isExchanged=true;
}
}
if(!isExchanged){
break;
}
}
return true;
}
}