Given a single Linked list with lakhs of nodes and length
unknown how do you optimally delete the nth element from the
list?
Answer Posted / 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 View All Answers
What is the value of uninitialized variable in c?
What is the use of in c?
Explain what is the benefit of using const for declaring constants?
Explain about block scope in c?
Why clrscr is used after variable declaration?
How do we print only part of a string in c?
How many header files are in c?
Why shouldn’t I start variable names with underscores?
What math functions are available for integers? For floating point?
Is malloc memset faster than calloc?
Are pointers integer?
Why do we need a structure?
How many levels of pointers have?
Where are the auto variables stored?
Why is not a pointer null after calling free?