You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
756 B

## Weareunique
### Instructions
2 years ago
Write a function that takes two strings and returns the number of characters that are not included in both, without doubles.
2 years ago
- If there is no unique charachters return 0.
2 years ago
- If both strings are empty return -1.
### Expected function
```go
func Weareunique(str1 , str2 string) int {
}
```
### Usage
Here is a possible program to test your function :
```go
2 years ago
package main
import (
"fmt"
)
func main() {
arr := [][]string{
{"foo", "boo"},
2 years ago
{"",""},
{"abc", "def"},
{"hello", "yoall"},
{"everyone", ""},
{"hello world", "fam"},
2 years ago
{"pomme","pomme"},
2 years ago
{"", "exam"},
}
2 years ago
for _, v := range arr {
fmt.Println(Weareunique(v[0], v[1]))
}
}
```
And its output :
```console
$ go run .
2 years ago
2
2 years ago
-1
6
4
2 years ago
6
2 years ago
11
2 years ago
0
2 years ago
4
2 years ago
```