MCPcopy Create free account
hub / github.com/austingebauer/go-leetcode / sortString

Function sortString

group_anagrams_49/solution.go:65–69  ·  view source on GitHub ↗
(s string)

Source from the content-addressed store, hash-verified

63}
64
65func sortString(s string) string {
66 charArr := strings.Split(s, "")
67 sort.Strings(charArr)
68 return strings.Join(charArr, "")
69}
70
71// Note: Wrong approach. Good lessons though!
72func groupAnagrams0(strs []string) [][]string {

Callers 1

groupAnagrams1Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected