Class Design: Lockers, Trailers & Deposit Boxes
Samsara has been asking candidates to model a slice of its business in classes since at least 2017. A truck and the pallets on it. A box and what goes in it. You write one or two small classes, the interviewer adds a method, you run it, and then they ask what it costs. The newest case is a Premium question from a March 2026 virtual onsite, which the candidate built and then extended with more complicated getters and setters.
For years the older versions were the phone screen. Pallet and trailer came up again and again from March to October 2019, and the step that sinks people is the last one: the trailer's weight at some past time. This lesson works the 2026 locker system first. After it come the older problems, from 2019 to 2025: sending an event to the closest truck, pallet and trailer, a Premium question and a sensor alert monitor.
SamsaraPremium lesson · Coding round
The 5 Samsara problems are below.
- A Premium questionCoding · Medium
- A Premium questionCoding · Medium
- A Premium questionCoding · Medium
+ 2 more in this lesson
Each with hints, the follow-up and a tested solution.
Get the Samsara questions$49 a year · all 122 companies · instant access
21,000+ candidate reports
Samsara interview guideKnow what Samsara asks before you walk in.
25 coding · 4 system design · 11 behavioral questions
Get their questions first.
InterviewLegend is independent and not affiliated with or endorsed by any company it covers.