Capgemini Interview Question

Write a program for bubble short of the given problem