Apex › Storage & databases

Suffix array

A sorted index of every suffix of a string — the workhorse behind fast full-text search. Because the suffixes are sorted, all occurrences of a pattern form one contiguous block; type a pattern and watch that block (and the matching text positions) light up, found by binary search in O(m log n).

More in Storage & databases