input: Write a python function to calculate the number of unique binary search trees that can be formed with a given list of numbers.
  assert bin_search_tree([1, 2, 3]) == 5
  assert bin_search_tree([4, 5, 6, 7]) == 14
  assert bin_search_tree([10]) == 1
output: def bin_search_tree(nums):
      def num_trees(n):
          if n == 0 or n == 1:
              return 1
          dp = [0] * (n + 1)
          dp[0], dp[1] = 1, 1
          for i in range(2, n + 1):
              for j in range(i):
                  dp[i] += dp[j] * dp[i - 1 - j]
          return dp[n]
  
      return num_trees(len(nums))