Using a queue and a stack, implement a method that tests whether a sequence of numbers is a palindrome, that is, equal to the sequence in reverse. For example, [1,2,3,2,1] is a palindrome, but [1,2,2,3,1] is not.

Complete the following file:

QueueStackUtil.java

import java.util.LinkedList; import java.util.Queue; import java.util.Stack; public class QueueStackUtil { public static boolean isPalindrome(int[] values) { Queue<Integer> queue = new LinkedList<Integer>(); Stack<Integer> stack = new Stack<Integer>(); for (int s : values) { // insert s into the queue and stack } while (queue.size() > 0) { // remove an element from the queue // remove an element from the stack // compare the removed elements } return ...; } }