Capgemini interview question

Bubble sort. Merge sort algorithm. Pattern printing