Zeuthen: Writing a C library, part 1
Posted Jul 3, 2011 20:48 UTC (Sun) by
dark (subscriber, #8483)
In reply to:
Zeuthen: Writing a C library, part 1 by MisterIO
Parent article:
Zeuthen: Writing a C library, part 1
What you gain is a destructor that works in O(n) time and does no allocations. By reusing the child pointers as a linked list, you avoid having to make any allocations for it.
I think your approach can get there too, with some refinement. How are you implementing the inorder visit?
(
Log in to post comments)