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.
clever, I had same solution but did n * -1 instead of just -n. Good idea
This is clean and simple.
It's been a minute, but if you're still interested, try looking up "method groups".
They are essentially a way of telling the compiler: 'Hey, here's the name of a method with multiple overloads, please find the one with the correct signature for this scenario'.
At least that is my probably flawed understanding.
This comment is hidden because it contains spoiler information about the solution
What am I looking at?
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.
yes
@jamescurran:
I rephrased my comment to be simpler and more precise.
This comment is hidden because it contains spoiler information about the solution
Amazing solution!
This comment is hidden because it contains spoiler information about the solution
Could you please explain why is that?
This comment is hidden because it contains spoiler information about the solution
OK, I used a stack to solve the question, but this is much better since it requires only O(1) of extra space! Kudos!
I like the use of Func, makes the whole thing really concise. The only thing I don't like about this, is that you iterate through each array twice, where once would suffice.
I am trying to come up with a way to do that using "getMinMaxLength Func<string[], Tuple<int, int>>", where you find the min and max in one iteration. I am not yet familiar enough with lambdas in C# to get it right without thinking longer about it. Do you know how?
Loading more items...