Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a doubly linked list. ( till the input is -999, we can enter the nodes ) Add 3 elements at the beginning of the

Create a doubly linked list. (till the input is -999, we can enter the nodes)

Add 3 elements at the beginning of the linked list. (If less than 3 elements are entered, the program should give Error message as output.)

Display the elements of the resulting doubly linked list in reverse order.

Sample Input/Output

Input

10 20 15 45 -999

-2 5 8

Output

45 15 20 10 -2 5 8

Input

84 19 32 45 25 39 -999 

15

Output

Error!! Three elements must be inserted.

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

Step: 3

blur-text-image

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

Pro Oracle Fusion Applications Installation And Administration

Authors: Tushar Thakker

1st Edition

1484209834, 9781484209837

More Books

Students also viewed these Databases questions