How to solve this question ? Can anyone please tell me approach based on zalgorithm for above question ?? Thanks. asked 22 Jun '15, 14:34

now i've got an idea how to solve it using Zalgo here is the code http://ideone.com/Ddnf36 but in this one didnt get accepted, the problem is that when we find the 'match' string we need to decrease its size and compare at both ends untill size of match reduces to zero ... but i think that its not a good strategy to do that.. so now can anyone guide to optimise the code..?? MY_Approach : compute Zvalues now store value and indexes of top two elements let top values be maxi and maxii , and their indexes be first,second repectively now start from first till maxii's length(means maxii times) now this is match string now just compare it at both ends if no match at any end than keep decreasing till its both end match or size becomes zero. Thanks. answered 25 Jun '15, 22:57
