I have read that the Longest Common Prefix (LCP) could be used to find the number of occurrences of a pattern in a string.
Specifically, you just ne
The Longest Common Prefix (LCP) is the Lowest Common Ancestor (LCA) in a suffix tree. Once you have the Lowest Common Ancestor, you can count the number of nodes that branch out from the LCA. This will give you the number of occurrences of a pattern in the suffix tree. This is the relationship between the LCP and LCA.