Viridien Interview Question

1-10000, integers with "7".

Interview Answers

Anonymous

Jun 10, 2015

It can be 10000 - 9*9*9*9 = 3439.

6

Anonymous

Nov 1, 2014

This question is equivalent to how many at most four digit numbers can you make with at least one 7 included? 1. one 7 included: C(4,1)*9*9*9 2. two 7 included: C(4,2)*9*9 3. three 7 included: C(4,3)*9 4. four 7 included: C(4,4) 4*9^3+6*9^2+4*9+1= 3439

6

Anonymous

Apr 15, 2016

There are 9999 numbers from 1 to 10000, so it is 3439.