Would it not be good to include negative and bigger integers as well?
This wouldn't change the intended approach in any way, only some concrete implementations would be affected. During the final iteration of redesigning the tests a couple years ago I stopped on the [1; 50] range, and IMO it'd be better to not change the specs again for such insignificant reason. I removed the note about the input range earlier, but now it's back as a part of the specifications.
It seems like all the inputs have non-negative integers within the 0..2³² range. Yet the kata just speaks of integers. Would it not be good to include negative and bigger integers as well? I see some JavaScript solutions work on the assumption that there are no such integers in the input.
This would fail if the input integers are out outside of the array-index range (0..2^31), as such object keys would be iterated in insertion order, not numerical order.
Traceback (most recent call last):
File "main.py", line 25, in <module>
testing(cube)
File "main.py", line 10, in testing
sequence = make_white_cross_on_B(initial_state)
NameError: name 'make_white_cross_on_B' is not defined
Did the reader imply they did not read the whole description? shock😲
Quote:
Although the task relates to genealogy, the rules of this kata are not claimed to be realistic. Several simplifications and rules apply, which may not hold in real life:
[...]
Once a person has an assigned gender, it cannot be changed.
No gender conclusions should be made from personal names: "Bob" could well be a woman and "Susan" a man.
People cannot have more than one mother and one father.
[...]
The author is quite aware (and supportive) of families with two dads, two moms, or other constellations. The quite restrictive rules are only there to make it into an interesting coding challenge.
This wouldn't change the intended approach in any way, only some concrete implementations would be affected. During the final iteration of redesigning the tests a couple years ago I stopped on the
[1; 50]
range, and IMO it'd be better to not change the specs again for such insignificant reason. I removed the note about the input range earlier, but now it's back as a part of the specifications.for 6 kyu...? na, 'don't think so...
It seems like all the inputs have non-negative integers within the 0..2³² range. Yet the kata just speaks of integers. Would it not be good to include negative and bigger integers as well? I see some JavaScript solutions work on the assumption that there are no such integers in the input.
This would fail if the input integers are out outside of the array-index range (0..2^31), as such object keys would be iterated in insertion order, not numerical order.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Tests don't work:
Thank you for your nice comment. I appreciate it!
This Kata xD
It sounds easy at the beginning, but then number of exceptions to be taken into consideration is damn high.
Good job on preparing such Kata, there are not many problems (on Codewars) like this one.
Glad to hear you like it. ;-)
I never saw something like this before. Looks really impressive!
i am having same problem
XD
Did the reader imply they did not read the whole description? shock😲
Quote:
The author is quite aware (and supportive) of families with two dads, two moms, or other constellations. The quite restrictive rules are only there to make it into an interesting coding challenge.
is kata author implying that a family cannot have two dads / two moms? shock 😲
Loading more items...