sorting - Is there always a way to alphanumerically name something, so that it is ordered between two given places in a list? -


What do I mean ... say that you have files named 4A, 4B and 4C. If I want to create a file, which is alphanumerically sorted, then between 4A and 4B is kept?

The key word in the question is "always" (this is what I believe) "file names Also for the set (wire) ". Not only two letters.

I answered "yes" before, because it seems that you can add a letter to make a string between any given two strings.

However, its answer is "no" in fact.

In this "alphanumeric" sequence, there is actually a "next element" for each element, and you can not put anything between an element and this is the next element.

There is no string between "4a" and "4a0"


supplement :

The question means that the alphabet for the filename is "alphanumeric", which means [0..9a..zA..Z], and the sorting should be alphanumeric (as commonly defined has gone) . In this case, the answer (as stated above) is "no".

However, as you sort the strings (filename), you can set a way to sort that way, guaranteeing that there is always a It is a string that can go between two others.

In addition, you control the alphabet (for example, you can choose the file names with only [0..9]), so it becomes quite easy.


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

javascript - amcharts makechart not working -

java - Algorithm negotiation fail SSH in Jenkins -