Ad
  • Custom User Avatar

    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.

  • Custom User Avatar

    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

  • Custom User Avatar

    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. :-)

  • Custom User Avatar
  • Custom User Avatar

    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!

  • Custom User Avatar

    The difficulty is not the same in all languages...

  • Custom User Avatar

    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. :)