Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Nice kata - an interesting real world problem, and the test cases are well set up. I am so pleased with myself for finishing it (without looking it up)!
regarding the test case:
checkAvailability([["09:30", "10:15"], ["12:20", "15:50"]], "10:15") => true
In my experience, any meeting scheduled to finish at 10:15, say, would most often not have finished at that time :)
This comment is hidden because it contains spoiler information about the solution
Neat use of join(). I am just wondering if ((i<<1)-1) might be faster generally as well as marginally less code than ((i-1)*2+1).
I am aware that my solution passes the original tests. It also passes the two extra tests I mention in my question.
My problem is that the "best practices" solution (ColbyDauph,alexcaza et al) does not pass the two new tests.
Is there something wrong with the tests? They seem logical to me.
Thank you for helping with this btw.
Help please.
If I complete the set of tests with:
Test.assertEquals(dog_dont_bark_by_default(true), SLEEP, 'Should NOT bark if told so');
and
Test.assertEquals(dog_bark_by_default(true), BARK, 'Should bark by default');
the accepted solution fails these tests.
This comment is hidden because it contains spoiler information about the solution