calculate the height of the suffix array