Solve two online assessment problems | Uber Coding Question