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?
1
lastB -> next = firstA
2
lastA = firstB
3
lastA->next = firstB
4
lastB = firstA