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
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
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"));
This comment is hidden because it contains spoiler information about the solution