コード例 #1
0
        public void LowestCommonAncestorSteps_ValueTest(string input, int result)
        {
            var tree = Task6.GetOrbitTree(input);

            tree.ShouldNotBeNull();

            var youNode = tree.First(a => a.Id == "YOU");

            youNode.ShouldNotBeNull();

            var sanNode = tree.First(a => a.Id == "SAN");

            sanNode.ShouldNotBeNull();

            Task6.LowestCommonAncestorSteps(youNode, sanNode).ShouldBe(result);
        }