Citi Interview Question

camel/banana problem