On Mon, Feb 2, 2015 at 7:08 AM, lekha p. <[email protected]> wrote:
> How to get similar elements from a array in Ruby. > > eg : [[1,2],[11,2],[23,89]] > > when i give input 1 i should get all arrays like [[1,2],[11,2]] Is [11,2] returned because it has a one in the lowest position, in the highest position, in any position? Or because 1 + 1 is 2? IOW, define *exactly* what you mean by "similar". Write a test that expresses that. -- Hassan Schroeder ------------------------ [email protected] http://about.me/hassanschroeder twitter: @hassan -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CACmC4yA3PCs8%2BDQvv7NXk31r-gXRnDn5PmqV9Ksga9VCffLJQw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.

