Ad
  • Custom User Avatar

    Great kata! I've been slowly going through the test suite, now around 60 passing...

    I noticed a very minor issue, not affecting the coding. In the visual representation of this test:

       CH2
        / \
     H2C   CH2
       \   /
       HC-C
       //  \
       O    COOH
    
    2-oxocyclopentan-1-carboxylic acid = [('C', 6), ('H', 8), ('O', 3)]
    

    The Hydrogen on the bottom of the cycle (on C-2) is on the wrong carbon. It should be on C-1:

       \   /
        C-CH
       //  \
       O    COOH
    
    
  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

    Same in all languages since you have to return as an integer the tolerance is <= 1.

  • Custom User Avatar

    Perl tests seem too permissive, passing for a non rounded float result:

    20; 0,0.23,0.46,0.69,0.92,1.15,1.38,1.61 -> shoud return 41, got 41.4
    Test Passed
    
  • Custom User Avatar

    Calculating the area was the "easy" part, compared to covering all the invalid path scenarios, especially properly handling the mousehole.