Java
1. Write a method to search for and remove an element from a linked list, thereby returning the data portion of the node.
2. Making use of both Stacks and Queues, write a function that will determine whether or not a String is a palindrome
`Hey,
Note: Brother in case of any queries, just comment in box I would be very happy to assist all your queries
import java.util.Stack;
import java.util.Scanner;
public class PalindromeTest {
public static void main(String[] args) {
System.out.print("Enter any string:");
Scanner in=new Scanner(System.in);
String inputString = in.nextLine();
Stack stack = new Stack();
for (int i = 0; i < inputString.length(); i++) {
stack.push(inputString.charAt(i));
}
String reverseString = "";
while (!stack.isEmpty()) {
reverseString = reverseString+stack.pop();
}
if (inputString.equals(reverseString))
System.out.println("The input String is a palindrome.");
else
System.out.println("The input String is not a palindrome.");
}
}

Note: Brother according to HomeworkLib's policy we are only allowed to answer 1 part if there are many. So, I request you to post other part as separate posts.
Kindly revert for any queries
Thanks.
Java 1. Write a method to search for and remove an element from a linked list,...
Data Structures and Algorithms (Java Programming) Write a method to search for and remove an element from a linked list, thereby returning the data portion of the node.
Exercise 1-3-26 on page 165: Write a method remove() in Java that takes a linked list and a string key as arguments and removes all of the nodes in the list that have key as its item field. (Book: Algorithms, 4th edition, by Sedgewick and Wayne)
This is a reminder that this is not a C++ or Java course. It is a Data Structures course. This means that you are to write your own code unless otherwise specified in the assignment. The use of built in data structures types like linked lists, stacks, queues, trees, maps, graphs etc. is prohibited and will result in a 60% reduction in your grade. Furthermore, the lecture material presents code that should be used to get you started. Any data...
C# please Write method to search a node in linked list using ID recursively, Write method to search a node in linked list using NAME recursively
Problem 1 Given a linked list of integers, write a function getUnique that removes all duplicates elements in the linked list and returns the new linked list of unique elements (The order does not matter). Example: Input: 1-»2->3->1-2 Output: 1->2->3 public class Node f int iterm Node next; Node(int d) t item = d; next-null; ) import java.util.ArrayList; public class ExtraLab public static void main (String[] args)t PROBLEM 1 System.out.println("PROBLEM 1"); Node head new Node(1); head.next-new Node (2); head.next.next-new Node(3);...
Write a Java class myLinkedList to simulate a singly linked list using arrays as the underlying structure. Include the following methods: 1. insert an element within the linked list.(this should also work for the front and the rear of the list) 2. Remove an element from the linked list 3. Display (print) the elements of the linked list in order. 4. A method to check if the list is "empty". Test your solution using a linked list that initially has...
Write a Java program that will create a random list (array) randomize a search item to be found in the list sequentially search the array for that item. You must code the search and not use a search function. Display each comparison in the array; the element contents and the index. display whether the item was found or not. Now take that code and alter it to have two lists. Both lists randomize between 1 and 50. While traversing one list,...
n JAVA, students will create a linked list structure that will be used to support a role playing game. The linked list will represent the main character inventory. The setting is a main character archeologist that is traveling around the jungle in search of an ancient tomb. The user can add items in inventory by priority as they travel around (pickup, buy, find), drop items when their bag is full, and use items (eat, spend, use), view their inventory as...
*********************Java recursion********************** Plz help me write a method in java that traverse Through a integer linked list recursively . The method returns a string with every element in the list and a space in between each element in reverse order. THE METHOD DOES NOT REVERSE THE LINKED LIST. IT JUST RETURNS A STRING CONTAINING THE ELEMENTS OF THE LIST IN REVERSE ORDER. ASSUME ALL THE ELEMENTS IN THE LINKED LIST ARE int... method signature is something like : public String...
how to implement a linked list object using only singly linked list toolkit. Then implement a FREQUENCY function to count the ovcurrence of each element in the list. task#1: Add = operator to node: implement the assignment operator for the node such that setting a node = overwrites the value in the node with the value. task#2:Linked List class implement the methods of linked list. insert search and locate remove node* operator [] task#3: Implement the Frequency