Do you know what does the following function do for a given Linked List?
Submitted by: Muhammadvoid fun1(struct node* head)
{
if(head == NULL)
return;
fun1(head->next);
printf("%d ", head->data);
}
fun1() prints the given Linked List in reverse manner. For Linked List 1->2->3->4->5, fun1() prints 5->4->3->2->1.
Submitted by: Muhammad
{
if(head == NULL)
return;
fun1(head->next);
printf("%d ", head->data);
}
fun1() prints the given Linked List in reverse manner. For Linked List 1->2->3->4->5, fun1() prints 5->4->3->2->1.
Submitted by: Muhammad
Read Online Data Structure Linked list Job Interview Questions And Answers
Top Data Structure Linked list Questions
☺ | Suppose In an integer array, there is 1 to 100 number, out of one is duplicate, how to find? |
☺ | What is circular linked list? |
☺ | Explain linked list using C++ with an example? |
☺ | Explain the steps to insert data into a singly linked list? |
☺ | Explain how to find 3rd element from end in a linked list in one pass? |
Top Data Structure Categories
☺ | Data Center Manager Interview Questions. |
☺ | Creative UI/UX Designers Interview Questions. |
☺ | Sort And Searching Interview Questions. |
☺ | Data Structure Linked list Interview Questions. |
☺ | Data Structure Arrays Interview Questions. |