You are viewing a single comment's thread. Return to all comments →
Hey I'm just a bit confused. Using the example input, 4 and 1 4 3 2, when you say int numElements, numElements = 4 right? And doing int arr[numElemnts] that creates an array that includes 0 through 3?
Right, 4 elements in the array, so that can be used when initializing the array. It will have 4 indices, which are then populated by the second line of input.