#hello the problem in the getdepth method

12 messages · Page 1 of 1 (latest)

proven trail
#

so i did the function "getdepth" and it compiles but its like he doesnt use the basecase i put i would love a hint to know how to do it 😄

grizzled plazaBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.

proven trail
red ermine
#

I do see a base case though?

proven trail
#

yes, but when i compile it says olivia = 2 even tho olivia isnt in the tree so normally it would have printed -1

red ermine
#

Try debugging then.

proven trail
#

thats why im here if someone can give me a hint

red ermine
#

?

#

The hint is you debug to find the cause of the issue.

proven trail
#

oh okay thank you !

grizzled plazaBOT
#

@proven trail Has your question been resolved? If so, type !solved :)

proven trail
#

!solved