Skip to content

Commit 9b629f1

Browse files
authored
Merge pull request #4 from ajwhite/input-argument-descriptions
Function interface description
2 parents 5acafe1 + e1495eb commit 9b629f1

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

challenges/2. User Availability/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,19 @@
22

33
The goal is to find available times for users with different schedules. For a given set of user schedules, the function should determine which time spans are free for all users.
44

5+
```js
6+
/**
7+
* Given a collection of schedules, find all the free times within an overall time range.
8+
*
9+
* @param {Array<Array<event>>} schedules A collection of user schedules to compare.
10+
* @param {moment} start The starting time to seek for free periods.
11+
* @param {moment} end The time to stop seeking for free periods.
12+
* @param {number} minimumFreeDuration The minimum amount of time a period needs to be
13+
* @return {Array<timeRange>} A collection of free periods across all user schedules.
14+
*/
15+
function findCommonFreeTimes (schedules, start, end, minimumFreeDuration) { }
16+
```
17+
518
The schedule is an array of events, which contain a `start` and `end` field.
619

720
```js

0 commit comments

Comments
 (0)