Posts Tagged ‘tree’

Ancestor Binary Tree

Sunday, June 12th, 2011

binary search tree – searches range .. help needed?

I'm trying to code a broad search of a search tree java binary. So I realize the first step is to get at least the ancestors. I've done this, and I have a hive where k1 is on the left, and k2 is right. Now I have to do this extensive search in O (h + k) time, where h is the height, k is the number of keys in the range. We are told that we have to "find All of the above "and" find all below "and the use of these methods to find the range. So my guess is, get the common ancestor root and then use the Search function above all in the left subtree, and find all below in the right subtree, add the results to the root and voila, you have the range of keys. But how I can implement and findallbelow findallabove and stay within O (h + k)? And if you have time, what I do if the root is one of the keys? What is the common ancestor, then?

CSE2011 ru? if so, add me on msn if you still 're up. powerdeagle@hotmail.com


The Ancestor`s Tale (Hardcover)


The Ancestor`s Tale (Hardcover)


$16.72


From the scientist who penned THE SELFISH GENE, this exploration of Earth`s family tree goes backward in time by a way of a series of Chaucer-like tales focusing on a variety of life forms whose ancestry converges with our own. Gradually, Dawkins guides the reader in a regress that ultimately stretches to the primal bacterium that was the ultimate ancestor of all life on this planet. THE ANCESTOR`S TALE was named a New York Times Notable Book for 2004.

The Ancestor`s Tale (Paperback)


The Ancestor`s Tale (Paperback)


$11.41


From the scientist who penned THE SELFISH GENE, this exploration of Earth`s family tree goes backward in time by a way of a series of Chaucer-like tales focusing on a variety of life forms whose ancestry converges with our own. Gradually, Dawkins guides the reader in a regress that ultimately stretches to the primal bacterium that was the ultimate ancestor of all life on this planet. THE ANCESTOR`S TALE was named a New York Times Notable Book for 2004.
0