You are given a list of strings data, where each string is in the form
"$device_id, $usage_in_minutes", such that $device_id contains
exactly five lowercase English letters ('a'-'z') and $usage_in_minutes contains
exactly four digits, representing a positive integer between 1 and 1440 (possibly with leading zeros).
For instance, "abxyz, 0010" describes $device_id = "abxyz" and
$usage_in_minutes = 10 minutes.
Given data, your task is to return the $device_id with the largest
value of $usage_in_minutes. You may assume that all values of $device_id and
$usage_in_minutes are both pairwise distinct in data.
Examples
01 · Example 1
data = ["iqttt, 0077", "obvhd, 0093", "flohd, 0075"] return = "obvhd"
There are 3 devices, and the largest value of usage in minutes is 93 and it corresponds to devide with id "obvhd".
Constraints
More Roblox problems
- Candy Crush Grid Matching and GravityPHONE SCREEN · Seen Jun 2026
- Closest Binary Search Tree Value VariantPHONE SCREEN · Seen Jun 2026
- Design Search Autocomplete SystemPHONE SCREEN · Seen Jun 2026
- Find the Closest PalindromePHONE SCREEN · Seen Jun 2026
- Grid Pathfinding with Obstacles (DFS)PHONE SCREEN · Seen Jun 2026
- Maximize Distance to Closest PersonPHONE SCREEN · Seen Jun 2026
- Maximum Number of Balls in a BoxPHONE SCREEN · Seen Jun 2026
- Meeting Rooms IIPHONE SCREEN · Seen Jun 2026
public String robloxLargestValueOfUsageInMinutes(String[] data) {
// write your code here
}
data["iqttt, 0077", "obvhd, 0093", "flohd, 0075"]
expected"obvhd"
checking account