public static void Main(string[] args)
var sequence1 = new[] { 3, 4, -1, 1};
var sequence2 = new[] { 1, 2, 0};
var sequence3 = new[] { 5, 8, 3, 1, 4, 6};
var sequence4 = new[] { 7, 8, 9, 13, 5, 21, 3};
var sequence5 = new[] { -5, -2, 0, 2, -4};
var sequence6 = new[] { -5, -2, 2, 1, -4};
var lowestNatural1 = LowestNatural(sequence1);
var lowestNatural2 = LowestNatural(sequence2);
var lowestNatural3 = LowestNatural(sequence3);
var lowestNatural4 = LowestNatural(sequence4);
var lowestNatural5 = LowestNatural(sequence5);
var lowestNatural6 = LowestNatural(sequence6);
if (lowestNatural1 != 2) throw new System.Exception("Error");
if (lowestNatural2 != 3) throw new System.Exception("Error");
if (lowestNatural3 != 2) throw new System.Exception("Error");
if (lowestNatural4 != 1) throw new System.Exception("Error");
if (lowestNatural5 != 1) throw new System.Exception("Error");
if (lowestNatural6 != 3) throw new System.Exception("Error");
if (LowestNatural(new int[]{}) != 1) throw new System.Exception("Error");
if (LowestNatural(null) != 1) throw new System.Exception("Error");
Console.WriteLine("All good");
private static int LowestNatural(int[] sequence)