LTM Limited interview question

Bubble sort logic, OOPs concepts