in reply to Re: program that counts all the vertices in a given tree
in thread program that counts all the vertices in a given tree

The rest of the program is given in the link above. I don't see a way to delete that.
I tried doing this instead:
vertices(pre_order($root))
but that just gives the output of pre_order($root) again and says the number of vertices is 0.

Replies are listed 'Best First'.
Re^3: program that counts all the vertices in a given tree
by o_0 (Initiate) on Jul 01, 2013 at 02:36 UTC
    "traverse the tree and keep count" - that was the ticket, thanks. By the way, someone mentioned plagiarism. Is it plagiarism if I mentioned the book, and also I modified the code?