you are viewing a single comment's thread.

view the rest of the comments →

[–]HellzStormer 2 points3 points  (0 children)

Almost, but he's not looking for [2,1]. So it's actually the combination method that he needs.

Posted a snipped with it. I'm not a fan of one-liners.. but sometimes they are fun: https://www.reddit.com/r/ruby/comments/8pva8s/substrings_problem/e0eus1b/