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 volatile variable in c with example?
How can I use a preprocessorif expression to ?
What is c method?
How many types of operators are there in c?
design and implement a data structure and performs the following operation with the help of file (included 1000 student marks in 5 sub. and %also) 1.how many students are fail in all 5 subjects (if >35) 2. delete all student data those are fail in all 5 subjects. 3. update the grace marks (5 no. if exam paper is 100 marks) 4. arrange the student data in ascending order basis of marks. 5.insert double of deleted students with marks in the list.
What are global variables and explain how do you declare them?
Can we change the value of #define in c?
"C" language developed by "Dennis Ritchie" at AT & T. his remarks are a) too general, too abstract b) could deal with only specific problems c) lost generality of BCPL and B restored d) no remarks
Explain what is wrong with this statement? Myname = ?robin?;
What do you mean by invalid pointer arithmetic?
What is the difference between a string and an array?
What should malloc(0) do? Return a null pointer or a pointer to 0 bytes?
Explain Function Pointer?
What is c programing language?
Is null a keyword in c?