Process Messages (FrontEnd focused Full-Stack Eng :)

Problem Overview

  • Build a function to determine the processing order of messages: higher priority first, and among equal priority, earlier timestamp first.
  • Input: String[] messages in 'timestamp:priority' format (timestamp 0000-9999; priority 1-5). Output: String[] ordered accordingly.
  • Real-world context: processing in a messaging system for a frontend-focused full-stack app.
  • This coding interview problem is an interview question from Unknown interviews.

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Input Variables
Execution Result: