A number is an ein number (short for even increasing number) if the even digits in the
Question:
A number is an ein number (short for even increasing number) if the even digits in the number are strictly increasing from left to right. The odd digits in the number can be in any order.
For example, 2478 is an ein number because the even digits 248 are in increasing order. However, 14236 is not an ein number, since the even digits 426 are not in increasing order. Note that 137 is also an ein number because there are no even digits, so we will say that the even digits are implicitly in order. Also note that 22 is not an ein number because repeating even digits are not increasing.
With this in mind, write the function nthEinNumber(n) which takes a non-negative int n and returns the nth ein number.
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill