You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
def unique_characters(text)
|
|
visited_characters = Set.new
|
|
|
|
text.each_char do |character|
|
|
return false if visited_characters.include? character
|
|
visited_characters << character
|
|
end
|
|
|
|
true
|
|
end
|