A great lathe operator commands several times the wage of an average lathe operator, but a great writer of software code is worth 10,000 times the price of an average software writer. Bill Gates
Bubble sort is a simple sorting algorithm. It compares each item from the array and swap with an adjacent item if they are not in order. The main advantage of bubble sort is an easy implementation. Bubble sort has poor performance and should be avoided in case of a large number of elements in the array.
Write a program to take the un-sorted array and sort the array using bubble sort.
Unsorted array before sorting: [34, 56, 23, 45, 67, 3] Sorted array After Bubble Sort sorting: [3, 23, 34, 45, 56, 67]