Friday, June 1, 2018

How many different binary trees are possible with n nodes?

Problem statement: what do you say, how many different binary trees are possible with n nodes?
  • In general, 
  1. if there are n nodes,
  2. then there exist 2n - n different trees
  • example - 
  1. number of node = 3
  2. then different trees = 23 - 3 = 8 - 3 = 5

No comments:

Post a Comment

How to run standalone mock server on local laptop

 Please download the standalone wiremock server from Direct download section at the bottom of the page.  Download and installation Feel fre...