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.
Good one with the prototype. but if the object will be created with the class, the prototype is created automatically.
You are right. I know you are not supposed to 'invent the wheel again' but this exercise is great to learn algorithmic thinking and complex concepts like recursion.
I think it's better to use this space to do what you wanted to do at first. This is a great exercise to understand and practice algorithms and recursion
let totalGoals = 58; is enough 🤣😂
yeah that's the way she goes sometimes. i do these challenges just to nail into my brain the kinds of built in functions you can use, because I hate doing what you did and realizing I spent so much time for no reason. A good rule of thumb is that for 7/8 kyu problems, you generally don't have to reinvent any wheels.
dont need use return if function wrote in 1 line
You are very correct!
The current implmentation did not account for when number is equal 0
no need for zero(initialValue)
I think it would have been better if you had tried to get to the algorithm properly. You would have learned more. Using the solution is good when you already know how to get to the solution.
A little disappointing to see that there is already a solution to the problem. Surely that function uses the same algorithms that we are supposed to write. But using this solution takes away all the fun from the problem. It's literally like writing a "hello world." The only value of the kata itself is having discovered that this function exists, I guess.
Good
This comment is hidden because it contains spoiler information about the solution
This solution may not be the most intuitive for beginners, but it is the best you can do.
For me , this is not best practise , because you will calculate the min and max while the input array is already sorted , view my solution.
Yes, but my point was that this isn't best practice.. just clever.
Loading more items...