Comment by Frenchiie

11 years ago

I dont want to be an ass but how do you not know how to invert a tree? Anyone who knows how to write a tree and traverse it should be able to do this. If you ran out of time coding it then that's different.

Not even. If you know what a tree is, and you've written a couple of recursive problems on trees in your life, then you know most of them are approximately 5-6 lines of code.

If you're spending 45 minutes writing 5 lines of code, it is not definitive, but certainly a red flag.

  • Nobody in this thread has even been able to define what inverting a tree means. (Reversing or mirroring? Sure.) My search for how to invert a tree led to a bunch of fairly hairy academic papers.

    If you have a definition, please elucidate.