Ad
  • Custom User Avatar
  • Custom User Avatar

    i disagree with .map(&:eval) advice. "[1,2,3]".eval will trigger an NoMethodError

  • Custom User Avatar

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

  • Custom User Avatar

    Thanks voile, instructions updated

  • Custom User Avatar

    thx for your time, i hope you enjoyed it ^^

  • Custom User Avatar
  • Custom User Avatar

    i've changed my implem :D
    thx a lot

  • Custom User Avatar

    completly right, i debug the code
    thx

  • Custom User Avatar

    fixed ^^ + spec

    thx Fbasham

  • Custom User Avatar

    good finding, should return "ylxKie"
    i've fixed the code and add a spec
    thx

  • Custom User Avatar

    Exactly, there is 2 equivalent possibilty:

    hnikymj6bvil50Yux3aurtqnrpvdmzv8t 14 / 18

    hnikymj6bvil50yux3Aurtqnrpvdmzv8t 18 / 14

    in the instructions you can found (additional rules):

    • hump on the right if you have to choose (example: 'huMp')

    Then the 2nd solution should be chosen, which is not the case : this is a bug.

    thx, i fix that soon

  • Custom User Avatar

    +1 i add them tomorrow

  • Custom User Avatar

    instructions updated.

  • Custom User Avatar

    should be better, i hope that's clearer

  • Custom User Avatar

    Hello Blind4Basics,
    thx for the comments.

    The code & specs are good but thanks to your remarks i guess the instructions are not clean enough :/

    Proof in numbers.
    With, for each possibility, the number of characters before and after the capital letter, then the diff between them (max - min)
    The best balance is the possibility with the lowest diff.

    From: "i am a nice dromedary"

    • Iamanicedromedary => 0 (before) / 16 (after) => 16 (max - min)
    • iAmanicedromedary => 1 / 15 => 14
    • iamAnicedromedary => 3 / 13 => 10
    • iamaNicedromedary => 4 / 12 => 8
    • iamaniceDromedary => 8 / 8 => 0 [Best Balance]

    From: "Pneumonoultramicroscopicsilicovolcanoconiosis is long"

    • Pneumonoultramicroscopicsilicovolcanoconiosisislong => 0 / 50 => 50
    • pneumonoultramicroscopicsilicovolcanoconiosisIslong => 45 / 5 => 40 [Best Balance]
    • pneumonoultramicroscopicsilicovolcanoconiosisisLong => 47 / 3 => 44

    From: "i wish to do some xenotransplantation on some new planets"

    • Iwishtodosomexenotransplantationonsomenewplanets => 0 / 47 => 47
    • iWishtodosomexenotransplantationonsomenewplanets => 1 / 46 => 45
    • iwishTodosomexenotransplantationonsomenewplanets => 5 / 42 => 37
    • iwishtoDosomexenotransplantationonsomenewplanets => 7 / 40 => 33
    • iwishtodoSomexenotransplantationonsomenewplanets => 9 / 38 => 29
    • iwishtodosomeXenotransplantationonsomenewplanets => 13 / 34 => 21
    • iwishtodosomexenotransplantationOnsomenewplanets => 32 / 15 => 17 [Best Balance]
    • iwishtodosomexenotransplantationonSomenewplanets => 34 / 13 => 21
    • iwishtodosomexenotransplantationonsomeNewplanets => 38 / 9 => 29
    • iwishtodosomexenotransplantationonsomenewPlanets => 41 / 6 => 35

    I'll rework the instructions :)

  • Loading more items...