Ad
  • Custom User Avatar

    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)!

  • Custom User Avatar

    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 :)

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    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).

  • Custom User Avatar

    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.

  • Custom User Avatar

    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.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution