Move algorithsm to appropriate folder

This commit is contained in:
Vitor Oliveira 2021-03-29 14:52:06 -07:00
parent 7d1f6659ff
commit 3270667f8e

View file

@ -2,6 +2,7 @@
#
# Given a string s, remove the vowels 'a', 'e', 'i', 'o', and 'u'
# from it, and return the new string.
#
# Example 1:
# Input: s = "leetcodeisacommunityforcoders"
# Output: "ltcdscmmntyfrcdrs"
@ -18,6 +19,7 @@
#
# Time Complexity: O(n)
#
def remove_vowels(s)
result_array = []
s.downcase!
@ -57,7 +59,7 @@ s = 'aeiou'
puts(remove_vowels(s))
# => ""
#
#
# Approach 3: Using Ruby .delete() method
#
# Time Complexity: O(n)