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.
Here aren't you trying to find all substrings starting from 0th character and then matching for consecutive substring.
- amoghavs September 30, 2012But if you have say, abcbcde , you'll check for cases
1. a&b
2.ab&cb
3.abc&bcd
Not at all consider bc and bc.
So there should be one more loop to check for the substrings starting from other than 0th character. Also, in that case, you should also consider the case for the string abcbdeefef- where ef and ef appear in bottom half of string.
The way I see this is, it is a DP problem. But for each character you have to build a matrix, which checks for strings starting from it to it's adjacent ones. It is not a case where you need to fill in every entry of DPmatrix, however you need to do somewhat equivalent work. 0(n^3) in worst case.