Does anyone know the time complexity for calculating the ackermann function ack (m, n) in Big-O notation, or to which complexity class does it belong? Just Ack (3, n) would also suffice. I read somewhere, it SHOULD NOT?
Thanks.
Code snippet:
public class Ackermann { public static int ackermann(int n, int m) { if (n == 0) return m + 1; else if (m == 0) return ackermann(n - 1, 1); else return ackermann(n - 1, ackermann(n, m - 1)); } }
source share