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
what does the $ sign mean?
This comment is hidden because it contains spoiler information about the solution
This solution doesn't seem to work with my compiler, nor with the Kata. I'm interested to know why this worked before. I generally wrap string-based ternaries in parentheses.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
how was it possible?
Why it doesn't work for me?
What is that lol
Also tried this solution without success? Would anyone know why?
Just one look and i've already understood what its doing. Kudos.
A portion of that delay is a one-time initialisation delay, rather than a per-iteration delay.
This comment is hidden because it contains spoiler information about the solution
This would solve issues with empties created from splits on pesky spaces, but doesn't handle the scenario where the string ONLY contains a space (which isn't eleminated as a possibility in the brief), which would result in Min failing due to no elements in the sequence.
Assert.AreEqual(0, Kata.FindShort(" "));
This solution is clean and simple, but doesn't take into account if the string, while not empty, contains any number of whitespace that aren't perfectly placed in the string (i.e. whitespace in the beginning or end or double-spaced).
Assert.AreEqual(1, Kata.FindShort(" a"));
Assert.AreEqual(1, Kata.FindShort("a "));
Assert.AreEqual(2, Kata.FindShort("an amp"));
Loading more items...