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.
This can be solved easily in linear time and with constant storage using dynamic programming
the main idea is if we have an array like this [1, - 1, 3, 8 ,4, 0, 11, 3, 4, 20], we want to partition that array into smaller sub arrays around negative or zero elements as negative elements and zeros can not contribute to the maximum sum
so this array should be partitioned into [1], [3, 8, 4], [11, 3, 4, 20]
Then we will find the maximum possible sum in each sub array and add it to the total sum
which should be (1) + (3 + 4) + (3 + 20)
We will assume that the maximum sum for an array of all negative numbers will be zero, otherwise, code can be easily modified to find the non-positive number nearest to zero and return it.
could for this should be something like
- usama.fayez June 07, 2013