CSC403: More Size: Using a built in iterator [1/10] Previous pageContentsNext page

public class IntSet {
    private Node root;
    private static class Node {
        public final int key;
        public Node left, right;
        public Node (int key) { this.key = key; }
    }
    public int size () {
        int size = 0;
        for (int x : this.levelOrder ())
            size++;
       return size;
    }
    ...

This violates two conditions of the assignment.

Previous pageContentsNext page