Solving Unique Binary Search Trees in Javascript. Please try yourself first to solve the problem and submit your implementation to LeetCode before looking into solution.

Problem Description

Given n, how many structurally unique BST's (binary search trees) that store values 1 ... n?

Example

Input: 3
Output: 5

Explanation: Given n = 3, there are a total of 5 unique BST's:

	   1         3     3      2      1
	    \       /     /      / \      \
	     3     2     1      1   3      2
	    /     /       \                 \
	   2     1         2                 3
	   

See the full details of the problem Unique Binary Search Trees at LeetCode

Originally posted at: @github.com/ignacio-chiazzo/Algorithms-Leetcode-Javascript