function to find longest string from array