Consider the doubly linked list below to answer the following: A) Write Java statements to delete the node with info 30 using the reference variable last. B) Write a single Java statement to change the value of the node containing 4 to be 14 using a reference variable first. C) Write Java statements to create a new node called newNode with a value of 70 in its info, and then add it to the last of the List. D) Write Java statements to print out the doubly linked list from the occurrence of info 32 to the end of the list in reverse order. first last, 17 32 19 30 1

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter16: Searching, Sorting And Vector Type
Section: Chapter Questions
Problem 1TF
icon
Related questions
Question

Please solve the question in java programming language

Consider the doubly linked list below to answer the following:
A) Write Java statements to delete the node with info 30 using the reference variable last.
B) Write a single Java statement to change the value of the node containing 4 to be 14 using a reference variable first.
C) Write Java statements to create a new node called newNode with a value of 70 in its info, and then add it to the last
of the List.
D) Write Java statements to print out the doubly linked list from the occurrence of info 32 to the end of the list in
reverse order.
first
last
17
4
32
19
30
Transcribed Image Text:Consider the doubly linked list below to answer the following: A) Write Java statements to delete the node with info 30 using the reference variable last. B) Write a single Java statement to change the value of the node containing 4 to be 14 using a reference variable first. C) Write Java statements to create a new node called newNode with a value of 70 in its info, and then add it to the last of the List. D) Write Java statements to print out the doubly linked list from the occurrence of info 32 to the end of the list in reverse order. first last 17 4 32 19 30
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning