コード例 #1
0
ファイル: Program.cs プロジェクト: netLearner7/Note
        static void Main(string[] args)
        {
            tree tree = new tree(1)
            {
                left = new tree(2)
                {
                    left = new tree(3)
                    {
                        left = new tree(4), right = new tree(5)
                    }
                }, right = new tree(6)
                {
                    left = new tree(7), right = new tree(8)
                }
            };
            solution solution = new solution();

            Console.WriteLine(solution.MaxDepth(tree));
            Console.Read();
        }
コード例 #2
0
        static void Main(string[] args)
        {
            TreeNode treeNode = new TreeNode(1)
            {
                left = new TreeNode(2)
                {
                    left = new TreeNode(3)
                    {
                        left = new TreeNode(4)
                    }
                },
                right = new TreeNode(2)
                {
                    right = new TreeNode(3)
                    {
                        right = new TreeNode(4)
                    }
                }
            };

            solution solution = new solution();

            solution.IsBalanced(treeNode);
        }
コード例 #3
0
ファイル: Program.cs プロジェクト: netLearner7/Note
        static void Main(string[] args)
        {
            solution solution = new solution();

            solution.GetRow(3);
        }
コード例 #4
0
ファイル: Program.cs プロジェクト: netLearner7/Note
 static void Main(string[] args)
 {
     solution solution = new solution();
     solution.ClimbStairs(8);
 }
コード例 #5
0
ファイル: Program.cs プロジェクト: netLearner7/Note
        static void Main(string[] args)
        {
            solution solution = new solution();

            solution.LengthOfLastWord("b   a    ");
        }
コード例 #6
0
ファイル: Program.cs プロジェクト: netLearner7/Note
        static void Main(string[] args)
        {
            solution solution = new solution();

            solution.CountAndSay(5);
        }
コード例 #7
0
        static void Main(string[] args)
        {
            solution solution = new solution();

            solution.Generate(5);
        }
コード例 #8
0
ファイル: Program.cs プロジェクト: netLearner7/Note
        static void Main(string[] args)
        {
            solution solution = new solution();

            solution.mysqrt(2147483647);
        }