Citi Interview Question

few questions using SQL, one Python question about array manipulation