public static void Run()
        {
            ComputeNodeList mPgm = new ComputeNodeList();

            ListNode node7 = new ListNode(7, null);
            ListNode node6 = new ListNode(6, node7);
            ListNode node5 = new ListNode(5, node6);
            ListNode node4 = new ListNode(4, node5);
            ListNode node3 = new ListNode(3, node4);
            ListNode node2 = new ListNode(2, node3);
            ListNode root  = new ListNode(1, node2);

            mPgm.CountTotalNode(root);
            mPgm.GetFifthNode(root);//The result;
            Console.WriteLine(string.Format("Node Value: {0}, Next Node: {1}", mPgm.fifthNode.NodeValue, mPgm.fifthNode.NextNode.NodeValue));
        }
Exemple #2
0
 static void Main(string[] args)
 {
     ComputeNodeList.Run();
     TypeOfTriangle.Run();
     ReverseString.Run();
 }