This is true! There was indeed still an issue. I wrote some additional tests to prove this case and re-worked the solution to meet these tests:
The previous tests confirmed that the row
when shifted right, would combine correctly to
But the solution still combined the row
This has been fixed. Please re-try your solution to confirm, and thanks for the feedback!
The previous bug with shifting up in random tests is fixed, but there's a new one. Here's a random board shifted down. Notice the test solution combined the first and third column twice, rather than once. I've seen the bug in all directions, but only on the random tests (the static tests for combining more than once give the correct answers).
4| 8| 4|##
Thank you for your report! You were correct, there was an issue with the test case that has now been resolved. Thank you for your example. It was very helpful for debugging purposes.
There is something really weird about how you're doing the random tests. Why are you calling the user-provided code in both the "expected" AND the "test" case? Particularly when you're calling it with empty arrays, which was not something in the original design spec. I would expect you would write your own code to calculate the "expected" outcome and only call the user provided function for the "test" outcome.
Here's some sample output. Notice both the return values are prefixed with my initials, which I added to the return values when I was trying to troubleshoot why sometimes I'd get an infinite recursion case.
It should work for random inputs too - Expected: ''PMV: Recursion depth too high'', instead got: ''PMV: nobody won this time''
What appears to be happening is that you have a recursive solution, but rather than recursively call your own implementation after eliminating candidates, in at least one code path you call the user's implementation. It happens when all candidates have been eliminated (you pass in [ , , ] etc. )
If you saw the announcement yesterday, they redid how much honor doing katas gives, sometimes by a very large amount in the case of the high ranked katas: https://medium.com/@Codewars/honor-and-leaderboard-updates-a1491f2cb2e2 . The changes are retroactive but the system seems to still be doing those updates as we speak.
This comment is hidden because it contains spoiler information about the solution
That's a very elegant solution - thank you!
Hint: Simplify the equation first, don't try to calculate the two terms separately.
Yes, it is meant to be (7 ^ (6 ^ 21)).
No, because (7 ^ (6 ^ 21)) mod 10 is not equal to (7 ^ ((6 ^ 21) mod 10)) mod 10.
You should definitely add tests for 90.01, 180.5, etc. which a lot of the solutions here would fail on. And then test for 90.00, -180.0, etc. as well.