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.
Thank you for the replies. I haven't gone through 3rd and 4th solutions. For 1st and 2nd, it looks good. Both approaches look similar with different ways of coding. I just had one small doubt here,
- rahulK September 30, 2014With your approach, consider following example,
1 0 0 1 1 0
We start with index 1 (as first 0). We pass 4th index and say the sum is 0, and hence cancel the window and start with another 0, which is index 5. So, now our window becomes [5,5], which will make the array as 1 0 0 1 1 1
Output: max 1's = 4.
But our window should have been [1,2], which will make the array as 1 1 1 1 1 0
Output: max 1's = 5.