A Bubble Sort algorithm is one of the simplest and easy-to-program sorting algorithms, at an expense of inefficiency. One of the main reasons why it is simple is because that it uses the notion of swapping by comparison the neighbouring elements in the array or in other kind of not pre-sorted list data structure.The pseudo-code is as simple as the real code itself: it utilises two "for" type loops and compares two neighbouring elements in the array. Swapping is performed by introducing a temporary variable, "temporaryElement".algorithm BubbleSort(array A): for each i = 0 in the array A in steps of 1 do: for each j = 0 in the array A in steps of 1 do: if A[i] < A[j]: temporaryElement = A[i]; A[i] = A[j]; A[j] = temporaryElement; end if end for end for