@nr1286 said in Given a sorted array, write an algorithm to create a binary search tree with minimal height.:
return arrayToBstUtil(nums, left, right);
I think it should be:
return arrayToBstUtil(nums,0,nums.size());
@nr1286 said in Given a sorted array, write an algorithm to create a binary search tree with minimal height.:
return arrayToBstUtil(nums, left, right);
I think it should be:
return arrayToBstUtil(nums,0,nums.size());