Unique Binary Search Trees

Given an integer n, return the number of structurally unique Binary Search Trees (BSTs) that can be formed using numbers from 1 to n.

Constraints

  • 1 <= n <= 19
Saving… · 2 lines
class Solution:
def uniqueBinarySearchTrees(self, n: int) -> int:
Console

Click Run to execute sample tests.