Uber Interview Question

basic probability and coding question in the screening