convertListToBST
which takes parameters start
and end
to represent the start and end of the list that needs to be converted to a BST.start > end
, return None
as we have no elements to form a subtree.(start + end) // 2
.start
to mid - 1
.mid + 1
to end
.