Documentation
¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HighPrior ¶
func HighPrior(strings []string)
Example ¶
data := []string{
"ABABC",
"ABAAA",
"BBAAA",
"CA",
"HUAWEI",
"AA",
"张豪",
"张三",
"李四",
"王麻子",
"李二狗",
}
HighPrior(data)
fmt.Println(data)
Output: [AA ABAAA ABABC BBAAA CA HUAWEI 张三 张豪 李二狗 李四 王麻子]
func HighPriorAlp ¶
HighPriorAlp sort strings with a user-defined alphabet
func Quick3 ¶
func Quick3(strings []string)
Quick3 seems to be a faster string sorting algorithm than the sort.Strings method in the standard library
Example ¶
data := []string{
"ABABC",
"ABAAA",
"BBAAA",
"CA",
"HUAWEI",
"AA",
"张豪",
"张三",
"李四",
"王麻子",
"李二狗",
}
Quick3(data)
fmt.Println(data)
Output: [AA ABAAA ABABC BBAAA CA HUAWEI 张三 张豪 李二狗 李四 王麻子]
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.