|
|
back to boardShow all messages Hide all messagestest #5 andrei parvu 17 Aug 2008 00:54 can anyone tell me what is the 'problem' with test #5, because I get stack overflow, although I don't declare any local variables in my recursive function (I use a vector to simulate the stack) I have the same problem ,first! but I find that test#5 may be not a tree! for example: 3 0 1 1 1 0 1 1 0 1 so you should use array to record whether a node have been in the stack. sorry: the example is 4 0 1 1 1 2 1 2 0 1 1 0 1 But your example is not a tree... there are cicle... Re: test #5 Mescheryakov_Kirill [SESC17]💻 by Kirom 22 Jan 2017 22:44 |
|
|