Merge K Timestamp-Sorted Event Lists

Problem

You are given K singly linked lists. Each node represents an event and contains:

  • timestamp: an integer timestamp.
  • data: an event payload that must be preserved unchanged.
  • next...

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: