public void balancedTree(Object[] tokens, Object[] vals, int lo, int hi,TernaryTreeNode root) {if (lo > hi) return;int mid = (lo + hi) / 2;root = insert(root, (String) tokens[mid], vals[mid], 0);balancedTree(tokens, vals, lo, mid - 1, root);balancedTree(tokens, vals, mid + 1, hi, root);}
public virtual void BalancedTree(object[] tokens, object[] vals, int lo, int hi, TernaryTreeNode root){if (lo > hi){return;}int mid = (lo + hi) / 2;root = Insert(root, (string)tokens[mid], vals[mid], 0);BalancedTree(tokens, vals, lo, mid - 1, root);BalancedTree(tokens, vals, mid + 1, hi, root);}