Question: Write a method called flipValues() that takes a singly linked list of String values containing I and O, and flips the values. The method should

 Write a method called flipValues() that takes a singly linked list

Write a method called flipValues() that takes a singly linked list of String values containing "I" and "O", and flips the values. The method should take a singly linked list as a parameter and return the updated singly linked list. You may omit class definition and comments. (14 pts) For example:input singly linked list data: "I" -> "O" -> "O" -> "I" output singly linked list data: "O" -> "I" -> "I" -> "O" You may assume that the singly linked list is implemented in your own LinkedList class with the following methods: int size( ) boolean isEmpty( ) void add(String s ) void add(int pos , String s ) String get(int pos) void set (int pos , String s ) String remove(int pos) boolean remove(string S)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!