lab/lab12/MergeSort.java
private static <Item extends Comparable> Queue<Queue<Item>>
            makeSingleItemQueues(Queue<Item> items) {

        Queue<Queue<Item>> q1 = new Queue<>();

        while (!items.isEmpty()) {
            Queue<Item> q2 = new Queue<>();
            q2.enqueue(items.dequeue());
            q1.enqueue(q2);
        }

        return q1;

    }
/** Returns a queue of queues that each contain one item from items. */
Returns a queue of queues that each contain one item from items.
Returns a queue of queues that each contain one item from items .
private static <Item extends Comparable> Queue<Queue<Item>>
            makeSingleItemQueues(Queue<Item> items) {
        Queue<Queue<Item>> q1 = new Queue<>();
        while (!items.isEmpty()) {
            Queue<Item> q2 = new Queue<>();
            q2.enqueue(items.dequeue());
            q1.enqueue(q2);
        }
        return q1;
    }
private static < Item extends Comparable > Queue < Queue < Item > > makeSingleItemQueues ( Queue < Item > items ) { Queue < Queue < Item > > q1 = new Queue < > ( ) ; while ( ! items . isEmpty ( ) ) { Queue < Item > q2 = new Queue < > ( ) ; q2 . enqueue ( items . dequeue ( ) ) ; q1 . enqueue ( q2 ) ; } return q1 ; }
Returns a queue of queues that each contain one item from items.
Returns a queue of queues that each contain one item from items .