6 kyu
Minimum difference in duplicate characters
314 of 498blackhercek
Loading description...
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 failed about 10 tests. For example Testing for: "hilpbwsfcpkfygvdjzmbb" expected [ 4, 'f' ] to deeply equal [ 1, 'b' ] Why is [ 4, 'f' ] expected if the minimum in the string is clearly [ 1, 'b' ]?
it's the second one that's expected
that wording is terrible though because it refers to the assertion code which the solver doesn't get to see and it's all too easy to see "expected x" and then not read the rest
Haskell: the expected value for
"bbaa"
should beJust (1, 'b')
but the reference solution returnsJust (1, 'a')
.Fixed. My apologies for the mistake.
The output should have been an optional tuple of an int and a char, not a nullable, necessarily heterogeneous, array. This is overly monolinguistic.
I'm not sure what can be done now. Python ( and, proposed, Haskell ) correctly use a tuple, but the description suffers.
Haskell translation
this translation modifies the description
See the issue above.
Fixed.
intersting , thanks anthor
Nice kata to warm up
Really cool kata :D
This comment has been hidden.
Yes thanks, I fixed it.
Java: Since the second item of the array is just a character, why not expect a
char
instead of astring
?Yeah, I completely agree with this.
Small issue: The "3" in the title is irrelevant and should be removed.
I fixed
Issues:
solution
in example tests and in submission tests.Borderline issues:
Suggestions/improvements:
Testing for: 0 (heiyqa)
could be improved: the0
is confusing (how is the 0 tested?), and the string should be quoted.random.choice
called in a loop can be replaced with a single call torandom.choices
.thanks for feedback, i fixed