Back to problems

Food Delivery System

Object-Oriented Programming · Coinbase · Medium

Two Independent Linear Scans The class stores the three provided datasets directly and answers each query by scanning the relevant list once. The two queries are fully independent: the price query only needs menuData, while the delivery time query only needs restaurantData, so there is no reason to merge or preprocess the restaurant and menu records together. For getLowestPrice, every menu record is processed one by one. The third field is converted to an integer and…

Checking your access…