This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Verifying I am +emaiax on my passcard. https://onename.com/emaiax |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Ranking | |
def initialize(list) | |
@list = list | |
end | |
def ranking | |
@list.map { |c| c.last.zero? ? 0 : 1 + c.last }.reduce(&:+) | |
end | |
def sort(lists) |
NewerOlder