Can any one help for kmp search?

question link :-- link
i have solved using kmp can any one what mistake i have done??
solution link:-- click here