Your program / function, etc. will take 2 inputs. The first will be a list of who came to my party and when. Example:
Kevin 13:02 Ruby 5 Sam 3 Lisa 6 Bob 12
What does that mean? It means that Kevin got to my party first (at 13:02, 24-hour time), then Ruby 5 minutes later, then Sam 3 minutes later, then Lisa 6 minutes later, and last Bob 12 minutes later.
The second input will be when my party started. Example:
(24-hour time). Your output must be the list of people who were late. (Anyone exactly on time is fine.) Example calculations (just for example, don't output these)
Kevin 13:02 Ruby 13:07 Sam 13:10 Lisa 13:16 Bob 13:28
Lisa and Bob arrived after
13:15, therefore this program should print "Lisa,Bob".
- Input 1 will always be a name (regex
[A-Z][a-z]*), then a space, then a 24-hour time in the form
hours:minuteson the first line, then a name, a space, and a positive integer (number of minutes later) on the next lines. There will always be at least 1 line.
- If you would like, you may take input 1 with any other character instead of a line break.
- Input 2 will be in the format
- You may take your inputs as one string separated by any character if you want. This is optional.
- Don't worry about day crossover. My parties never to after
- Output can be a function return value or a string echoed to STDIN, a file, etc. You must return a string or an array / list.
- If you return a string, it must be each person who was late (order does not matter), separated by any non-alphanumeric delimiter.
- If you return an array / list, it must be a list of everyone who was late.