Microsoft Interview Question
Software Engineer / DevelopersAssuming its a square pyramid and base level has 25X25 balls
then the n-1 level has 24X24 balls...
so seeing this progression n^2 + (n-1)^2 + ...... 1
n(n+1)(2n+1)/6 = 25*4*51 = 5100 . So required balls are 5100-625 = xxx
I agree with Ravikant but I suppose there is some calculation mistake.
You need 1 + 2^2 + 3^2...12^2 balls. The sum comes out to be: 650
Since we already have 625 balls in hand, we just need to take 25 more balls from the bag.
Hey pyramid is 3 d structure for a pyramind of height 1, 1 ball is required, height 2 1+3 = 4 balls required height 3 1+3+6 balls are required and so on....
A pyramid of height n requires n(n+1)(2n+1)/6 balls, find the closest value greater tha 625, which happens to be 680 for n=15...Therefore 55 more balls are required
Since pyramid is 3D, After the 25x25, don't you think the next one should be 23x23...
25^2 + 23^2 + ..... + 1^2
Correct me if my idea is wrong.
You're all trying to leap into solving the puzzle without so much as a mention of the fact that the "structural analysis issues" part is the most important part of the question.
Without an effective answer to this second question you cannot possibly produce a meaningful answer to the first part.
Meanwhile, Microsoft, this is a lame question to throw into an programmer interview, if that's what it is. Arbitrary IQ problems will not decide who the best programmers are, real-world software development issues are what you want to see solved. There is very little point in analyzing logical thinking beyond the context of actual developmental issues.
You're all trying to leap into solving the puzzle without so much as a mention of the fact that the "structural analysis issues" part is the most important part of the question.
Without an effective answer to this second question you cannot possibly produce a meaningful answer to the first part.
Meanwhile, Microsoft, this is a lame question to throw into an programmer interview, if that's what it is. Arbitrary IQ problems will not decide who the best programmers are, real-world software development issues are what you want to see solved. There is very little point in analyzing logical thinking beyond the context of actual developmental issues.
Yes, the answer seems to be (24^2)+(23^2)+....+1 = 4900
- Chintan October 27, 2008