Find longest common strings in sarray