Final answer:
There are 4 binary trees of height 2.
Step-by-step explanation:
In order to determine the number of binary trees of height 2, we need to consider three cases: when the root only has a left child, when the root only has a right child, and when the root has both a left and a right child.
Case 1: Only a left child - In this case, there is only one possible binary tree.
Case 2: Only a right child - Similarly, there is only one possible binary tree.
Case 3: Both a left and a right child - For this case, we can consider it as two separate binary trees of height 1 attached to the root, which gives us a total of 2 possibilities.
Adding up the number of possibilities for each case, we have 1 + 1 + 2 = 4 binary trees of height 2.