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


Please Help Members By Posting Answers For Below Questions

What is the difference between set and unordered_set?

445


Can you tell me the differences between Array and ArrayList?

589


what is traversal in linked lists?

566


What is nsmutablearray?

454


Can you sort a hashset?

517






Explain the expression trees?

576


What are the advantages of sorting and filtering data?

485


What is basic data structure?

500


What happens if we put a key object in a hashmap which exists?

475


What is map entry?

487


Write a data structure for a queue.

560


Differentiate between the singly linked list and doubly linked list.

582


Which is the best book for data structures and algorithms?

462


Which is better arraylist or linkedlist?

451


What are types of Collision Resolution Techniques and the methods used in each of the types?

632