Bubble Sort is the simplest sorting algorithm that works by repeatedly swapping the adjacent elements if they are in the wrong order. This algorithm is not suitable for large data sets as its average and worst case time complexity is quite high.
Time Complexity:
The time complexity of the bubble sort algorithm is O(n) for the best-case scenario when the array is completely sorted. Considering the average case and worst-case scenarios, the time complexity of bubble sort is O(n^2) where n is a total number of elements in the array.