Ad
  • Custom User Avatar
    Log
    [ [ '0:00-4:30', 'Drive' ],
      [ '4:30-5:15', 'Rest' ],
      [ '5:15-9:45', 'Drive' ],
      [ '9:45-10:30', 'Rest' ],
      [ '10:30-11:15', 'Drive' ],
      [ '11:15-20:15', 'Rest' ],
      [ '20:15-23:45', 'Drive' ] ]
    Should return true
    

    Total driving time is over 10 hours. Why does it expect the result to be true?

  • Custom User Avatar

    Node 18. (mocha + chai) should be enabled

  • Custom User Avatar
  • Custom User Avatar

    Missing such test cases for rest times between 16-29 minutes and 31-44 minutes, which will invalidate my solution.

    • [["8:00-10:00","Drive"],
      ["10:00-10:20","Rest"],
      ["10:20-12:20","Drive"],
      ["12:20-12:55","Rest"],
      ["12:55-15:00","Drive"]
      ];

      (expected true)

  • Custom User Avatar

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

  • Custom User Avatar

    python new test framework is required. updated in this fork

  • Custom User Avatar

    Hi,

    Not enough example tests. The current ones are mostly useless because anything "slightly" wrong can pass them. At the very least the fixed tests should be added.

    Cheers

  • Custom User Avatar

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

  • Custom User Avatar

    Also, this kata is too similar to the "harder" version of the same task: a passing solution here clears 80% of the task on that kata (as there are only 2 additional checks). There are not much reasons to split that kata into this one.

  • Custom User Avatar

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

  • Custom User Avatar

    45 minute rest can be splited into 2 parts.Minimum 15 minutes rest followed minimum 30 minutes rest(In that order),between those parts other activities can occur(without braking limits).

    The task is under-specified: does it count if there is any period of time in the schedule where 4.5 hours of driving without 45 or 15/30 minute rest occurs? Or does it start counting from the beginning and resets whenever 45 or 15/30 minute rest occurs?

    What is eligible as 15/30 minute rest? For example, does 45/30 count? What about 15/30/30?

  • Custom User Avatar

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

  • Custom User Avatar

    requiredWeight is specified as integer but availablePlates is specified as integer/float without any restrictions. This does not hold water in general (the probability of adding random floats and getting an exact integer sum is close to 0), and in fact there is a restriction: plate = c * 2^n for positive integer c and integer n, which will always be exact as a float. This should be specified. (Or just use integers? They're all integers divided by certain powers of 2 anyway, so there's no reasons to make them floats.)

  • Custom User Avatar

    Why is testIt intentionally made opaque and inaccessible? Even the fixed, sample tests uses them when there are only 1 possible result and can easily just do a normal test assertion. It is unclear what is actually expected.

  • Custom User Avatar
  • Loading more items...