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.
You can take a look at my solution if you're looking to view one that doesn't use nested loops. Though my solution is done in JavaScript, it should translate to Python code without difficulty.
Each face of the tetrahedron is a triangle with the side of the N balls. I have a picture, but I can't add it to the condition of the problem
I guess the author should add a little more detail in the problem statement. I didn't fully understand what was required, especially the "edge consists of N balls" part. Or maybe I am bad at maths. :-)
thanks
I agree. But then I did this for Python, and saw all reference answers for Python as well.
I was more worried towards the complexity of the solution.
With respect, I guess the best answers are chosen on the amount of code written (smaller the better), even if they compromise on performance. Since I am new here, I will find out how much of this is true!
The difficulty is not the same in all languages...
This is a great Kata.
I took so much time to finish this, trying to avoid nested loops.
But then the top answers are all nested loops! This looks weird.
Do we have any performance metrics to pass too?
Thanks anyway. :)