public bool AddVertex(int val, object data = null) { if (root != null) { root.GetEnd().Next = new VertexWirth(GetKey(), val, data); } else { root = new VertexWirth(GetKey(), val, data); } return(true); }
public VertexWirth GetEnd() { if (Next == null) { return(this); } return(Next.GetEnd()); }
public bool AddVertex(int val) { root.GetEnd().Next = new VertexWirth(GetKey(), val); return(true); }