You are viewing a single comment's thread. Return to all comments →
why is it
for (int i = numElements - 1; i >= 0; i--)
for (int i = numElements - 1; i = 0; i--)?
Can anyone explain this to me? Thank you!
thats the case because the indexing is starting from "numElements -1", and "i>=0" provides the interval showing that it should ouput all the content in the indices starting from "numElements -1" all the way to 0 also meaning outputting the content in reverse. Hope you get it :)