please fix the algorithm you are using (in C). i've had to retest it 7 times till it went correctly. i was manually checking every bad test i've gotten and every time my solution was correct
the more i understand python and enter the solution page,
the more i am amazed thinking how wonderful human brains are!!!
and become curious why people feels threatened by A.I.?!
@modernLifeRock - Hi; at first I thought you were making a silly mistake but your solution is really interesting so I ended up debugging on my IDE.
I think your mistake is due to you introducing another argument to the function, and it seems that the tests then keep the data_structure_that_you_have_used between tests. I'm not 100% sure, because the Python tests themselves are a bit out-of-date so I don't completely understand how they are being run.
Long story short - try this to see if it works:
replace cache_sq= XYZ (where XYZ is the data structure you are using) in your function's arguments with cache_sq = None
then, inside your function as the first base case, put if cache_sq is None: cache_sq = XYZ where XYZ is the (empty) data structure you are using
I'm using XYZ to avoid having to spoiler my comment - otherwise you won't be able to see it until you have solved the kata.
try BFS (search algorithm) with it I have no issues with tests
please fix the algorithm you are using (in C). i've had to retest it 7 times till it went correctly. i was manually checking every bad test i've gotten and every time my solution was correct
Very nice mathy kata, congratulations.
python (probably others too): one of the following should be part of the final fixed tests:
Otherwise some incomplete solution can pass.
Done by OP
Approved
Pretty challenging kata, keep it up.
A portion of
arr
in random tests should be tested instead of full array to avoid solutions like thispython new test framework is required. updated in this fork
Approved
python new test framework is required. updated in this fork
the more i understand python and enter the solution page,
the more i am amazed thinking how wonderful human brains are!!!
and become curious why people feels threatened by A.I.?!
Nice kata!
b7 -> d6 -> c8, 2 moves. Not a kata issue.
(C++ solution)
Randomized_Fixed_Tests:
b7 -> c8
Expected: equal to 2
Actual: 4
How is it possible?
@modernLifeRock - Hi; at first I thought you were making a silly mistake but your solution is really interesting so I ended up debugging on my IDE.
I think your mistake is due to you introducing another argument to the function, and it seems that the tests then keep the
data_structure_that_you_have_used
between tests. I'm not 100% sure, because the Python tests themselves are a bit out-of-date so I don't completely understand how they are being run.Long story short - try this to see if it works:
replace
cache_sq= XYZ
(where XYZ is the data structure you are using) in your function's arguments withcache_sq = None
then, inside your function as the first base case, put
if cache_sq is None: cache_sq = XYZ
where XYZ is the (empty) data structure you are usingI'm using XYZ to avoid having to spoiler my comment - otherwise you won't be able to see it until you have solved the kata.
Loading more items...