title: How to rewrite Ackermann function in non-recursive style?
body: <p>I have function</p>
  
  <pre><code>public static int func(int M,int N){
      if(M == 0 || N == 0) return M+N+1;
      return func(M-1, func(M, N-1));
  }
  </code></pre>
  
  <p>How to rewrite it in non-recursive style ?
  Maybe, is it implementation some algorithm?</p>