Esempio n. 1
0
        static void Main(string[] args)
        {
            TreeNode third1  = new TreeNode(5, null, null);
            TreeNode second1 = new TreeNode(2, null, third1);
            TreeNode second2 = new TreeNode(3, null, null);
            TreeNode first   = new TreeNode(1, second1, second2);

            Solution solo = new Solution();

            foreach (string str in solo.BinaryTreePaths(first))
            {
                Console.WriteLine(str);
            }

            Console.ReadKey();
        }