Created
June 4, 2012 15:57
-
-
Save paratechnical/2869203 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var tree = new Tree(); | |
tree.Insert("romane"); | |
tree.Insert("romanus"); | |
tree.Insert("romulus"); | |
tree.Insert("rubens"); | |
tree.Insert("ruber"); | |
tree.Insert("rubicon"); | |
tree.Insert("rubicundus"); | |
Console.WriteLine("predecessor of the word \"romanes\":" + tree.FindPredecessor("romanes")); | |
Console.WriteLine("successor of the word \"rom\":" + tree.FindSuccessor("rom")); | |
Console.WriteLine(tree.Lookup("romulus") ? "there" : "not there"); | |
tree.Delete("romanus"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment