Implemented Kasai's LCP algorithm.