Suppose I have a 6 digit lock that accepts 0-9 as inputs for the 6 slots.
And I was told that the numbers in order from left to right are never less than the number to their left. so 0,0,0,0,0,0 would be valid but 0,1,2,3,2,9 would not.
I tried to brute force it by looking for a pattern in increasing the number of slots on the lock. If it allowed a single digit, 10 passwords. if it allowed 2 digits, 55 passwords (I think)
10 that start with 0,
9 that start with 1,
8 that start with 2,
ect.
10+9+8+...+3+2+1=55
3 gets a lot bigger, 100 that start with 0, then 9 that start with "1,1" 8 that start with "1,2" but from there I get lost with my counting and its going to be a huge nightmare when I get up to 6.
Please tell me there is a better way! Thank you.