For the best experience, increase the window size or view on a laptop or desktop device
Last updated: Pending
Title | ||
|---|---|---|
Loading... | ||
1/1
No questions are available yet
For the best experience, increase the window size or view on a laptop or desktop device
Title | ||
|---|---|---|
Loading... | ||
Input: Store Open and close time, total capacity, List of existing reservations Output every interval with the capacity available
Test Case example 1:
Open: 8 AM, Close 9 PM, Capacity: 5
Reservations { {
start time: 9 am
end time: 9:30 am
size : 3
}
}
Output: Map<Interval, Int>
8AM-9AM 5,
9-930AM 2,
930-9PM 5
Test case example 2:
Open: 8 AM, Close 9 PM, Capacity: 5
Reservations { {
start time: 9 am
end time: 9:30 am
size: 3
},
{
start time: 9:15 am
end time : 9:45 am
size: 2
}
}
Output: Map<Interval, Int>
8:00AM-9:00AM 5,
9:00AM-9:15AM 2,
9:15AM-9:30AM 0,
9:30AM-9:45AM 3,
9:45AM-9:00PM 5
Input: Store Open and close time, total capacity, List of existing reservations Output every interval with the capacity available
Test Case example 1:
Open: 8 AM, Close 9 PM, Capacity: 5
Reservations { {
start time: 9 am
end time: 9:30 am
size : 3
}
}
Output: Map<Interval, Int>
8AM-9AM 5,
9-930AM 2,
930-9PM 5
Test case example 2:
Open: 8 AM, Close 9 PM, Capacity: 5
Reservations { {
start time: 9 am
end time: 9:30 am
size: 3
},
{
start time: 9:15 am
end time : 9:45 am
size: 2
}
}
Output: Map<Interval, Int>
8:00AM-9:00AM 5,
9:00AM-9:15AM 2,
9:15AM-9:30AM 0,
9:30AM-9:45AM 3,
9:45AM-9:00PM 5
Output