Highlights
Pinned Loading
-
-
Finding the k-th largest element fro...
Finding the k-th largest element from the array effectively and simply as well 1require 'benchmark'
23examples = []
45res1 = []
-
-
-
ruby look and say sequence 1 11 21 1211
ruby look and say sequence 1 11 21 1211 1class String
2def look_and_say_regexp
3self.gsub(/(.)\1*/) { |match| "#{match.size}#{match[0]}" }
4end
5
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.