How many integers within 100000 has two consecutive '1's
Interview Answers
Anonymous
Nov 19, 2020
Just saw consecutive 1s, so that term is 4 instead of 10. So 4*10^3
5
Anonymous
Feb 10, 2021
wrong answer
4
Anonymous
Nov 19, 2020
Exclude 100000. We have 5 digits going from 0 to 9 and we want to have the digits 11 in our number. Shuffling the 11 around gives us 5!/3!2! = 10 from that term, while all the others are 10^3. So, 10^4 in total