Your code fails for cases like [[0, 1], [0, 0]] because of your 2nd for loop finding 1 at index 1 of [0, 1] (inner). However, field[1] does not have 1 in it, hence the error!
Ended up copying and pasting all the functions from the "basics-binary-scott" test solution in the Codewars lambda calculus compiler repository, so I had all the basics functions. I don't know how we are expected to come up with the collatz length solution without rewriting the entire system from scrach with all the shift and binary operations functions. Smh
Do we have to define all needed functions with the lambda calculus version? I'm used to Church numerals and would be fine with those, but with "ScottBinary" being configured as the encoding, I'm not sure about where to start at all.
Enabled in this fork
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Your code fails for cases like
[[0, 1], [0, 0]]
because of your 2ndfor
loop finding1
at index 1 of[0, 1]
(inner). However,field[1]
does not have1
in it, hence the error!This one is actually having lowest complexity compared to all better rated solutions!
Ended up copying and pasting all the functions from the "basics-binary-scott" test solution in the Codewars lambda calculus compiler repository, so I had all the basics functions. I don't know how we are expected to come up with the collatz length solution without rewriting the entire system from scrach with all the shift and binary operations functions. Smh
Do we have to define all needed functions with the lambda calculus version? I'm used to Church numerals and would be fine with those, but with "ScottBinary" being configured as the encoding, I'm not sure about where to start at all.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
All test are passing except n = 73567465519280238573;
Seems like a test issue, becasue all other TC are passing.
Approved!
Approved!
Approved!
After eight years, I've taken the liberty of adding the simple word "positive" to the description.
Closing.
Loading more items...