j*****k 发帖数: 1198 | 1 I did not notice the detail how each language implement string sort, just
use it. Now, if the alpha order is changed, a language's builtin sort
function does not work. How do we implement the sort function based on the
changed alpha order? |
c****p 发帖数: 6474 | 2 override the language's built in compare function.
【在 j*****k 的大作中提到】 : I did not notice the detail how each language implement string sort, just : use it. Now, if the alpha order is changed, a language's builtin sort : function does not work. How do we implement the sort function based on the : changed alpha order?
|
j*****k 发帖数: 1198 | 3 Generally how to implement str1 > str2? loop through each letter? |
c****p 发帖数: 6474 | 4 true.
The key point is comparison of each character. This function should be able
to be overriden/overloaded.
【在 j*****k 的大作中提到】 : Generally how to implement str1 > str2? loop through each letter?
|
j*****k 发帖数: 1198 | 5 No better algorithm besides comparing each letter? |