Solve two online assessment problems | Uber Interview Question