DoorDash·Software Engineer·Technical Phone Screen
- Implement a cart validation function for a food delivery app. Given a cart (list of items with itemId and quantity) and a catalog (with availableQuantity, minQuantity, maxQuantity per item), validate the cart and return a structured result with an isValid flag and a list of errors.
“The base checks weren't hard to code up but I got tripped up deciding whether to fail fast or collect all errors.”