Capgemini Interview Question

Bubble sort. Merge sort algorithm. Pattern printing