The statement of the original kumite I forked said it's case insensitive so I followed it, though I agree with you that palindromes should have the same capitalization.
I would classify different character capitalization as on either end to nullify being a palindrome, but I guess that depends how strict you want to be with it.
Heh, I don't think I can get it any smaller than that in JS!
I understand, but it would have been better to add a comment rather that creating a fork.
I removed list(, which makes it shorter.
Your fork is almost identical to my fork. Please don't add a fork if it does not add anything essential to the Kumite.
Your fork is almost identical to my fork. Please don't add a fork if you are adding nothing essential to the Kumite.
yeah, const is always better...
It doesn't matter what this refers to...
this wasn't serious, you guys know that right?
You are correct, that error was caused by my modifications.
After some more bug solving on my algorithm we have 2 algorithms that are different and have the same outcome.
Just in one case that they are different,
my says false yours says true
members [ '56', '78' ]
rules [ [ '56', '78' ], [ '78', '56' ] ]
which brings me to the question you have brought.
You think it is better to expect that the input is clean? If we allow that it is kind of an undefined behaviour where for my algorithm result is A and yours is B. And both of them might be correct.
this is the link of the random tests => https://pastebin.com/WhBeS2a0
Hope you get it this time.
(disregard the previous reply if it appears on your end, it has disappeared for me)
The code in my original kumite fork returns true for the test you mention. It must be something to do with the changes made to resolve the repeating names thing.
Regarding turning this into a kata, my thought is that inputs should be guaranteed valid (eg no item in the rules refers to a nonexistent family, no repeating members in the list, no member wants to sit next to themself, etc)