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.
Then what does "with the same multiplicities" mean? Isn't "multiplicities" the amount? I'm not native English speaker, so excuse me if I misunderstood it.
No. Instructions say "Same" means that the elements in b are the same elements in a, squared. Thus, you could say if b = [ 16, 16, 16, 16, 16, 16, 16] and a = [4], this qualifies as "same" since the elements in b are the same as in a, but squared. There is no 1:1 ratio happening and if there is, its extremely poorly worded. Even looking at the first example of valid arrays you see multiples of squares, thus 1:1 cannot be true. And if it was, my solution would fail.
...whether the two arrays have the "same" elements, with the same multiplicities.
the same multiplicities - doesn't it mean the same amount for each num and its square?
The question doesnt ask for 1:1 though. I am coding mine without doing 1:1 and it works fine (except for an issue with null/empty which i cant figure out).
Thank you so much!
I missed that instruction. I coded the function by matching at least one value and not "exactly one" value as 1:1.
Thanks again!
This comment is hidden because it contains spoiler information about the solution
I already spent too much time trying to figure this one out so I am reaching to another pair of eyes:
Basic test # 9 is passing these 2 arrays:
[ 2, 2, 3 ]
[ 4, 9, 9 ]
My code returns true but the test fails because:
Expected: false, instead got: true
Can someone help?