Golang
字符串排序(3)
http://www.nowcoder.com/questionTerminal/0588d343472e42a9af1eda9a69912df3
package main import ( "bufio" "fmt" "os" "sort" "strings" ) func main() { sc := bufio.NewScanner(os.Stdin) for sc.Scan() { strs:=strings.Split(sc.Text(),",") sort.Strings(strs) fmt.Println(strings.Join(strs,",")) } } /*input a,c,bb f,dddd nowcoder */