UPDATED: Second edge case added.
I am curious how this deals with words with vowel sequences being the same? For example, running the above script with the following words:Produces the following output:my @words = qw( xaxexix babebib xaxexi babebibb );
Since the vowel positions for xaxexix and babebib are the same, I would expect a secondary alpha-sort to occur here. Another potential issue is how the algorithm deals with words where the vowel sequences are in the same order but not in the same positions. For example:xaxexix babebib xaxexi babebibb
Produces the following output:my @words = qw( babebib baebbib );
Even though babebib is alphabetically before baebbib, the e occurs one position sooner in baebbib, which should put it before babebib.babebib baebbib
Maybe I am reading too much into the initial question. Having done Computer Programming Contests a number of times before, these are the kinds of things that the judges are looking for to see if the teams caught all the possibilities.
Zucan
In reply to Re^2: Sorting Strings By Vowel Sequence
by Zucan
in thread Sorting Strings By Vowel Sequence
by NewToPerl777
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |