Pregunta de entrevista de Uber

basic probability and coding question in the screening