2021-8: Time to Make a Difference
Write code that:
has a second argument that is a numeric scalar or vector of length up to 3, representing a number of [[[days] hours] minutes] – a single number represents minutes, a 2-element vector represents hours and minutes, and a 3-element vector represents days, hours, and minutes.
has a similar first argument, although not necessarily the same length as the second argument.
returns a single number representing the magnitude of the difference in minutes between the arguments.
Examples
Implementation
You can also run the tests via ⌘/shift + enter