Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
It would not make it O(n^2). It would still be O(n) because it's looping through the vowels (a constant known length) for each char in the input, and we're still only looping through the input once. The constant in this case would be at least 5, though, so it would run in approximately 5n time.
Yes, it has to scan each element in the array each time it's called. include? always returns a boolean value. if true do what's in the code block, in this case increase the count by 1.
How does include work?
Does it loop through the array each time its called?
Wouldn't that make it n**2?
good to know you can splip up the elements of an array like that.