Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class test<E> {
- List<E> input = new ArrayList<>();
- public test(List<E> input) {
- this.input = input
- // modify this constructor if necessary, but do not remove default constructor
- }
- // add other constructors if necessary
- /**
- * Returns the queue that adds an item into the tail of this queue without modifying this queue.
- * <pre>
- * e.g.
- * When this queue represents the queue (2, 1, 2, 2, 6) and we enqueue the value 4 into this queue,
- * this method returns a new queue (2, 1, 2, 2, 6, 4)
- * and this object still represents the queue (2, 1, 2, 2, 6) .
- * </pre>
- * If the element e is null, throws IllegalArgumentException.
- * @param e
- * @return
- * @throws IllegalArgumentException
- */
- public test<E> enqueue(E e) {
- return null;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement