Given a single Linked list with lakhs of nodes and length
unknown how do you optimally delete the nth element from the
list?
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 |
A global variable when referred to in another file is declared as this a) local variable b) external variable c) constant d) pointers
which is an algorithm for sorting in a growing Lexicographic order
What is multidimensional arrays
write a function to swap an array a[5] elements like a[0] as a[5],a[1] as a[4],....a[5] as a[0].without using more than one loop and use one array not to use temp array?
How can I recover the file name given an open stream or file descriptor?
What is the purpose of sprintf() function?
What are enumerated types?
Why is c fast?
What is a buffer in c?
write a program to print the one dimensional array.
Which is not valid in C a) class aClass{public:int x;}; b) /* A comment */ c) char x=12;
How the C program can be compiled?