Method Insert
Insert(TernaryTreeNode, String, Object, Int32)
Inserts a key in TST creating a series of Binary Search Trees at each node. The key is actually stored across the eqKid of each node in a successive manner.
Declaration
public virtual TernaryTreeNode Insert(TernaryTreeNode currentNode, string s, object val, int x)
Parameters
Type | Name | Description |
---|---|---|
TernaryTreeNode | currentNode | a reference node where the insertion will take currently. |
System.String | s | key to be inserted in TST. |
System.Object | val | |
System.Int32 | x | index of character in key to be inserted currently. |
Returns
Type | Description |
---|---|
TernaryTreeNode | The new reference to root node of TST |