Can anyone please explain me what logic should be used to code a random test case generator for problem PRPALN
Let us construct palindrome of November Challenge.
I wan to know how can we code in such a way that the string should have a palindromic sequence…??
For my opinion, I will make a random test case for that problem by one or all of below:
Make a palindrome sequence, then result will be “yes” because if you delete the element at position n/2, it is still a palindrome sequence.
Make a palindrome sequence, then at any position in the sequence, you add one element at any position, then the result will be “yes”, of course.
Make a palindrome sequence, then you add one element at position i (this element is not equal to element at position n-i), and add one element at position k (also not equal to element at position n-k), then we will have “no” answer.
Randomize any element: this way is not sure that you will have an palindrome or not, but if having a sequence, you can run your code to check whether “yes” or “no”.
That is my opinion. Sorry for my bad english.
I was author of problem. You can find my generator for the problem here
Thanks for sharing your opinion…