How would you sort a linked list?
Answer / prakashdasari
node *ptr1,*ptr2,*ptr3;
ptr1=start;
ptr2=ptr1->next;
ptr3=ptr2->next;
ptr1->next=NULL;
ptr2->next=ptr1;
while(ptr3!=NULL)
{
ptr1=ptr2;
ptr2=ptr3;
ptr3=ptr3->next;
ptr2->next=ptr1;
}
start = ptr2;
Is This Answer Correct ? | 1 Yes | 2 No |
What is function definition in c?
Write a c program to Find the name that you entered is male name or female name? Such as Sunjay is name of male and Payal is name of female
Write a code of a general series where the next element is the sum of last k terms.
What is the difference between #include and #include 'file' ?
What does %c mean in c?
question-how to run a c programme.
how to connect oracle in C/C++.
What are all different types of pointers in c?
char *p="name"; printf(p);
progrem to generate the following series 1 12 123 1234 12345
What is volatile, register definition in C
how to reverse string "Hello World" by using pointers only. Without any temp var