Input:
1) A huge sorted array of string SA;
2) A prefix string P;
Output:
The index of the first string matching the input prefix if any. If ther
It can be done in linear time using a Suffix Tree. Building the suffix tree takes linear time.