Beta
Just Another String Comparer
10Kaiyou
Loading description...
Algorithms
Strings
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
I don't understand why the correct answer is “true” in the test case "normalString3"
Because the prefix need to be ignored, read again the last paragraph.
This comment has been hidden.
Re-raising the issue below:
Why using
IEnumerable<string>
when you always pass a length 2 array?Notably, this implementation goes against C# conventions (specifically the
IComparer
interface) and hence is completely useless for any actual use.Why using
IEnumerable<string>
when you always pass a length 2 array? Why not justinstance.testCompare(a,b,2)
I originally had other plans and then didn't want to rewrite everything, since it works.
This is not an acceptable answer, so re-raising the issue.
Are
.000
,000.
,-000.
,-.000
,-
,-.
or.
numbers?Having a digit is a requirement for a number. "[...] digits and [...]" As far as this Kata goes none of your suggestions count as numbers.
Defining what is and what is not a number can get rather tricky. Please try to use the common sense a grade schooler would use to evaluate this question.
I believe a grade schooler will instead yell at the teacher "what the fuck are you doing" if the teacher decides to do this.
This is an insult to what a teacher and student is. Teacher is supposed to do their job explaining things in a way that students can actually understand. Please don't abuse your students and claim you have the authority to do so.