C/C++   |   Java   |   Oracle/Database   |   SAP   |   ASP .NET   |   Mainframe-DB2   |   Freshers
Add comment
Name:
Email:
* Comment:
(Use BBcode )


How many different trees can be constructed using n nodes?

Its


2^n - n


So, if there are 10 nodes, you will have (1024 - 10) = 1014 different trees!! Confirm it yourself with a small number if you dont believe the formula.

 

 



RSS