A number is called 'desirable' if all the digits are strictly ascending eg: 159 as 1<5<9. You know that your rival has a strictly numeric password that is 'desirable'. Your close ally has given you the number of digits (N) in your rival's password. WAP that takes in 'N' as input and prints out all possible 'desirable' numbers that can be formed with N digits.
I have been thinking of the solution for over a day now but no luck. Just helping out with the pseudo-code will be great.