public void Given_empty_array_When_convert_Then_return_null() { Assert.AreEqual(null, ConvertSortedArrayToBinarySearchTree.SortedArrayToBST(new int[] { })); }
public void Given_array_2_item_When_convert_Then_return_root() { var result = ConvertSortedArrayToBinarySearchTree.SortedArrayToBST(new int[] { 1, 2 }); Assert.AreEqual(1, result.val); }