Ad
  • Custom User Avatar

    Thanks for the comment.
    I just followed my intuition. I needed some pointer to a candidate of the 'equality-index', a check whether the needed contition is met and a contition to decide when to stop searching.

    In the end, I think our solutions are very similar, but I actually like your solution even more.
    To me using a Range and each-loop is more 'rubyesque' than a while-loop.