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, it's a good approach, I think. I came up with basically the same solution.
One critique: You don't need to collect the
Map
iterator into aVec
inside theflat_map()
closure. ThatVec
just gets immediately turned back into an iterator via its.into_iter()
method, so you might as well cut out the middle man and return theMap
instead.spoiler flag, plz...
It is.
thanks, this really explains why the test fails but it's strange that this detail is not written anywhere.
Because the number of times the element appears in each array has to be the same. If you square the elements in
a
, you get[4, 4, 9]
,4
appears ina
twice, but only once inb
; and9
appears ina
only once, but it appears inb
twice.There is no bug. I don't even understand what you are talking about (what points to True??).
Do not raise issue so lightly, please refer to the documentation: https://docs.codewars.com/training/troubleshooting/
Why does test 10 expect False if the inputs [2, 2, 3] [4, 9, 9] exactly point to True? Or am I dumb or is this a bug
I am little confused about this sample test case: "())()))))()()("
Could someone please explain to me why the answer is 4?
well... you are right!
i forgot to try such a simple optimization as avoiding consecutive
div_assign
You're right!
Nothing wrong with this, but you could just remove the
return
keyword and the;
symbol.I think you weren't supposed to change the 'function signature'.
really good... NOT!!
Loading more items...