Uber Interview Question

Max consecutives ones and two's