Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Find remaining serial numbers left in Alphanumeric range

Former Member
0 Kudos

Can anyone help me with this.

Say there are two alphanumeric sequences 1234A1B And 1234B1B . The no. of series between them are to be found.

Say between 1234A1B and 1234B1B there are 26 numbers like 1234A1C,1234A1D,…1234A1Z,123B1B..In this case the output would be 26.The number of series in between are to be calculated.

The length of both the sequences is less than 18 and contain alphabets and numbers in them in random fashion e.g 1234A3D -1234C7E(The number series existing between these two numbers should be counted).

Thanks in Advance

Rijish

2 REPLIES 2

Former Member
0 Kudos

Rijish,

First, a question. In your example, the "from" and the "to" are both 7 characters, and you are considering only 7-character values between them. But is not 1234A1BA (8 characters) alphabetically between 1234A1B and 1234A1B? Or are you regarding the alphanumerics somehow as numbers?

Second, another question. Have you mistyped your example? You seem to imply that 123B1B comes after 1234A1Z. Do you mean that 1234B1B comes right after 1234A1Z? That would be confusing too.

Third, another question. The characters allowed are A-Z and 0-9 only (36 in all)? And their order (lowest first) is 0123..89ABC...XYZ?

Fourth, a warning. The number of such serial numbers possible is rather large. It is, I think, a 27-figure number. So you need to consider the data type for holding the answer to your calculation.

I may be able to help more if you can clarify your meaning.

John

Former Member
0 Kudos

Rijish,

One quick question ...as you said that between 1234A1B and 1234B1B there exists 26 numbers but it contradicts to the other statement where you say that numbers should also be considered.

In that case would not the above series follow the below sequence.

1234A1B

1234A1C

....

1234A1Z

1234A2A

...

1234A9Z

1234B1A

1234B1B

Please let us know about it ???