Write the programs for Linked List (Insertion and Deletion)
operations
Answer Posted / bhargav
In Answer 1 i think there is error in dellast()
void dellast()
{
node *temp,*cur=head;
while(cur->next->next!=NULL) -------> error
{
cur=cur->next;
}
temp=cur->next;
cur->next=NULL;
printf("Deleted item is %d\n",temp->item);
free(temp);
}
Is This Answer Correct ? | 7 Yes | 0 No |
Post New Answer View All Answers
What is minimum depth of binary tree?
Define depth and height of a tree?
What is shell sort in data structure?
Write an algorithm for inserting and deleting an element from doubly linked list?
Can you please explain the difference between string and an array?
Is quicksort faster than merge sort?
What happens if an array goes out-of-bounds?
Which is the fastest sorting?
Why we need cursor implementation of linked lists?
Difference between calloc and malloc ?
What is meant by int?
Why is merge sort faster?
What are types of Collision Resolution Techniques and the methods used in each of the types?
Differentiate between iterator and enumeration.
What is non linear data structure with example?