Re: hacker challenge - traverse a list
- From: Ben Pfaff <blp@xxxxxxxxxxxxxxx>
- Date: Fri, 29 Feb 2008 10:04:26 -0800
cri@xxxxxxxx (Richard Harter) writes:
Here is a little challenge - print the contents of a binary tree
in order only using O(1) additional memory.
Do you want to limit runtime to O(n) or forbid modifying the
binary tree? I can think of a simple solution in the latter
category, and I have the sketch of a solution in the former
category.
Is it a binary search tree or an arbitrary binary tree?
--
Ben Pfaff
http://benpfaff.org
.
- Follow-Ups:
- Re: hacker challenge - traverse a list
- From: Richard Harter
- Re: hacker challenge - traverse a list
- References:
- hacker challenge - traverse a list
- From: Richard Harter
- hacker challenge - traverse a list
- Prev by Date: hacker challenge - traverse a list
- Next by Date: Re: hacker challenge - traverse a list
- Previous by thread: hacker challenge - traverse a list
- Next by thread: Re: hacker challenge - traverse a list
- Index(es):
Relevant Pages
|