added the implementation of Manacher algorithm