Draft
Find the longest repeating substring
38 of 51nakulgupta18
Loading description...
Strings
Fundamentals
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.
Description should specify which of multiple possible longest repeatings substrings should be chosen ( which should then be tested ).
If any will do, this should still be specified. Note that it is very possible to allow ( and test ) returning any longest repeating substring.
No sample tests and horrible error feedback in Ruby
noice kata!
Test.expect
gives zero feedback. They should be changed toTest.assertEquals
.Also the
harder tests
are not really hard at all.Corrected now.
Nice kata. This algorithm was one of the tasks from my own "Must Do"-list. I wanted to solve it just for my own satisfaction. Now I could even earn points and honor. Thank you!
I was also suprised by your 3rd test case. But I am ok with your argumentation. Does it matter if it's the first repeating single letter in the string or the last one? In the test case there is only one repeating single letter. so it doesn't really matter... but may be that is sth you should consider when creating more test cases or even randomized tests!
...just realized that the postings are 2 years old...so, no need to read my second paragraph...
Either improve problem description or add descriptive test cases. I've done problems like this before and never have I seen single letters count as "substrings" such as in the 3rd test case.
a single letter is also one of the substring of the string. And if a single letter repeats then that should be the result. Dont know why you dont want to consider single letter as a substring