is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.
CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.
Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.
Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.
Refer to comment of eugene.yarovoi , it will help.
- gautam1237 January 11, 2012Sum, will return the total number of binary trees.
for example, if we take n=3, so in the for loop,
i=1, find_no(0)*find_no(2) ie taking first element as the root, there are 0 element in the left and 2 element in the right.
then recursively for 2 element it'll break the same way.for:
i=1,find_no(0)*find_no(1)=1*1=1 (ie first element root,0 element left 1 right)
i=2, find_no(1)*find_no(0)=1*1=1
so sum=1+1=2
so for n=3 and i=1:
find_no(0)*find_no(2)=1*2=2
for i=2:(taking 2nd element as root node)
find_no(1)*find_no(1)=1*1=1
for i=3:(taking 3rd element as root node)
find_no(2)*find_no(1)=2*1=2
so sum=2+1+2=5
which is true as you can check.