Esempio n. 1
0
        public void FlattenTest()
        {
            var solution = new _114_FlattenBinaryTreeToLinkedList();
            var root     = TestHelper.GenerateTree(new int?[] { 1, 2, 5, 3, 4, null, 6 });

            solution.Flatten(root);
            AssertHelper.AssertTree(new int?[] { 1, null, 2, null, 3, null, 4, null, 5, null, 6 }, root);
        }
Esempio n. 2
0
        public void FlattenTest_Null()
        {
            var solution = new _114_FlattenBinaryTreeToLinkedList();

            solution.Flatten(null);
        }