Design AdService

Design and implement an AdService class with two APIs:

  1. InsertAd(content: str, score: int): insert an ad with the given unique content and score.
  2. GetAd() -> str: return an ad such that: ...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: