Recursion

/rɪˈkɜːrʒn/
Definition 1 of 3
Visual representation of "recursion"
LampPro Tip 1/3

Limiting Condition

Recursion must have an endpoint to prevent infinite loops.

Illustration for Limiting Condition
The recursion stops when the function reaches zero.
LampPro Tip 2/3

Programming Errors

Misusing recursion can cause stack overflow, crashing the program.

Illustration for Programming Errors
He forgot the base case, and the recursion caused a stack overflow.
LampPro Tip 3/3

Efficiency Matters

Recursion can be less efficient and slower than iteration in some cases.

Illustration for Efficiency Matters
To improve speed, he replaced recursion with a loop.
Visual representation of the word "Recursion"

Never forget "Recursion"

Humans forget easily. That's why you should download WordUp: Smart reminders, word games, AI practice, and much more!

Download on the App StoreGet it on Google PlayGet it from MicrosoftGet it on AppGallery
Example 1 of 2
Example 1 of 1
Chrome

WordUp Chrome Extension

As you browse the web instantly look up words you don’t know.

Get Chrome Extension