Skip to content

Instantly share code, notes, and snippets.

@fbs
Created March 27, 2011 18:32
Show Gist options
  • Save fbs/889444 to your computer and use it in GitHub Desktop.
Save fbs/889444 to your computer and use it in GitHub Desktop.
/* * * * * * * * *
*
* Help routine for remove_word_from_tree
* this recursive function finds the 'alphabetically largest'
* word in (sub-)tree. This means: it returns a pointer
* to the word that has the largest value out of strcmp().
*
* * * * * * * * */
const char * // help routine for the above function
branch::get_largest_word(void) const
{
if(_right)
return _right->get_largest_word();
else
return _word;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment