#Beginner
11 messages · Page 1 of 1 (latest)
⌛ This post has been reserved for your question.
Hey @obtuse aspen! Please use
/closeor theClose Postbutton above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
that's a pretty vague question
but it is impossible to "create" empty spaces in an array one by one
if you have an array variable, it is either uninitialized (contains no array, and thus has no spaces to initialize), or it is initialized, in which case all the empty spaces are already there
Can you explain why in insertion sort we assign the element of a index to a variable instead of the index itself. for (int i = 1; i < a.length; i++) {
int c = a[i];
int b = i - 1;
while (b >= 0 && a[b] >` c`) {
a[b + 1] = a[b];
b--;
}
a[b + 1] =` c;`
}
}
no, because i don't understand what that question means
ook, btw thx for help