Ad
  • Custom User Avatar

    Wow, did not expect someone would do it this way :)

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    It's getting increasingly harder to find katas that doesn't take lots of effort to complete though :) So mostly I've been grinding beta katas.

  • Custom User Avatar

    The kata wants you to find the smallest group in which it's possible to divide the students.

    While [7,6,5,4,3,2,1,0] is a solution, obviously it's bigger than [7,6,5,4,3,2,1], so I think it's pretty obvious why we don't choose the former :)

  • Custom User Avatar

    Yes, @Voile. I admit the algorithm is very slow. I used a integer partition generator. But I promise a good challenge for the next part. Thanks for solving the kata. BTW, you're unstoppable with an average of 300 points per day. :)

  • Custom User Avatar

    Do you think so? Your result [7, 6, 5, 4, 3, 2, 1, 0] is the wrong result. The exercise says that you have to find the arrange of minimum amount of groups. Is it practical to form an empty group of students?
    Sorry to say but the correct result is [7, 6, 5, 4, 3, 2, 1].
    Te aconsejo que leas detenidamente las instrucciones. Evidentemente que estás apuntando para otro lado porque tu algoritmo, está basado en una formula válida siempre y cuando tu menor valor no sea cero. El conjunto vacío dejalo para la abstracción matemática. Aca estamos frente a un problema práctico y armar un conjunto con 0 estudiantes no tiene sentido. Usemos el sentido común. Pero inclusive si vamos a teoría numérica, en el tema de partición de un número entero, las particiones válidas son aquellas cuyos términos son todos distintos de 0. Te aconsejaría que estudies este artículo muy útil: https://en.wikipedia.org/wiki/Partition_(number_theory)
    Después que lo domines bien haceme todas las críticas pertinentes.
    Finally, you should have seen that 26 people passed the tests without problems, only in Javascript. :P

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution