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.
A c# string is nullable per default, unless you explicitly enable the nulllable check in the compiler, which was introduced in .NET 6+.
And even then you'll only get a warning during compilation time. If you ignore it, the program WILL crash when the string is null during runtime.
Yea, but we now know, because the input is
string
and notstring?
that the input isn't null ;)This comment is hidden because it contains spoiler information about the solution
This solution modifies the original list.
by the instruction...
the string input is not null!
"Implement a function that determines whether a string that contains only letters is an isogram."
...
a string that contains only letters
...
One could opt for true by arguing that there are no characters that appear twice, but one could also opt for false by arguing that null can not be considered a real string and thus cannot be an isogram.
So, I would expect anything, but not a NullReferenceException.
Other than that, this is a really nice solution:-)
What would you expect for null? If you get null instead of a string, it's the most logical and correct behavior.
I know but the tests doesn't want me to check for null. So the tests are wrong or at least ignore this case :)
Crashes when str is null
Crashes when str is null
Crashes when str is null
Crashes when str is null
Crashes when str is null
Crashes when str is null