Zensar Technologies interview question

Bubble sorting and print a pattern