If function A calls function B and function B calls function A, is it technically a recursion?

StackOverflow https://stackoverflow.com/questions/23144510

  •  05-07-2023
  •  | 
  •  

Question

How is recursion defined technically?

If

function A calls function B
function B calls function A
function A calls function B
function B calls function A
...

is it still considered to be recursion?

Was it helpful?

Solution

Yes. Specifically it is nested recursion (aka mutual recursion).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top