My code below finds position of String in array to be inserted , and then resizes the array and insert the value into copied resized, array, but it is doing so in two operations (two steps), which seems to me as inefficient. I wonder if it is possible to resize and insert element into array in one operation. My code below finds position of String in array