ABC Interview Question

Time complexity of bubble sort