void insertion_sort(int *a, int n)
{
int
for(i=1;i<n;i++)
{
value=a[i];
for(j=i;j>0 && value<a[j-1];j--)
a[j]=a[j-1];
a[j]=value;
}
}
can anyone pls explain me the flow of this code... i am having confusion in understanding the flow..
shibu2all -1 Newbie Poster
TrustyTony 888 ex-Moderator Team Colleague Featured Poster
shibu2all -1 Newbie Poster
TrustyTony 888 ex-Moderator Team Colleague Featured Poster
TrustyTony 888 ex-Moderator Team Colleague Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.