Yahoo Interview Question for Software Engineer / Developers






Comment hidden because of low score. Click to expand.
0
of 0 vote

Fibonacci series concept
s=0+1+1+2+3+5+8......(n-1)+n

- Anonymous September 13, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

F[n]=F[n-1]+F[n-2]. For a given n we can solve this recurrence in O(n). But I suggest you to look at matrix exponentiation using which we can solve this in O(logn)

- Anonymous September 16, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

It takes N steps to reach Nth Step...

- Ekalavya September 22, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

0 1-steps and N/2 2-steps or
2 1-steps and N/2 2-steps or
...
n 1-steps and 0 2-steps.
The total number of ways therefore are: (N/2 + 1)

- Anonymous September 23, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

P(N)=P(n-1)+P(n-2)
P(1)=1
P(2)=2
you can write an program to calculate P(n) and deducted P(N) using math knowledge

- ly880411 October 31, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Same as coin change problem.

N is the total sum we need to reach, 1,2 are as coins.

What is the number of ways you can make a sum of N using these coins.

Can be solved by Dynamic Programming

- testuser March 11, 2014 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

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.

Learn More

Resume Review

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.

Learn More

Mock Interviews

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.

Learn More