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.
Core logic is to compare the left most and right most digit in each iteration. Determine the value to be added to make the right most digit same as left most digit. Add and iterate.
Time complexity: O(n)
Space complexity: O(nXn), in worst case, we might end up creating n arrays of size n each.
Since Java is used to code and it has automatic garbage collection, there might not be much problem of memory leaks. If same logic is implement in C++ or C language, the possibilities of memory leaks are very high. So proper care is to be taken to avoid them when arrays are being created using new/delete or malloc/free.
Limitation: if a palindrome is given, it displays the same.
}
- sudheendra.moda November 25, 2013Please feel free to comment for any bugs, mistakes etc.