Browse Source

docs(weareunique): fix typos

- corrected main function
pull/1622/head
jrosendo 2 years ago committed by José Rosendo
parent
commit
06c15846ef
  1. 26
      subjects/weareunique/README.md

26
subjects/weareunique/README.md

@ -2,7 +2,8 @@
### Instructions ### Instructions
Write a function that takes two strings and returns the number of characters that are not included in both, without doubles. Write a function that takes two `strings`'s and returns the number of characters that are not included in both, without repeating characters.
- If there is no unique characters return `0`. - If there is no unique characters return `0`.
- If both strings are empty return `-1`. - If both strings are empty return `-1`.
@ -23,22 +24,14 @@ package main
import ( import (
"fmt" "fmt"
"piscine"
) )
func main() { func main() {
arr := [][]string{ fmt.Println(piscine.WeAreUnique("foo", "boo"))
{"foo", "boo"}, fmt.Println(piscine.WeAreUnique("", ""))
{"", ""}, fmt.Println(piscine.WeAreUnique("abc", "def"))
{"abc", "def"},
{"hello", "yoall"},
{"everyone", ""},
{"hello world", "fam"},
{"pomme", "pomme"},
{"", "exam"},
}
for _, v := range arr {
fmt.Println(WeAreUnique(v[0], v[1]))
}
} }
``` ```
@ -49,9 +42,4 @@ $ go run .
2 2
-1 -1
6 6
4
6
11
0
4
``` ```

Loading…
Cancel
Save