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.
Use functional programing
Storing the numbers in an array and having the second loop there is redundant.
Thank you!
Thank you for the explanations. It helped me. This should not have been an 8 kyu challenge.
As someone who is also new at Java, how you've done it is exactly what I was attempting to do, but didn't come up with what you've done using the output string thingie. Thanks for the answer!!
As someone new to Java, both explanations are definitely very helpful explanations, and I will certainly be keeping these in mind. Thank you to the both of you :)
Definitely a solid solution for when your interviewer wants a manual implementation. Two notes though:
I like to comment each line to make sure that if someone else had to skip the exercise because it was too hard, then they can at least understand one of the ways to do it that is pretty easy to comprehend. :P
Lol I thought I was pretty good a coding b4, but then I saw everyone else's solutions xP
I went for understandability cuz I'm pretty dumb xD