Technical Interview Preperation
A portal for Data Structure, Algorithms and Java
Home
LinkedList
Binary Tree
Bit Manipulation
Java
Sorting
String
Monday, April 23, 2018
How many different trees can be constructed using n nodes
Answer is 2^n - n
So, if there are 10 nodes, you will have (1024 - 10) = 1014 different trees!
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
Categories
BinaryTree
(27)
Bit Manipulation
(3)
Java
(3)
LinkedList
(2)
Sorting
(1)
String
(1)
No comments:
Post a Comment