Question: Write a boolean method removeElement(String value) that accepts a String value parameter. Assume there is a doubly-linked-list of Node objects (class Node is shown below),
Write a boolean method "removeElement(String value)" that accepts a String "value" parameter. Assume there is a doubly-linked-list of Node objects (class Node is shown below), and "head" and "tail" are defined as shown. The method should remove the list node that holds the same String held by the "value" parameter (assume there are no duplicates in the list). Then return true if the element was found/removed; return false if the element is not found.X- public static Node head, tail; // The first & last element in the doubly-linked-list public static boolean removeElement(String value) {private static class Node {public Node next;public Node(String itemIn) {} }

Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
