public void SampleTree_ElementDoesNotExist() { TreeLowestCommonAncestor.LowestCommonAncestor(_sampleTree, 0, 1).Should().BeNull(); }
public void SampleTree_AllTree() { TreeLowestCommonAncestor.LowestCommonAncestor(_sampleTree, 50, 1).Value.Should().Be(5); }
public void SampleTree_2() { TreeLowestCommonAncestor.LowestCommonAncestor(_sampleTree, 3, 1).Value.Should().Be(2); }
public void SampleTree_LEafElements() { TreeLowestCommonAncestor.LowestCommonAncestor(_sampleTree, 30, 50).Value.Should().Be(40); }
public void Null_Null() { TreeLowestCommonAncestor.Tree tree = null; TreeLowestCommonAncestor.LowestCommonAncestor(tree, 1, 2).Should().BeNull(); }