Ad
  • Custom User Avatar

    It could be nice if we could vote for the most "pedagogical" solution, it may motivates players to write self explanatory code.

    Structured and commented code is not what everybody writes, but if encouraged it may help beginners getting some key concepts.

  • Custom User Avatar

    I'd personaly have return 0: "If more than one valid result, return the smallest index."

    They all have a score difference of 1, so why not take the smallest index ?

  • 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

    That makes sens :D

    I figured out the error, my method ended with a "puts completed_DNA", instead of "return completed_DNA".
    I'm also gonna dive into the Wiki later on.

    Thanks for your answer, have a nice day :)

  • Custom User Avatar

    Hey there,

    I'm such a noob that it's my 3rd attempt to post a comment (what kind of sorcery is this ? VIM ?!!). I started Ruby few weeks ago.

    My code works perfectly on my machine, but return 100% errors on Codewars. Can anyone explain this behavior ?
    I'm gonna try other ways to make it work (I choose to work with Ruby's hash data structure because I'd to discover & practice)

    I'd like to share my code, but I dont even know how to do it nicely (as AJX117 did, for exemple)