cpp implementation of unique binary search trees count
caveat of calculating the length of array, explicitly init an array