Given a single Linked list with lakhs of nodes and length
unknown how do you optimally delete the nth element from the
list?



Given a single Linked list with lakhs of nodes and length unknown how do you optimally delete the n..

Answer / vignesh1988i

first create the list of unknown length..... then get the position of the element to be deleted from the user.... the start travelling in the list.... if it encounters the position prescribed by the user ... get the addresses in the list and shift that to the previous node and free this node........


thank u

Is This Answer Correct ?    2 Yes 1 No

Post New Answer

More C Interview Questions

What is typedef?

1 Answers  


What is a c token and types of c tokens?

0 Answers  


Give me basis knowledge of c , c++...

5 Answers  


WHOT IS CHAR?

4 Answers   TCS,


What is const volatile variable in c?

0 Answers  


main() { int i,n=010; int sum=0; for(i=1;i<=n;i++) {s=s+i; } printf("%d",&s); getch(); }

6 Answers  


Why is c not oop?

0 Answers  


how many keywords do C compile?

7 Answers   Microsoft, Practical Viva Questions,


How can I increase the allowable number of simultaneously open files?

1 Answers   CSC,


write a program for even numbers?

19 Answers   TCS,


how to get starting address of a running C program

3 Answers  


In C programming, what command or code can be used to determine if a number of odd or even?

0 Answers  


Categories