Problem Β· Array
Last to Be Checked π³
In the bustling excitement of an event's beginning, attendees flock eagerly, each with their own story to tell. As time ticks on from the event's start, they queue up for an ID check, a gateway to the festivities. But there's a catch β only 10 hopefuls can stand in line at once.
Your mission? Find out when the last person's ID will be checked, measured in seconds from the event's kickoff.
For original prompt, pls refer to source images π‘Όπ€£π₯§π‘ΌπΌπ€£π₯§πΌπ
Examples
01 Β· Example 1
moments = [1, 6, 9, 502] return = 1201
Explanation not found κ°ΰ¦π¦¦ΰ»κ±
Constraints
Unknown for nowMore Trade Desk problems
public int lastToBeChecked(int[] moments) {
// write your code here
}
moments[1, 6, 9, 502]
expected1201
checking account