Finding the MAX prefix in the string array