Interview question ranking FizzBuzz (1), implementing malloc (10)

Posted by blrs on Programmers See other posts from Programmers or by blrs
Published on 2011-02-26T23:21:12Z Indexed on 2011/02/26 23:32 UTC
Read the original article Hit count: 223

Filed under:

I'd like to have your opinion on the difficulty of the following interview question:

Find the subarray with maximum sum in an array of integers in O(n) time.

This trivial sounding problem was made famous by Jon Bentley in his Programming Pearls where he uses it to demonstrate algorithm design techniques.

On a scale of 1-10, 1 being the FizzBuzz (or HoppityHop) test and 10 being implement the C stdlib function malloc(), how would you rank the above problem?

I think the people who can best answer this question are those who have read Programming Pearls and have tried to solve this problem on their own. To motivate those who haven't, 'Programming Pearls' gets featured many times in the 'Top 10 programming books' list.

© Programmers or respective owner

Related posts about interview-questions