CSC301: Storage: Is this correct? [6/8] |
public int size () { return size (root); } private int sz = 0; private int size (Node x) { if (x == null) return sz; sz = sz + 1; size (x.left); size (x.right); return sz; }
A variation without static
. Still wrong for the same reason.