From 06c15846efcc07ffb857e0d6484f2da9e37355c7 Mon Sep 17 00:00:00 2001 From: jrosendo Date: Thu, 10 Nov 2022 14:23:22 +0000 Subject: [PATCH] docs(weareunique): fix typos - corrected main function --- subjects/weareunique/README.md | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/subjects/weareunique/README.md b/subjects/weareunique/README.md index deda07b85..2c23fe7a6 100644 --- a/subjects/weareunique/README.md +++ b/subjects/weareunique/README.md @@ -2,7 +2,8 @@ ### 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 both strings are empty return `-1`. @@ -23,22 +24,14 @@ package main import ( "fmt" + + "piscine" ) func main() { - arr := [][]string{ - {"foo", "boo"}, - {"", ""}, - {"abc", "def"}, - {"hello", "yoall"}, - {"everyone", ""}, - {"hello world", "fam"}, - {"pomme", "pomme"}, - {"", "exam"}, - } - for _, v := range arr { - fmt.Println(WeAreUnique(v[0], v[1])) - } + fmt.Println(piscine.WeAreUnique("foo", "boo")) + fmt.Println(piscine.WeAreUnique("", "")) + fmt.Println(piscine.WeAreUnique("abc", "def")) } ``` @@ -49,9 +42,4 @@ $ go run . 2 -1 6 -4 -6 -11 -0 -4 ```