Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
yes, I am beginner and sorry for my mistake
but ... when I print input data before I start doing anything
func SquareOrSquareRoot(arr []int) []int{
fmt.Println(arr)
...
then I get on terminal [88 48 60 82]
and in log:
Expected
<[]int | len:4, cap:4>: [7744, 2304, 3600, 6724]
to equal
<[]int | len:4, cap:4>: [88, 48, 60, 82]
so expected ouput is equal to input array?
ok ... so to test this case I changed my function to
func SquareOrSquareRoot(arr []int) []int{
fmt.Println("input data", arr)
return arr
}
and in log:
input data [88 48 60 82]
Expected
<[]int | len:4, cap:4>: [88, 48, 60, 82]
to equal
<[]int | len:4, cap:4>: [7744, 2304, 3600, 6724]
so 2 different expected outputs for same input?
EDIT: ok, my mistake ... I dont catch "The input array should not be modified!"
that was my mistake ... thanks for patience
This comment is hidden because it contains spoiler information about the solution
this is still valid issue ... Please can anyone fix it?
thanks for raising this, I couldn't understand what am I missing!