Draft

Find the longest repeating substring

38 of 51nakulgupta18
Description
Loading description...
Strings
Fundamentals
  • Please sign in or sign up to leave a comment.
  • JohanWiltink Avatar

    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.

  • dfhwze Avatar

    No sample tests and horrible error feedback in Ruby

  • RNOH Avatar

    noice kata!

  • Voile Avatar

    Test.expect gives zero feedback. They should be changed to Test.assertEquals.

    Also the harder tests are not really hard at all.

  • gastüvian Avatar

    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...

  • etherfreeze Avatar

    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.

    • nakulgupta18 Avatar

      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

      Issue marked resolved by nakulgupta18 10 years ago