using System.Collections.Generic;
public static void Main()
int[] intList = new int[] { 15, 2, 2, 2, 14, 5, 5, 15, 1, 5, 7, 8, 8 };
var exist = DoesExist(intList);
Console.WriteLine(exist);
var numRepeat = NumberOfRepeatNumbers(intList);
Console.WriteLine(numRepeat);
var numUniqueNumbers = NumberOfUniqueNumbers(intList);
Console.WriteLine(numUniqueNumbers);
public static bool DoesExist(int[] inList) {
for(int i = 0; i < inList.Count(); i++)
if (inList[i] == 15 && inList[i + 1] == 15)
public static int NumberOfRepeatNumbers(int[] inList)
for (int i = 0; i < inList.Count() -1; i++)
if (inList[i] == inList[i + 1])
public static int NumberOfUniqueNumbers(int[] inList)
List<int> tempList = new List<int>();
for (int i = 0; i < inList.Count(); i++)
var newValue = inList[i];
if (!tempList.Contains(newValue))