I am studying max heap and in it there is a createheap function. In it , there is a for loop like this
for (i = 0; i < capacity; i++) {
h->arr[i] = nums[i];
}
if size of nums is not equal to capacity then does the variable i gives the size of nums or is it equal to capacity? (the for loop runs till i is equal to capacity ,right?)