Sort Photos by Score While Preserving Other Items

Given a mixed list of items. Each item contains:

  • type: an item type such as photo, video, or text;
  • score: an integer score that is meaningful only when type == "photo";
  • id: an ite...

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: