NeetCode #143LC-2353MediumArrays & Hashing
← Back to All Problems

#143 · #2353 · Design a Food Rating System(设计食物评分系统)

📌 Problem Statement & Constraints

Design a food rating system. Each food has a cuisine and a rating. Implement changeRating(food, newRating) and highestRated(cuisine), which returns the highest-rated food in that cuisine (ties broken by lexicographically smallest name). Constraints: at most 2 * 10^4 calls.
🔒

Sign In to Unlock Full Solutions for All 973 Problems

Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!