smilevchy's blog

Life & Study & Chasing

Today's Shock

Need to sort some values which are Chinese.

Firstly, I am thinking to find some third-party libraries to finish this job. However, this may seems to be “heavy” for project.

So I turn to find some useful algorithms.

On Internet, I have found some solutions about how to do this. But some of them look like too bulk. So wandering and wandering, at last I found a sulution which looks the best currently. Some guy say we can use javascript’s function : localeCompare().

So, it is what I want to get. Currently it works well, but maybe it will have some drawbacks.

Anyhow, it is a work around now.

javascript, shock

« Leetcode_Insertion Sort List Leetcode_Word Break »