NewProject Coding is here — build features and fix bugs in real codebases with an AI assistantSee what's new

A payment platform maintains transaction records and periodically generates a summary of its recently completed transactions.

Each transactions[i] contains five strings in this order: [amount, merchantId, status, userId, startTime].

  • amount is a decimal string representing the transaction amount.
  • merchantId identifies the merchant associated with the transaction.
  • status is "COMPLETED", "PENDING", or "FAILED".
  • userId identifies the user associated with the transaction.
  • startTime is the transaction's start time.

The summary is generated relative to currentTime. The whole-hour difference between a transaction's startTime and currentTime is defined by the provided helper function TimeUtils.hoursBetween(startTime, currentTime).

Stdout
-