Ad
  • Custom User Avatar

    Oh sure, you're right. It's obvious, I have been fooled by an error in my code. Thanks for answering :)

  • Default User Avatar

    an arrow has a head, '>' or '<', and optionally a tail, that must be located opposite to where the arrowhead is pointing; so =< is a lone = followed by a leftwards arrow of size 1. It is true that it is not explicitely specified

  • Custom User Avatar

    I am asking this as a question, since I don't know if I have missed something or there is an unclear specification: how should be treated =<=>? Two valid arrows (=< and =>) or a sequence of value 0 (= -> 0 + <=> -> double ended arrow, so 0 two),

  • Custom User Avatar

    Just because you think you covered every case, doesn't mean it's true :P

    You can print input values as shown here https://docs.codewars.com/training/troubleshooting/#print-input (Python example, but printing to console works for every language)

    As it stands, this isn't a kata issue, but a question (until proven otherwise).

  • Default User Avatar

    That makes more sense. I'll return set()

  • Default User Avatar

    Changed to return None for no solutions case

  • Custom User Avatar

    Even the fixed tests are incorrect:

    collect_apples([0, 1179, 655, 655, 262, 262, 1048, 655, 393, 1179, 917, 0, 1179, 0, 131, 0, 262, 917, 786, 655, 524, 0, 0, 131, 262, 131], 10)
    
    {(False, True, False, True, False, False, True, False, True, False, True, False, True, False, True, False, False, True, False, True, False, False, False, False, True, False)}
    should equal
    {(False, True, False, True, False, False, True, False, False, True, False, False, True, False, True, False, False, True, False, True, False, False, True, False, True, False),
     (False, True, False, True, False, False, True, False, False, True, False, False, True, False, True, False, False, True, False, True, False, False, False, True, False, True),
     (False, True, False, True, False, False, True, False, False, True, False, False, True, False, True, False, False, True, False, True, False, True, False, False, True, False)}
    

    The expected values sum to 7205, when there is a configuration with a sum of 7336.

  • Custom User Avatar
    test.assert_equals(collect_apples(t3, 9), {})
    

    {} is an empty dict, not an empty set.

    >>> type({})
    <class 'dict'>
    
  • Custom User Avatar

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

  • Default User Avatar

    Approved!

  • Custom User Avatar
  • Default User Avatar
  • Default User Avatar

    Thanks! Fixed the tests to use @it decorator and fixed the titles. I also noticed that I was doing 800 assertions per batch, when I wanted it to be 800 in total.

  • Default User Avatar

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

  • Custom User Avatar
    • Random tests are not constructed correctly, they are missing functions decorated with @it.
    • Some assertions and test titles still use 10e8 instead of 1e8 etc.
  • Loading more items...