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.
Hi,
- mathur1987 October 21, 2014Our question here was to generate all the numbers whose sum of digits when added to that number results to input number. So to do this we can do following
a) Take the input number
b) find total digits in that number (i.e if input number is 256 total of digit is 3).
c) Subtract 9 for each digit in the number (i.e if number is 256 substract 3*9 = 27 from 256. so new number will be 256-27= 229).
d) now check all numbers from new number (229) to input number (256) ie if sum of digits added to number gives input number.
e) if any number found print that number (245 which is between 229 & 256, when added to 2+4+5 gives 256)
f) if any number is not found print error message (if input number is 108, no combination is found)