How do I build a binary tree in Java using this method?
<p>I have a recursive Java method that builds a binary tree:</p>

<pre><code>BT build() {
   return(a[++k] == 0 ? null : new BT(build(), build()));
}
</code></pre>

<p>BT is a class that looks like this:</p>

<pre><code>class BT {
  BT L; BT R;
  BT(BT l, BT r) { 
      L = l; R = r; 
  }
}
</code></pre>

<p>How does the build class work? If I wanted to build a tree with N nodes, then how many times would the build function be called in terms of N? </p>