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

Advertisement

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

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.

Leave a Comment


Share via
Join our list

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.

Send this to a friend