@[email protected] to Programmer [email protected] • 7 months agoThat Nim Flashbackssh.itjust.worksmessage-square56fedilinkarrow-up1820
arrow-up1820imageThat Nim Flashbackssh.itjust.works@[email protected] to Programmer [email protected] • 7 months agomessage-square56fedilink
minus-square@[email protected]linkfedilink5•7 months agoLettme introduce you to ackermann’s function: int ack(int m, int n) { if (m == 0) { return n+1; } else if((m > 0) && (n == 0)){ return ack(m-1, 1); } else if((m > 0) && (n > 0)) { return ack(m-1, ack(m, n-1)); } } You won’t run out of stackoverflows any time soon.
Lettme introduce you to ackermann’s function:
int ack(int m, int n) { if (m == 0) { return n+1; } else if((m > 0) && (n == 0)){ return ack(m-1, 1); } else if((m > 0) && (n > 0)) { return ack(m-1, ack(m, n-1)); } }
You won’t run out of stackoverflows any time soon.