Approach 1: Counting, Prufer Code Theorem to find number of trees possible with n nodes
Approach 2: Bitmask DP