Algoworks interview question

time complexity of bubble sort