`{"id":"7910ffb9-b16f-4705-a763-9bef43dc3c7c","name":"Number Of Bsts","description":"1. You are given a number n, representing the number of elements.\r\n2. You are required to find the number of Binary Search Trees you can create using the elements.","inputFormat":"A number n","outputFormat":"A number representing the number of Binary Search Trees you can create using the elements.","constraints":"0 &lt;= n &lt;= 15","sampleCode":{"cpp":{"code":""},"java":{"code":"import java.io.*;\r\nimport java.util.*;\r\n\r\npublic class Main{\r\n\r\npublic static void main(String[] args) throws Exception {\r\n // write your code here\r\n }\r\n\r\n}"},"node":{"code":""},"ruby":{"code":""},"python":{"code":""}},"points":10,"difficulty":"medium","sampleInput":"4","sampleOutput":"14","questionVideo":"https://www.youtube.com/embed/H1qjjkm3P3c?end=64","hints":[],"associated":[],"solutionSeen":false,"tags":[],"meta":{"path":[{"id":0,"name":"home"},{"id":"0c54b191-7b99-4f2c-acb3-e7f2ec748b2a","name":"Data Structures and Algorithms","slug":"data-structures-and-algorithms","type":0},{"id":"5539a6e8-c8bf-4f04-805c-e43e9d20e72a","name":"Dynamic Programming For Intermediate","slug":"dynamic-programming-for-intermediate-408","type":0},{"id":"642a92ce-79bb-41f3-bcfb-696599c9f5b7","name":"Number Of Bsts","slug":"number-of-bsts","type":1}],"next":null,"prev":{"id":"0fb02aff-fb20-4773-85a8-02e2388a1414","name":"Catalan Number","type":1,"slug":"catalan-number"}}}`

# Number Of Bsts

1. You are given a number n, representing the number of elements. 2. You are required to find the number of Binary Search Trees you can create using the elements.

`{"id":"7910ffb9-b16f-4705-a763-9bef43dc3c7c","name":"Number Of Bsts","description":"1. You are given a number n, representing the number of elements.\r\n2. You are required to find the number of Binary Search Trees you can create using the elements.","inputFormat":"A number n","outputFormat":"A number representing the number of Binary Search Trees you can create using the elements.","constraints":"0 &lt;= n &lt;= 15","sampleCode":{"cpp":{"code":""},"java":{"code":"import java.io.*;\r\nimport java.util.*;\r\n\r\npublic class Main{\r\n\r\npublic static void main(String[] args) throws Exception {\r\n // write your code here\r\n }\r\n\r\n}"},"node":{"code":""},"ruby":{"code":""},"python":{"code":""}},"points":10,"difficulty":"medium","sampleInput":"4","sampleOutput":"14","questionVideo":"https://www.youtube.com/embed/H1qjjkm3P3c?end=64","hints":[],"associated":[],"solutionSeen":false,"tags":[],"meta":{"path":[{"id":0,"name":"home"},{"id":"0c54b191-7b99-4f2c-acb3-e7f2ec748b2a","name":"Data Structures and Algorithms","slug":"data-structures-and-algorithms","type":0},{"id":"5539a6e8-c8bf-4f04-805c-e43e9d20e72a","name":"Dynamic Programming For Intermediate","slug":"dynamic-programming-for-intermediate-408","type":0},{"id":"642a92ce-79bb-41f3-bcfb-696599c9f5b7","name":"Number Of Bsts","slug":"number-of-bsts","type":1}],"next":null,"prev":{"id":"0fb02aff-fb20-4773-85a8-02e2388a1414","name":"Catalan Number","type":1,"slug":"catalan-number"}}}`

Editor

# Number Of Bsts

medium

1. You are given a number n, representing the number of elements. 2. You are required to find the number of Binary Search Trees you can create using the elements.

0 <= n <= 15

## Format

A number n

### Output

A number representing the number of Binary Search Trees you can create using the elements.

## Example

Sample Input

`.css-23h8hz{color:inherit;font-size:0.875rem;line-height:1.125rem;letter-spacing:0.016rem;font-weight:var(--chakra-fontWeights-normal);white-space:pre-wrap;}4`

### Sample Output

`.css-3oaykw{color:var(--chakra-colors-active-primary);font-size:0.875rem;line-height:1.125rem;letter-spacing:0.016rem;font-weight:var(--chakra-fontWeights-normal);white-space:pre-wrap;font-family:Monospace;}14`

Question Video

Discussions

Show Discussion

Related Resources