LearnFrenzy
Sign in Take a free test

Recursion · Recursion MCQ · Question 12

Mutual recursion Answer, explanation & discussion

  • MCQ
  • Medium
  • 0 comments
  • Answer explained
  • Moderated community
Question 12 Back to Exercise

What is mutual recursion?

  • A A function calling itself twice
  • B Two or more functions that call each other Correct
  • C Recursion inside a loop
  • D Recursion with memoisation
Correct Answer: Option B

Example: is_even(n) calls is_odd(n - 1), which calls is_even(n - 2), and so on.

Discussion & Comments 0

Share your method, a shortcut, or ask about a step you didn't follow.

No comments yet. Be the first to share your solution!

Post your comment

Comments appear after a quick review by our team.

Search LearnFrenzy

Esc

Quick links