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.
well..it looks like a simple backtracking..so here is what we should do.we select every possible permutation of doors 2 to n-1(since 1 and n cannot be opened so no point considering them) .so we have to find the permutations of n-2 doors excluding 1 and n.
so here the function dfs maintains the current value(val) and the number of doors already activated(c).whenever c becomes n-2 ie all the doors have been activated we store the val in maxi(only if is greater than current maxi) and then we backtrack.Similarly we keep a track of the activated door numbers using a boolean array vis[] so that we donot activate the same door again.
- rock2321 October 01, 2013all suggestions to improve the solution further are welcome.