*

http://www.velocityreviews.com/forums/(E-Mail Removed):

>

> 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
Please don't post homework, and please don't post homework that would

have been off-topic if it weren't homework.

The point of homework is to learn something by doing it yourself.

See this group's FAQ for more information about topicality, posting

homework questions and so on: you should always read a group's FAQ

before posting.

Cheers, & hth.,

- Alf

--

A: Because it messes up the order in which people normally read text.

Q: Why is it such a bad thing?

A: Top-posting.

Q: What is the most annoying thing on usenet and in e-mail?