Question: fassttt Question 11 7 Points Write a method called changeQueue to be considered inside the ArrayQueue class and has one parameter item of type E.
Question 11 7 Points Write a method called changeQueue to be considered inside the ArrayQueue class and has one parameter item of type E. Your method will change the queue in such a way that if the the first element of the queue and the last element of the queue are equat the first and last elements in the queue will be replaced with item. Otherwise do not do any change. Similarly, the same process is done for the second element in the queue and the element before the last in the queue and so on. Assume you have a non-empty queue with even number of elements. You are not allowed to call any method from the the ArrayQueve class. Do not use iterators Method head public void changeueutem Example: Before run front rear this ques: 1029 2 2510 Item: 100 After run: front rear This que: 100 29 100 100 5 100 Use the editor to formal your
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
