It is sufficient to perform a linear scan through the LCP array in order to find its maximum value v _ { max } and the corresponding index i where v _ { max } is stored.
12.
A linear scan is performed over each element in the prefix and in the suffix to check if its frequency is greater than the current candidate c, in which case c and f _ c are updated to the new value.