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.
This comment is hidden because it contains spoiler information about the solution
Nice! Concise and also performant on time complexity. I think it's O(n).
Sorry for the long comment :)
Correct me if i have said anything wrong.
Great! I think it's the most performant solution in case of time complexity.
Using the HashSet is best for checking if any element is in a collection and also remove that one at the same time, so that it won't be checked in the next loops.
Clean and performant!
Even which direction the indices go (increase or decrease) is decided smartly to have a readable code.
I really love the little details (but really impactful) which others care.
Nice man!
I like solutions with linq, although I'm not used to them.
Using linq is really good for tidy and fast development and useful where performance is not very critical.
In scenarios where performance is important, I think we should avoid linq which in many cases may cause extra allocations and extra traversings through a collection. In many cases we can do it by some simple for loops.
I found some nice articles about performance of linq statements:
Linq Garbage Collection
Linq Performance
This comment is hidden because it contains spoiler information about the solution
Nice, using hash set! Using a hash set for checking an element existence in a collection is the fastest way, but because the vowels characters are just a few, an array or list may suffices.