Toppr Interview QuestionSDE1s
- 0of 0 votes
The stepping number:
A number is called as a stepping number if the adjacent digits are having a difference of 1. For eg. 123,121,9878 are all stepping numbers. While 890, 098,012 are not i.e. a number should not start with 0.
Also all 1-digit numbers are stepping numbers.
Find out how many stepping numbers exist with number of digits =N (input given)
Interview Type: Phone Interview