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.
instead of map(val => Number(val)) you can just write map(Number)
"one distinct country" in description is Ukraine
if array were huge you would do it three times too ?
You have to think, but it all depends on the result you want to get. Everything is fine so check all the values and check them
What would you do if there were (a, b, c, d, e, f, g, h....) ?
I think if one of calculated "min" is 0 it would be better to stop iteration because "arr" can be huge
This comment is hidden because it contains spoiler information about the solution
I found it. Thanx
Not sure if linking comments works here but there is a reply to MrSoto from a few years back where I expand the code with line by line explanation. Can expand on that if it's unclear, although it's been a while :-)
Would you mind to explain what your code is doing ?
you should read about graph theory
you must return NEW instance of Vector but you change input
Why this kata is tagged as "OBJECT-ORIENTED PROGRAMMING" ?
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Loading more items...