Object-Oriented Programming · Verkada · Medium
Problem Design a data structure that supports a restaurant rating system with the following operations: addRestaurant(restaurant, food, rating): registers a restaurant along with a food item and its rating. updateRating(restaurant, food, newRating): changes the rating for a specific food at a given restaurant. highestRated(restaurants): returns the name of the restaurant with the highest overall rating. highestRatedFood(restaurant): returns the name of the highest-rated food…