We show how to modify the in-place Burrows-Wheeler transform (BWT) algorithm proposed by Crochemore et al. [4, 5] to also compute the longest common prefix (LCP) array. Our algorithm runs in quadratic time, as its predecessor, constructing both the BWT and the LCP array using just O(1) additional space. It is supported by interesting properties of the BWT and of the LCP array and inherits its predecessor simplicity.
Louza, F. A., & Telles, G. P. (2016). Computing the BWT and the LCP array in constant space. In Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) (Vol. 9538, pp. 312–320). Springer Verlag. https://doi.org/10.1007/978-3-319-29516-9_26