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
write a program to create a sparse matrix using dynamic memory allocation.
Define and explain about ! Operator?
Explain how can I convert a number to a string?
What is realloc in c?
What is c language in simple words?
What is modeling?
Explain #pragma statements.
write a program to convert a expression in polish notation(postfix) to inline(normal) something like make 723+* (2+3) x 7 (not sure) just check out its mainly printing expression in postfix form to infix.
what is ur strangth & weekness
swap 2 numbers without using third variable?
Devise a program that inputs a 3 digit number n and finds out whether the number is prime or not. Find out its factors.
What is difference between %d and %i in c?
Device an algorithm for weiler-atherton polygon clipping, where the clipping window can be any specified polygon
What is .obj file in c?
what is the difference between north western polytechnique university and your applied colleges?? please give ur answers for this. :)