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


Please Help Members By Posting Answers For Below Questions

Explain a pre-processor and its advantages.

626


Why is C language being considered a middle level language?

652


Why is c fast?

601


Can i use “int” data type to store the value 32768? Why?

754


What is the size of structure in c?

701






Explain the difference between malloc() and calloc() in c?

573


Why does notstrcat(string, "!");Work?

640


What is sizeof in c?

570


Is it possible to use curly brackets ({}) to enclose single line code in c program?

790


What is the use of in c?

576


What is Dynamic memory allocation in C? Name the dynamic allocation functions.

553


What are dangling pointers in c?

635


Can you pass an entire structure to functions?

691


What is a method in c?

623


How can I use a preprocessorif expression to ?

598