circular permutation
2 posters
Page 1 of 1
circular permutation
find whether a given string is circular permutation of another string or not
mnnit.rahul- Posts : 51
Join date : 2009-02-01
Re: circular permutation
string s1 = <any-string>;
s2 = s1 + s1;
now check for the given string as substring of s2. (matlab eg. let <any-string> be abcd.... and we have to check whether cdab is a circular permutation of abcd.
s2 = abcdabcd
now i have to search cdab as substring of s2. )
s2 = s1 + s1;
now check for the given string as substring of s2. (matlab eg. let <any-string> be abcd.... and we have to check whether cdab is a circular permutation of abcd.
s2 = abcdabcd
now i have to search cdab as substring of s2. )
Beagle- Posts : 40
Join date : 2009-01-30
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|