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.
 
 
 
 
 
 
zainabdnaya ebf4c17716 corrected 2 years ago
..
README.md corrected 2 years ago

README.md

Weareunique

Instructions

Write a function that takes two strings and returns the amount of characters that are not included in both without doubles.

  • If there is no unique charachters return 0.
  • If both strings are empty or one of them return -1.

Expected function


func Weareunique(str1 , str2 string) int {

}

Usage

Here is a possible program to test your function :

package main

import (
	"fmt"
)

func main() {

	arr := [][]string{
		{"foo", "boo"},
		{"",""},
		{"abc", "def"},
		{"hello", "yoall"},
		{"everyone", ""},
		{"hello world", "fam"},
		{"pomme","pomme"}
	}
	for _, v := range arr {
		fmt.Println(Weareunique(v[0], v[1]))
	}
}

And its output :

$ go run .
2
-1
6
4
-1
11
0
$