COMPUTER SCIENCE AND ENGINEERING
DATA STRUCTURES
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
What does the following function do for a given Linked List with first node as head?void fun1(struct node* head){ if(head == NULL) return; fun1(head
|
Prints all nodes of linked lists
|
|
Prints all nodes of linked list in reverse order
|
|
Prints alternate nodes of Linked List
|
|
Prints alternate nodes in reverse order
|
Explanation:
Detailed explanation-1: -What does the following function do for a given Linked List with first node as head? Explanation: fun1() prints the given Linked List in reverse manner.
Detailed explanation-2: -Prints all nodes of linked lists.
Detailed explanation-3: -The first node in the list is called the head, and the last node in the list is called the tail. To create a singly linked list, we first need to create a node class.
Detailed explanation-4: -Array implementation of linked list.
There is 1 question to complete.