Bubble sort is a sorting technique to sort an array of orderable elements. It's basically based on Brute Force technique(straightforward approach to solve a problem). The algo will be like below:-
for i=0 to n-2 do for j=0 to n-2-i do if A[j+1]<A[j] swap A[j] and A[j+1]