Find the middle node in the linked list??
(Note:Do not use for loop, count and count/2)
Answer Posted / santhoshr
It wont work exactly if the no of nodes is not given!!! So
better answer is having two pointers from first itslf.
And like this , another question is there,
to find the pth node from last!! That too haas the same logic!!!
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
What are the difference between a free-standing and a hosted environment?
What are the 4 types of programming language?
Hai,I have done with my bachelor of commerce and planing to ms,please suggest me how to convince vo for shifting from commerce to computers. Visa on 8 DEC 2014 Npu university
Is flag a keyword in c?
Find duplicates in a file containing 6 digit number (like uid) in O (n) time.
Is c object oriented?
What is getch() function?
write a program in c language to print your bio-data on the screen by using functions.
What is a null pointer assignment error? What are bus errors, memory faults, and core dumps?
What are the disadvantages of external storage class?
List a few unconditional control statement in c.
Explain the difference between malloc() and calloc() in c?
What is the purpose of the following code? Is there any problem with the code? void send(int count, short *to, short *from) { /* count > 0 assumed */ register n = (count + 7) / 8; switch (count % 8) { case 0: do { *to = *from++; case 7: *to = *from++; case 6: *to = *from++; case 5: *to = *from++; case 4: *to = *from++; case 3: *to = *from++; case 2: *to = *from++; case 1: *to = *from++; } while (--n > 0); } }
Are pointers integers in c?
disply the following menu 1.Disply 2.Copy 3.Append; as per the menu do the file operations 4.Exit