由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
JobHunting版 - how to sort strings if alpha order is changed
相关主题
湾区公司店面贡献几个on-site题,不说谁家的了
Riverbed 面经求问一道G家的题
c/c++ qsort/sort 来 sort array of string菜鸟请教电面写code,能用哪些function,在线等
求助一面试题请教一道careercup上面的概率题
F家电面:group AnagramsInsertionSort和ShellSort
Bloomerg 还没放弃我。 电话二面经过。linkedin今天的电面题
google phone interviewGoogle上收索leetcode的题,90%都是国人的blog链接
linked list排序的算法除了bubble请教suffix array的问题
j*****k
2017-01-11 18:19:38
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
2017-01-11 18:22:15
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
2017-01-11 18:33:29
3
Generally how to implement str1 > str2? loop through each letter?
c****p
2017-01-11 18:37:59
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
2017-01-11 18:46:20
5
No better algorithm besides comparing each letter?