c++ Programming Glossary: deficit
Interview Question: Optimal Solution to the problem of finding Heavy integers http://stackoverflow.com/questions/7136590/interview-question-optimal-solution-to-the-problem-of-finding-heavy-integers number is 10000 sumDigits 1 and avg of digits 0.2 . The deficit in sum is 7 5 1 1 35 so we can increment 10000 by 8999 i.e we.. return digSum Computes the increment required to meet the deficit size_t compute_increment size_t n size_t deficit size_t inc.. meet the deficit size_t compute_increment size_t n size_t deficit size_t inc 0 size_t d 1 if verbose cout n n deficit deficit..
|