Wednesday, August 15, 2007

Write a C program to find the mininum value in a binary search tree.

Here is some sample C code. The idea is to keep on moving till you hit the left most node in the tree


int minValue(struct node* node)
{
struct node* current = node;

while (current->left != NULL)
{
current = current->left;
}

return(current->data);
}


On similar lines, to find the maximum value, keep on moving till you hit the right most node of the tree.

10 comments:

Unknown said...

Thanks for the info.
Regards
Educational site

Anonymous said...

If you would like to increase your experience just keep visiting this web site and be updated with the most up-to-date information posted here.



my blog post selling a wrecked car

Anonymous said...

Wondеrful site yоu haνe here but I was wonԁerіng іf
you κnew of any dіscuѕsion boardѕ that cover the ѕаme toρics talκed
abοut in this artіcle? I'd really love to be a part of group where I can get feedback from other knowledgeable individuals that share the same interest. If you have any recommendations, please let me know. Cheers!

Also visit my homepage: cash for cars phoenix :: smartsolutions123.com ::

Anonymous said...

After exploring a handful of the articles on your web site, I
really like your way of writing a blog. I saved as a favorite it to my bookmark website list and
will be checking back in the near future. Please visit my web site too
and let me know your opinion.

My web page ... selling a car in florida

Anonymous said...

Very nісe article, totally what I was lоokіng for.


Μу hоmepаge - buу cаrs for cаsh ()

Anonymous said...

This post will assist thе іnternet vіewers for buіlding up new
blog or even а weblog from ѕtагt
to end.

my webѕіte - cash fоr cars surrey [projectwiki.Herlig.net]

Unknown said...
This comment has been removed by the author.
Anonymous said...

I liked your posts, I was wondering why such good content is not monetised are u waiting for adsense approval.I have found another alternative ads http://tinyurl.com/zl83sk9 works fine for my blog http://basicsofvlsi.blogspot.in/

yanmaneee said...

goyard
supreme t shirt
yeezy
supreme clothing
yeezy shoes
goyard handbags
moncler outlet
yeezy
yeezy supply
golden goose

Anonymous said...

c6c95c5e64 n6c55v6o37 q8e49k0x40 w6w01y4r71 u6l77g0k96 k4k36t9v61