public Node(T value, Node<T> next)
return (this.next != null);
public void SetValue(T value)
public void SetNext(Node<T> next)
public static Node<int> BuildList()
int num = int.Parse(Console.ReadLine());
list = new Node<int>(num);
num = int.Parse(Console.ReadLine());
last.SetNext(new Node<int>(num));
num = int.Parse(Console.ReadLine());
public static char Q1(Node<int> p)
if (p.GetValue() % 2 == 0)
if (counterEven > counterOdd)
else if (counterEven < counterOdd)
public static void Q2(Node<int> list)
while (list != null && list.GetNext() != null)
if (list.GetValue() > list.GetNext().GetValue())
Console.WriteLine(list.GetValue());
public static void Q3(Node<int> list, int place1, int place2)
for (int i = 0; i < place1; i++)
Console.WriteLine(list.GetValue());
for (int i = 0; i < place2; i++)
Console.WriteLine(list.GetValue());
public static Node<int> Q4(Node<int> head, int num)
Node<int> dummy = new Node<int>(0);
Node<int> temp = new Node<int>(0);
while (p != null && p.GetNext() != null)
while (temp != null && temp.GetValue() == num)
public static Node<int> Q5(Node<int> p, int num)
public static int Q6A(Node<int> p, int num)
public static int Q6B(Node<char> p)
int[] counter = new int[26];
counter[(int)(p.GetValue()) - 97]++;
for (int i = 0; i < 26; i++)
if (counter[i] < MinCounter)
public static void Main()
Console.WriteLine("Hello World");
Node<int> list = BuildList();
Console.WriteLine("Question 1: " + Q1(p));
Console.WriteLine("Question 2: ");
Console.WriteLine("Question 3: ");
Console.WriteLine("Question 4: ");
Console.WriteLine("Question 5: ");
Console.WriteLine("Question 6A: " + Q6A(p, 2));
Console.WriteLine("Question 6B: " + Q6B(P));
Console.Write(p.GetValue() + ", ");