(a, b []string)
| 14 | } |
| 15 | |
| 16 | func isSameArray(a, b []string) bool { |
| 17 | if len(a) != len(b) { |
| 18 | return false |
| 19 | } |
| 20 | |
| 21 | sortedA := make([]string, len(a)) |
| 22 | copy(sortedA, a) |
| 23 | sort.Strings(sortedA) |
| 24 | |
| 25 | sortedB := make([]string, len(b)) |
| 26 | copy(sortedB, b) |
| 27 | sort.Strings(sortedB) |
| 28 | |
| 29 | for i := range sortedA { |
| 30 | if sortedA[i] != sortedB[i] { |
| 31 | return false |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | return true |
| 36 | } |
no outgoing calls
no test coverage detected