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.first == null;
Node<T> temp = 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> temp = this.first;
if (temp.GetNext() != null)
public static bool IsExistarr(int[] arr, int num)
for (int i = 0; i < arr.Length; i++)
public static bool AreExist(Stack<int> st, int[]arr)
Stack<int> ezer = new Stack<int>();
if (st.Top()!=0&&IsExistarr(arr, st.Top()) && IsExistarr(arr, lastnum) && IsExistarr(arr, beforelastnum))
public static Stack<int> Idk(int[] ignored,int sum)
Stack<int> st = new Stack<int>();
if (!IsExistarr(ignored, i))
for (int j = 1; j <= 9; j++)
if (!IsExistarr(ignored, j))
for (int k = 1; k <= 9; k++)
if (!IsExistarr(ignored, k)&&i!=j &&j!=k&&k!=i)
int[] arr = new int[3] { i, j, k };
if (i + j + k == sum && !AreExist(st, arr))
Console.WriteLine(i + "+" + j + "+" + k + "=" + sum);
public static Stack<int> CloneStack (Stack<int> st)
Stack<int> ezer= new Stack<int> ();
Stack<int> ezer2= new Stack<int> ();
public static void InsertStack(Stack<int> st, int num)
Stack<int> ezer= new Stack<int> ();
public static Stack<int> Idkfour (int[]ignored, int sum)
Stack<int>st= new Stack<int>();
Stack<int>ezer= new Stack<int>();
ezer=Idk(ignored, tempsum);
public static void Main(string[] args)
int[] ignored = new int[1] { 0};