maybe have some variation on normal rules. like multiply over divison or only allow a certain level of nesting otherwise an error. or require scientic notation if the numbers are big / small enough...
Looking at the test cases are you using an operator precedence? I don't see how
[1, '-', 1, '*', [1, '+', 1]]
would end up as -1 unless your using * as higher then -. I don't see this
stated in the description.
i ran my pure python solution 100 times with random input to simulate the acceptance test on my computer and it took 2 minutes. i read up on numpy and got it to
work with it and the same test took just 1 sec. THe same speed as a c version of the challenge.
maybe have some variation on normal rules. like multiply over divison or only allow a certain level of nesting otherwise an error. or require scientic notation if the numbers are big / small enough...
Looking at the test cases are you using an operator precedence? I don't see how
[1, '-', 1, '*', [1, '+', 1]]
would end up as -1 unless your using * as higher then -. I don't see this
stated in the description.
java 8 in action.
This one is giving me trouble in c. I'm passing all the tests but getting an access violation.
nice kata, i've been looking for something like this that explains where to get the args and put the return for NASM challenges.
you need a return at the end of your function right before the recursive call to nbYear
like
return nbYear(total, percent, ...)
the first works because the function is returning Yes or No. the does not because it prints instead of returns.
Often print()/console.log() the input works. You may need to click (expand) on the arrow in test case on the output to see this.
this should be rank higher maybe a six. clever problem.
Looks like the size of the returned array.
This comment is hidden because it contains spoiler information about the solution
i ran my pure python solution 100 times with random input to simulate the acceptance test on my computer and it took 2 minutes. i read up on numpy and got it to
work with it and the same test took just 1 sec. THe same speed as a c version of the challenge.