You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: challenges/2. User Availability/README.md
+13Lines changed: 13 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,19 @@
2
2
3
3
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.
4
4
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.
0 commit comments