Question: Question No.1 Implement the following recursive functions and also write the main 1) Print the doubly linked list in recursive order. 2) Reverse the singly
Question No.1
Implement the following recursive functions and also write the main
1) Print the doubly linked list in recursive order.
2) Reverse the singly linked list and return the head of list.
For Example: head156 8NULL, after function linked list will become
head8651NULL
3) Find the minimum and maximum element in doubly linked list using recursion.
Question No.4 1+1.5+1.5=4
Dry run the following code and draw the tree to show how recursion is solved. On writing only
output you will get zero number.
a) fun1(5)
void fun1(int n)
{
int i = 0;
if (n > 1)
fun1(n - 1);
for (i = 0; i
cout
}
b) int fun(int a, int b)
{
if (b == 0)
return 0;
if (b % 2 == 0)
return fun(a + a, b/2);
return fun(a + a, b/2) + a;
}
int main()
{
cout
return 0;

Data structures in C++.
Solve it ASAP i will thumb up for u
10:24 AM @ @ @ 66% f Assignment Template.docx 5 JUNE Capital University of Science and Technology Department of Computer Science CS2143 - Data Structures ASSIGNMENT NO.3 Semester: Fall 2021 Max Marks: 10 Instructors: Mammona Qudsia Assigned Date: 28th Dec 2021 Name: Due Date: 5 Jan 2022 Reg. No. Question No.1 2+2+2=6 Implement the following recursive functions and also write the main 1) Print the doubly linked list in recursive order. 2) Reverse the singly linked list and return the head of list. For Example: head>1+5+6+8+NULL, after function linked list will become head>87651NULL 3) Find the minimum and maximum element in doubly linked list using recursion. Question No.4 1+1.5+1.534 Dry run the following code and draw the tree to show how recursion is solved. On writing only output you will get zero number. e) Euni (5) void fun (int n) int i = 0; if in 1) Euni in 1); for (i = 0; i
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
