Food Rating System

Asked at Apple · Coding & Leetcode-style Questions · Difficulty: Medium · Last asked Oct 28, 2026

Build a rating system for foods grouped by cuisine. The system must support rating changes and must return the best food in a requested cuisine. A food with a higher rating is better; when ratings tie, the lexicographically smaller food name is better.

Loading the problem…