Jun-27-2020, 12:02 PM
(This post was last modified: Jun-27-2020, 12:03 PM by Gribouillis.)
The
Then at line 31, you are computing the ancestors of the candidate by a recursive call but you are not doing anything with the list of ancestors that is returned by that call. If you don't use the result, this call is unnecessary, or perhaps there is something to change in the code.
output
list that is defined at line 26 should be defined inside the body of the ancestors()
function otherwise all the calls to ancestors() will share the same output list and this can only fail. Each time the function is called, a new output list must be created.Then at line 31, you are computing the ancestors of the candidate by a recursive call but you are not doing anything with the list of ancestors that is returned by that call. If you don't use the result, this call is unnecessary, or perhaps there is something to change in the code.