title: how to calculate time complexity for this recursive method?
body: <p>for method</p>
  <pre><code>static void replace(char biStr[], int index){
          if (index == biStr.length){
              System.out.println(biStr);
              return;
          }
          //print result when reach the end of the array
          if (biStr[index] == '*'){
              for (char ch = '0'; ch &lt;= '1'; ch++) {
                   biStr[index] = ch;
                   replace(biStr, index+1);
                   biStr[index] = '*';
              }
              // replace *
          }
          else
              replace(biStr, index + 1);
              //if the digit is not *, go to next digit
      }
  </code></pre>
  <p>where biStri is an array of 0,1,<em>. for example {1,</em>,0,0,<em>,</em>,1}. and the method gets all the possiblities results for replacing * with 0 or 1. using the same example, it will get 8 different results, because there are 3 *, 2^3 = 8.
  Does it mean the time complexity is also 2^3? if not, how to calculate it?
  and the space complexity is biStr.length, right?</p>