RadixTree.Tree.FindSuccessor C# (CSharp) Method

FindSuccessor() public method

public FindSuccessor ( string word ) : string
word string
return string
        public string FindSuccessor(string word)
        {
            return FindSuccessorRec(word, _root,string.Empty);
        }

Usage Example

示例#1
0
        static void Main(string[] args)
        {
            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");
        }
All Usage Examples Of RadixTree.Tree::FindSuccessor