Monday, 15 February 2010

sorting - Implementing sample code for unicode collation algorithm -


I have the following requirements in my project: On the basis of the letters given by client, I need to sort the strings.

For example:

Orders provided by the user: D, A, A, D, Z, p, p, z

So if we have some code like AAP, AAP, PPZ, PPPs.

Output to AAP, AAP, PPJ, PPZ as a & gt; P & gt; P should be according to the initial order by the user.

Now I can suggest data structures to use for some of the following things for better performance.

1. ) Mapping the ascii values ​​of the characters in the user's order order - I am thinking of using the map. But it may be logn for access. I can not use ashamp because I code c ++

2.) Which sorting technique can be used to compare the sort after the sort key is created. Can some things be used like radix sort?

Please share your thoughts ..

However, the need for lowing is not necessary for my project, I just want to know

for Unicode algorithm How exactly are the match elements drawn from the Unicode values ​​mentioned in the above link or Eski values?

  Character Coalition Element Name 0300 "` "[.0000.0021.0002] GRAVE ACCENT 0061" A "[.06D 9.0020.0002] Latin little letter A0062" B "[.06EE. 0020.0002] Latin small letter B 0063 "C" [.0706.0020.0002] Latin little letter C 0043 "C" [.0706.0020.0008] Latin Capital letter C 0064 "D" [.0712.0020.0002] Latin little letters D  


No comments:

Post a Comment