public void BinarySearchTree_InsertDuplicateKey_ReturnsFalse() { var tree = new Solution.BinarySearchTree(); tree.Insert(5).Should().BeTrue(); tree.Insert(5).Should().BeFalse(); }
public void BinarySearchTree_DeleteRootKey_ReturnsTrue() { var tree = new Solution.BinarySearchTree(); tree.Insert(5); tree.Delete(5).Should().BeTrue(); }
public void BinarySearchTree_InsertKey_ReturnsTrue() { var tree = new Solution.BinarySearchTree(); tree.Insert(5).Should().BeTrue(); tree.Insert(3).Should().BeTrue(); tree.Insert(4).Should().BeTrue(); }
public void BinarySearchTree_Delete_MissingKey_ReturnsFalse() { var tree = new Solution.BinarySearchTree(); tree.Delete(5).Should().BeFalse(); }