public void quick_test() { var root = new TstNode('h'); root.Insert("hello"); root.Insert("world"); root.Insert("mind"); root.Insert("gap"); Assert.That(root.Search("hello"), Is.Not.Null); Assert.That(root.Search("beans"), Is.Null); }
private TstNode insertRightNode(char ch, TstNode node) { Interlocked.CompareExchange(ref node._right, new TstNode(ch), null); node = node._right; return node; }
private TstNode insertCenterNode(String word, int i, TstNode node) { Interlocked.CompareExchange(ref node._center, new TstNode(word[i]), null); node = node._center; return node; }