Opening Hours of the Three Broomsticks Inn
Description:
You want to drink Butterbeer. But as the youngest student of Hogwarts, you can't use any magic yet. So, you decide to write a piece of code, which can tell you if the Three Broomsticks is open or not at the given moment. As everything here, the opening hours of this inn are extraordinary as well, so you have to prepare your code well, and then you can be sure that it is open everytime you go there to drink and forget your problems and this inconsistent back story.

#The input:
Array of Strings
- the format is like this: "8:00-15:00", meaning [HH:MM]-[HH:MM]
- 7 Strings, from Sunday (0) to Saturday (6), in order
- 24 hour format
- no more than 24 hours
- always valid
- it can overlap with the next day: "18:00-02:00" means the next day morning
- it is a constant timetable, which applies for every week
Date between 1900 and 2100 Using the Array as a timetable, you have to return whether at this time the inn (was or will be) open or not.
#The output:
- Boolean: indicating is it open or not at the given date
#Please consider:
There are 1500000 random tests, so the solution should not be slow.
Similar Kata:
Stats:
Created | May 7, 2020 |
Warriors Trained | 56 |
Total Skips | 6 |
Total Code Submissions | 31 |
Total Times Completed | 7 |
Kotlin Completions | 7 |
Total Stars | 2 |
% of votes with a positive feedback rating | 0% of 2 |
Total "Very Satisfied" Votes | 0 |
Total "Somewhat Satisfied" Votes | 0 |
Total "Not Satisfied" Votes | 2 |
Total Rank Assessments | 1 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 7 kyu |
Lowest Assessed Rank | 7 kyu |