Binary search tree
- From: sarajan82@xxxxxxxxx
- Date: Sun, 25 Nov 2007 03:31:26 -0800 (PST)
Hi all,
Given a binary search tree and a number n, how can we find the
smallest node of the tree greater than n and the largest node smaller
than n?
For example for the following binary search tree where 5 is root and 4
is the left and 6 the right child, for an input of 5,
4 and 6 will be output:
5
4 6
Thanks,
Sara
.
- Follow-Ups:
- Re: Binary search tree
- From: CBFalconer
- Re: Binary search tree
- From: Alf P. Steinbach
- Re: Binary search tree
- Prev by Date: Re: reading network data
- Next by Date: Re: Binary search tree
- Previous by thread: Re: reading network data
- Next by thread: Re: Binary search tree
- Index(es):