[Community puzzle] Advanced Tree

This topic is about the puzzle Advanced Tree.

Feel free to send your feedback or ask some help here!

Strange :slight_smile:, why :
0 directories
1 directory
2 directories

 ?

I asked him in the comment room. :grimacing:

Yup, like said to nicola in the comment section, I wanted to be the closest as possible of the Tree’s behaviour, and the original Tree seems to not handle the “0” :stuck_out_tongue:

That is actually correct English


There are no people in the room.
There is one person in the room.
There are two people in the room.

  • danBhentschel

Hi all,
seems like I cannot pass 08 Hidden Files w/o -a Validator.
Can anybody give me a clue what is the difference compared to other tests?

Thanks :smiley:

There is really nothing special about the Validator 8 compared to other tests. :confused:

If you want to DM me your code, I can try to figure out what’s going on.

  • danBhentschel

I can’t pass the Error Handling tests.

Even hardcoding the output doesn’t help me pass.

I output “Directory3 [error opening dir]” but the validator fails the test saying:

Échec
Trouvé : Rien
Attendu : 0

(sorry it seems to be a mix of French and English)
If I hardcode printing a ‘0’ after that line, it fails saying it wasn’t waiting for anything (Attendu: Rien).

I don’t understand at all what is wrong with my output
 Any help as to what I’m doing wrong?

1 Like

Got the very same Problem. are you using Java, too?

Nope I’m using Python (2.7)

Note that I pass every single test except the Error handling ones.
The problem description is not detailed enough on those cases I’d say.

If you look at the test case, you will see that the expected output is:

Directory3 [error opening dir]

0 directories, 0 files
  • danBhentschel

Thanks player_one.

I found a bug in the validators for the puzzle. Number 15 expects:
“0 directories”
which is clearly inconsistent with the rest of the error cases (13,14) which expect:
“0 directories, 0 files”

Simlarly validator 10 (Directory flag test) expects:
“3 directories”
with no “files” part! Another inconsistency


Ignore this: For anyone with the same issue, check the input flags to understand the different outputs.

Took some time to work it out though. :smiley:

I am having trouble with Big Validator 1 (the last validator in the submission). My code passes all of the tests and all of the other validators, but not that one.

I read through the instructions a little more carefully and noticed that (as far as I can tell) it could be possible to have different directories of the same name if they were at a different depth so I changed my code to handle that case (unless I have an error in the changes, but I think it is correct). That was the only rule I noticed that wasn’t addressed in the test cases and seemed like a potential problem with my code. So now I don’t know what to try to fix the last validator.

Can anyone point me in a useful direction?

If you DM me your code, I can try to help out.

  • danBhentschel

Maybe an issue about your tree printing ?

Since it’s the last folder to check in with some depths in it, maybe you’re printing a pipe instead of a space somewhere.
I can just tell you that the big validator is mostly testing the program logic, the tree printing and especially (like said above) the depth printing in the last folder checked.

I hope that helped you :stuck_out_tongue:

I guess it is sort of helpful, but given that it passes all of the other tests and validators I am still a bit at a loss as to what the problem could be. Presumably some edge case that didn’t get tested anywhere else


Maybe a problem with the ordering of file names. The ordering should be 0, 1, 2, 
, 9, a, A, b, B, c, C,