LinkedIn Python Skill Assessment Quiz Answers

What would happen if you did not alter the state of the element that an algorithm is operating on recursively?

Latest Update on 25th January, 2022 by Certification Course Answers

What would happen if you did not alter the state of the element that an algorithm is operating on recursively?

  1.  You do not have to alter the state of the element the algorithm is recursing on.
  2.  You would eventually get a KeyError when the recursive portion of the code ran out of items to recurse on.
  3.  You would get a RuntimeError: maximum recursion depth exceeded.
  4.  The function using recursion would return None.

Correct Answer:

  •  You would get a RuntimeError: maximum recursion depth exceeded.

Latest Updates

No posts found in this category.