public static void Main(string[] args)
var second = new Node(2);
var fourth = new Node(4);
Console.WriteLine("Iterative: " + first.GetLengthIterative());
Console.WriteLine("Recursive: " + first.GetLengthRecursive());
Console.WriteLine(node.Data);
public int GetLengthIterative()
public int GetLengthRecursive()
return 1 + this.Next.GetLengthRecursive();