proj/proj1a/LinkedListDeque.java
public static void main(String[] args) {
        LinkedListDeque<Integer> Dllist = new LinkedListDeque<>();
        Dllist.addFirst(666);
        Dllist.addLast(6666);
        Dllist.addLast(66666);
        Dllist.printDeque();                        // expected (666 6666 66666)
        System.out.println("Test getIterative #1");
        System.out.println(Dllist.getIterative(0)); // expected 666
        System.out.println(Dllist.getIterative(1)); // expected 6666
        System.out.println(Dllist.getIterative(5)); // expected null
        System.out.println("Test getIterative #1");
        System.out.println(Dllist.getRecursive(0)); // expected 666
        System.out.println(Dllist.getRecursive(1)); // expected 6666
        System.out.println("Test done!");

        Dllist.removeFirst();
        Dllist.printDeque();                        // expected (6666 66666)
        System.out.println("Test getIterative #2 removeFirst");
        System.out.println(Dllist.getIterative(0)); // expected 6666
        System.out.println(Dllist.getIterative(1)); // expected 66666
        System.out.println("Test getRecursive #2 removeFirst");
        System.out.println(Dllist.getRecursive(0)); // expected 6666
        System.out.println(Dllist.getRecursive(1)); // expected 66666

        Dllist.removeLast();
        Dllist.printDeque();                        // expected 6666
        System.out.println("Test getIterative #3 removeLast");
        System.out.println(Dllist.getIterative(0)); // expected 6666
        System.out.println(Dllist.getIterative(1)); // expected null
        System.out.println("Test getRecursive #3 removeFirst");
        System.out.println(Dllist.getRecursive(0)); // expected 6666
        System.out.println(Dllist.getRecursive(1)); // expected null
    }
/**  Dummy main function for test.
     *
     * */
Dummy main function for test.
Dummy main function for test .
public static void main(String[] args) {
        LinkedListDeque<Integer> Dllist = new LinkedListDeque<>();
        Dllist.addFirst(666);
        Dllist.addLast(6666);
        Dllist.addLast(66666);
        Dllist.printDeque();                        
        System.out.println("Test getIterative #1");
        System.out.println(Dllist.getIterative(0)); 
        System.out.println(Dllist.getIterative(1)); 6
        System.out.println(Dllist.getIterative(5)); 
        System.out.println("Test getIterative #1");
        System.out.println(Dllist.getRecursive(0)); 
        System.out.println(Dllist.getRecursive(1)); 6
        System.out.println("Test done!");
        Dllist.removeFirst();
        Dllist.printDeque();                        
        System.out.println("Test getIterative #2 removeFirst");
        System.out.println(Dllist.getIterative(0)); 6
        System.out.println(Dllist.getIterative(1)); 66
        System.out.println("Test getRecursive #2 removeFirst");
        System.out.println(Dllist.getRecursive(0)); 6
        System.out.println(Dllist.getRecursive(1)); 66
        Dllist.removeLast();
        Dllist.printDeque();                        6
        System.out.println("Test getIterative #3 removeLast");
        System.out.println(Dllist.getIterative(0)); 6
        System.out.println(Dllist.getIterative(1)); 
        System.out.println("Test getRecursive #3 removeFirst");
        System.out.println(Dllist.getRecursive(0)); 6
        System.out.println(Dllist.getRecursive(1)); 
    }
public static void main ( String [ ] args ) { LinkedListDeque < Integer > Dllist = new LinkedListDeque < > ( ) ; Dllist . addFirst ( 666 ) ; Dllist . addLast ( 6666 ) ; Dllist . addLast ( 66666 ) ; Dllist . printDeque ( ) ; System . out . println ( "Test getIterative #1" ) ; System . out . println ( Dllist . getIterative ( 0 ) ) ; System . out . println ( Dllist . getIterative ( 1 ) ) ; System . out . println ( Dllist . getIterative ( 5 ) ) ; System . out . println ( "Test getIterative #1" ) ; System . out . println ( Dllist . getRecursive ( 0 ) ) ; System . out . println ( Dllist . getRecursive ( 1 ) ) ; System . out . println ( "Test done!" ) ; Dllist . removeFirst ( ) ; Dllist . printDeque ( ) ; System . out . println ( "Test getIterative #2 removeFirst" ) ; System . out . println ( Dllist . getIterative ( 0 ) ) ; System . out . println ( Dllist . getIterative ( 1 ) ) ; System . out . println ( "Test getRecursive #2 removeFirst" ) ; System . out . println ( Dllist . getRecursive ( 0 ) ) ; System . out . println ( Dllist . getRecursive ( 1 ) ) ; Dllist . removeLast ( ) ; Dllist . printDeque ( ) ; System . out . println ( "Test getIterative #3 removeLast" ) ; System . out . println ( Dllist . getIterative ( 0 ) ) ; System . out . println ( Dllist . getIterative ( 1 ) ) ; System . out . println ( "Test getRecursive #3 removeFirst" ) ; System . out . println ( Dllist . getRecursive ( 0 ) ) ; System . out . println ( Dllist . getRecursive ( 1 ) ) ; }
Dummy main function for test.
Dummy main function for test .
// expected (666 6666 66666) // expected 666 // expected 6666 // expected null // expected 666 // expected 6666 // expected (6666 66666) // expected 6666 // expected 66666 // expected 6666 // expected 66666 // expected 6666 // expected 6666 // expected null // expected 6666 // expected null