@Amitava: I think test cases 4 and 6 are incorrect. Could you please verify the same?
@Amitava: please ignore my previous comment. Cheers.
Neighbors are more than adjacents. The first and last elements are considered adjacent. Thus [ABAABA] is not a spindrome as it becomes ...AABAABAA...
However [ABA] is a spindrome even though it also becomes ...AABAABAA...
can u be more clear about test suite 4 & 6?
The definition of spindromes is not really clear. But basically it seems that we must look if there is a repeating pattern, if we found one, then the sequence is not a spindrome. On the other hand, AAAXXXAAA should not be a spindrome imho, since it is a repeating pattern AAAXXXAAAAAAXXXAAAAAAXXXAAAAAAXXXAAA ... so we have to limit the test to half of the list size which means AAAXX | XAAA is apparently a spindrome. However BBBXXXBBBXXX is not a spindrome, since we would have BBBXXX | BBBXXX.
Given an unsigned integer x, find the largest y by rearranging the bits in x
Back to basics 6 - Column Vector
Arrange vector in ascending order
Generate a vector like 1,2,2,3,3,3,4,4,4,4
Dancing with wolves?
Generate one sample of uniform random numbers between -pi and +pi
Given n, create n random numbers such that their standard deviation is also n.
Use of regexp
Find the treasures in MATLAB Central and discover how the community can help you!
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office