Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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;

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Business Process Driven Database Design With Oracle PL SQL

Authors: Rajeev Kaula

1st Edition

1795532386, 978-1795532389

More Books

Students also viewed these Databases questions