I did the Rippling technical screen last week. It was online coding with an AI assistant. The problem was the Delivery Cost calculation that has shown up here before (the calculate_compensation version).
Summary of the problem: a food delivery platform pays drivers per delivery, and the cost is duration × that driver's hourly rate. You implement a dashboard system whose core is a single number, the total cost of all deliveries.
Functions to implement:
add_driver(driver_id, hourly_rate): register a driver with an initial hourly raterecord_delivery(delivery_id, driver_id, start_time, end_time): record one deliveryget_total_cost() -> string: return the total cost with two decimal places (e.g. "135.30")update_driver_rate(driver_id, new_rate, effective_time): change a driver's hourly rate
Key points:
- The time format is up to you, and you discuss the approach before writing code. I chose UTC Unix timestamps (integer seconds).
delivery_idis globally unique, and duplicate submissions are ignored. A single delivery longer than 3 hours is ignored.- Changing a rate only affects deliveries recorded afterwards, and nothing already recorded is adjusted retroactively. A delivery is settled in full at the rate in effect at its
start_time, even if it spans a rate change. - The rate is a float, so computing it on every event loses precision. I accumulated integers (cents × seconds) and converted to dollars only once, in
get_total_cost. - They want good OOP, and if what you do in the interview would differ from production, you should say so proactively.
A few takeaways: this was my first AI coding interview. The AI is genuinely strong, but only if you first work out the big picture and the edge cases and then give the agent a single prompt with all of it. I spent too much time discussing requirements and the general solution, but it worked out, and the agent wrote it in one shot afterwards.
Waiting for the result now.
Discussion
Loading comments…