Search:

Type: Posts; User: mia_tech

Search: Search took 0.09 seconds.

  1. [SOLVED] Re: how to trace recursion variables in a recursive method

    ok, I narrowed down, and now I know which part is that I don't understand. I modified the method a bit, so bare with me. Take a look at the output and explain why when n = 5 it prints 5; however,...
  2. [SOLVED] Re: how to trace recursion variables in a recursive method

    look at the code there's not "else if"... there's a nested "if, else" statement. So what you're telling me is that once (n % m == 0) it calls these two recursive method before starting all over...
  3. [SOLVED] Re: how to trace recursion variables in a recursive method

    if n = 5 it enters the first if prints the number and it would exit the recursion, I still don't see how would print the 2's
  4. [SOLVED] Re: how to trace recursion variables in a recursive method

    ok, I'm almost there... but why when it reaches 5 and 4 skips this part


    System.out.println("n " + n + " m " + m);
    System.out.println("m " + m + " m-1 " + (m-1));
    primeFactorsR(m, m-1);

    and...
  5. [SOLVED] Re: how to trace recursion variables in a recursive method

    yes, I did that, but I'm having problem knowing when this call "primeFactorsR(n/m, (n/m)-1)" takes place.
    ones it gets here "primeFactorsR(m, m-1)" it will enter the next recursion or it will...
  6. [SOLVED] how to trace recursion variables in a recursive method

    guys, is there any way to trace the variables and calls in netbeans for recursive methods? I'm trying to understand the behavior of the "primeFactorsR" recursive method, but I'm kind of confuse

    ...
Results 1 to 6 of 6