public static Stack<int> Clone (Stack<int> st)
Stack<int> stCpy = new Stack<int>();
Stack<int> tmp = new Stack<int>();
public static bool IsExist (Stack<int> st, int num)
Stack<int> tmp = new Stack<int>();
while (!st.IsEmpty() && !flag)
public static int cntNum (Stack<int> st, int num)
Stack<int> tmp = new Stack<int>();
public static int Size (Stack<int> st)
Stack<int> tmp = new Stack<int>();
public static void Main (string[] args)
Stack<int> st = new Stack<int>();
Console.WriteLine(Clone(st).ToString());
public Node (T value, Node<T> next)
public void SetValue (T value)
public void SetNext(Node<T> next)
return this.next != null;
public override String ToString()
return this.value.ToString();
this.first=new Node<T> (x,this.first);
T x=this.first.GetValue();
this.first=this.first.GetNext();
return this.first.GetValue();
public override String ToString()
Node<T> pos = this.first;
str=str+pos.GetValue().ToString();
Node<T> temp = new Node<T>(x);
T x=this.first.GetValue();
this.first=this.first.GetNext();
return this.first.GetValue();
public override String ToString ()
Node<T> pos = this.first;
str=str+pos.GetValue().ToString();
private BinNode<T> right;
public BinNode (BinNode<T> left, T x, BinNode<T> right)
public BinNode<T> GetLeft()
public BinNode<T> GetRight()
public void SetValue(T x)
public void SetLeft(BinNode<T> left)
public void SetRight(BinNode<T> right)
public override String ToString ()
return this.value.ToString();