Create a linked list of Strings called c1. Add the Strings Red, Green, Black, White and Pink to c1 Print c1 Write code t

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Create a linked list of Strings called c1. Add the Strings Red, Green, Black, White and Pink to c1 Print c1 Write code t

Post by answerhappygod »

Create A Linked List Of Strings Called C1 Add The Strings Red Green Black White And Pink To C1 Print C1 Write Code T 1
Create A Linked List Of Strings Called C1 Add The Strings Red Green Black White And Pink To C1 Print C1 Write Code T 1 (48.88 KiB) Viewed 28 times
Create A Linked List Of Strings Called C1 Add The Strings Red Green Black White And Pink To C1 Print C1 Write Code T 2
Create A Linked List Of Strings Called C1 Add The Strings Red Green Black White And Pink To C1 Print C1 Write Code T 2 (42.12 KiB) Viewed 28 times
Create a linked list of Strings called c1. Add the Strings Red, Green, Black, White and Pink to c1 Print c1 Write code to check if "Green" exists in c1 (hint: check the methods of linked lists to see if there already is a method that does this) if "Green" is in c1, print "Color Green is present in the linked list." Otherwise, print "Color Green is not present in the linked list." Extra challenge: get user input for the color to look up in the lined list. For example, if the user inputs "Red" you code should check whether the "Red" exists in c1. Another challenge: make the lookup value case insensitive. For example, "green" and "Green" would be treated the same.
Another challenge: make the lookup value case insensitive. For example, "green" and "Green" would be treated the same. Use the editor below to test your code. Copy- paste your final solution in the textbox below. < > Main.java o + 1 import java.util.*; 2. public class Main { 3. public static void main(String[] args) { 4 // create an empty linked list 5 6 1/add colors to the linked list 7 8 9 //print the list 10 System.out.println("Original linked list 12 // Check whether the color "Green" exist 13 } 15 } 11 HABH5 14
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply