public void Main(string[] args)
int[] arr1 = { 9, 6, 3, 4, 5, 9, 3, 8, 7, 9,10,12 };
Node<int> list = a(arr1);
string q = Console.ReadLine();
public static Node<int> ArrToList(int[] arr)
Node<int> firstNode = new Node<int>(arr[0]);
Node<int> node = firstNode;
Node<int> pos = firstNode;
for (int i = 1; i < arr.Length; i++)
node = new Node<int>(arr[i]);
public static void PrintList(Node<int> firstNode)
Node<int> pos = firstNode;
Console.WriteLine(pos.GetValue());
public static Node<int> a(int[] arr)
Node<int> first = ArrToList(arr);
Node<int> minTemp = first;
if(temp.GetValue() < minTemp.GetValue())
minTemp.SetValue(first.GetValue());
Node<int> pos = first.GetNext();
if(temp.GetValue() < minTemp.GetValue())
minTemp.SetValue(pos.GetValue());
public Node(T value, Node<T> next)
return (this.next != null);
public void SetValue(T value)
public void SetNext(Node<T> next)
public override string ToString()
return this.value.ToString() + " ";