Question: The method I am using takes two sorted lists and returns a single list containing all of the elements in the two original lists, in sorted order.

For example, if the original lists are (1, 4, 5) and (2, 3, 6) then the result list would be (1, 2, 3, 4, 5, 6). 

Is there something I am missing? 

```
public static<E extends Comparable<E>> List<E> mergeSortedLists(List<E> a, List<E> b) {
    List<E> result = new ArrayList<E>();

    PushbackIterator<E> aIter = new PushbackIterator<E>(a.iterator());
    PushbackIterator<E> bIter = new PushbackIterator<E>(b.iterator());

    while (aIter.hasNext() && bIter.hasNext()) {
        if (aIter.next().compareTo(bIter.next()) < 0) {
            result.add(aIter.next());
        }  
        if (bIter.next().compareTo(bIter.next()) > 0){
            result.add(bIter.next());
        }
    }
    while (aIter.hasNext()) {
        result.add(aIter.next());
    }
    while (bIter.hasNext()) {
        result.add(bIter.next());
    }
    return result;
}

```

Answer: 
I'm going to assume you intended something like this with your use of `PushbackIterator`:

```
while (aIter.hasNext() && bIter.hasNext()) {
    E aElem = aIter.next();
    E bElem = bIter.next();
    if (aElem.compareTo(bElem) <= 0) {
        result.add(aElem);
        bIter.pushback(bElem);
    } else {
        result.add(bElem);
        aIter.pushback(aElem);
    }
}

```
Same approach of merging 2 arrays can also be used with iterators tweaking a little bit. you can use adding elements instead of printing if needed.

```
static void printItr(Iterator<String> it1, Iterator<String> it2) {
    String firstString=null,secondString = null;
    boolean moveAheadIt1 = true, moveAheadIt2 = true;

    while(it1.hasNext() && it2.hasNext()){
         firstString = moveAheadIt1 ? it1.next() : firstString ;
         secondString = moveAheadIt2 ? it2.next() : secondString;

         if(firstString.compareTo(secondString) < 0){
            System.out.println(firstString);
            moveAheadIt2 = false;
            moveAheadIt1 = true;
        }else {
            System.out.println(secondString);
            moveAheadIt1 = false;
            moveAheadIt2 = true;
        }
    }

    while(it1.hasNext()){
        System.out.println(it1.next());
    }
    while(it2.hasNext()){
        System.out.println(it2.next());
    }

}

```