Two lists, A and B are implemented as singly linked link-lists. The address of the first and last node are stored in variables firstA and lastA for list A and firstB and lastB for list B. Given the address of a node is given in the variable node, the element stored in the node can be accessed by the statement node->data and the address to the next node can be accessed by node->next. Pankaj wants to append list B at end of list A. Which of the following statements should he use? Data Structure

  • Op 1: lastB -> next = firstA
  • Op 2: lastA = firstB
  • Op 3: lastA->next = firstB
  • Op 4: lastB = firstA
Answer: Op 3: lastA->next = firstB
1564 students attemted this question.

Explanation

No Explanation Available.

Share this question with friends

Similar Questions

  1. Which of the following operations is performed more efficiently by doubly linked list than by singly linked list?

  2. A variant of linked list in which last node of the list points to the first node of the list is?

  3. In linked list, the elements are using _________ to linked the data item to the next address in memory location.

  4. How to insert a node after a position P in singly linked list?

  5. In linked list each node contain minimum of two fields. One field is data field to store the data second field is?

  6. Surbhi wants to implement a particular data structure using a static array. She uses the concept of circular list to implement the data structure, because this allows her to efficiently use all fields of the array. Which data structure is Surbhi implementing?

  7. ._____________ is a data structure in which every individual node consists of INFO to store data and LINK to store the address of the next node.

  8. What does the following function do for a given Linked List with first node as head?

  9. In ___________ type of linked lists we can traverse in both the directions.

  10. What do you this data structure classification in which the elements are stored/accessed on a non-linear order such as trees and graphs.

  11. Linked lists are not suitable to for the implementation of?

  12. Stack uses __________ data structure as the element that was inserted last is the first one to be taken out.

  13. A FIFO structure implemented as a ring where the front and rear pointers can wrap around the end of the start of the array.

  14. In linked list each node is divided into ___________parts?

  15. Give syntax to create a node for Single linked list?

  16. In circular linked list, insertion of node requires modification of?

  17. Which of the following points is/are true about Linked List data structure when it is compared with array

  18. A queue is a _________ data structure in which each element that was inserted first is the first one to be taken out.

  19. Linked list data structure offers considerable saving in _____________

  20. Statement 1: When a node is split during insertion, the middle key is promoted to the parent as well as retained in right half-node.Statement 2: When a key is deleted from the leaf, it is also deleted from the non-leaf nodes of the tree.

Comments

Add Your Review

Your email address will not be published.

Subscribe to Newsletter!

Subscribe to get latest updates and information.