Get longest prefix 

Longest prefix of list of strings