Google interview questions, merge of N companies
Suppose we have N companies, and we want to eventually merge them into one big company. How many ways are there to merge?
Use catalan number, n number merge represents a binary tree with n-1 nodes and n leaves.
Feb 1, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment