compute common prefixes as next part suggestions