Non-tail recursion

Last updated

What is Non-tail recursion?

Tail recursion is when a function can directly return the result of a recursive call - there are no outstanding operations, and there is no need for the call stack frame to be preserved. So it can be translated to a “goto with arguments”, and the stack usage will be constant.

In “non-tail recursion”, there are outstanding operations after the recursive call, and the stack frame cannot be nuked.

Free resources to learn Non-tail recursion

More in stage 5: Endianess

Non-tail recursion: common questions

Can I learn Non-tail recursion in Hindi?

This lesson is written in English. Once you sign in, open it in the interactive course and ask the AI tutor to explain Non-tail recursion in Hindi or Hinglish. The tutor answers from this lesson’s own text, so it stays on the syllabus, and it runs on your own Google, OpenAI or Anthropic key.

Is this Non-tail recursion tutorial for beginners?

It is lesson 50 of 188 in the free Computer Science roadmap, in stage 5, Endianess. If you are new to Computer Science, start from stage 1 and come back here in order; if you already know the earlier stages, this lesson stands on its own.

Still confused? Ask me