Capgemini Interview Question

high IQ level questions then pseudo code rounds