Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
It will not work when B is also negative. But for current dataset it's a correct solution
Nice job, later you check the 7x7 exercise https://www.codewars.com/kata/5917a2205ffc30ec3a0000a8/
There is so much more to optimize! :)
Does anybody know what processors the code is running on here? I have i7-9750H and the code is running 4.014s locally, but when I test it here it gets time out of 12s.
Update 0: Now I have 0.076s in the local benchmark but still 12s time out here :\
Update 1: Okay, I think I've got that 12s is a total time for every test case executed, not just one. Also that's crazy that I've managed to optimize the solution on Go to get 0.025s on example test case but it's still not enough :D
Update 2: This is not an easy walk to the laconic solution, it's more about searching of every possible piece to optimize. So if you want to solve something neat, don't start solving this one, save yuor nerves :)
A general tip for dynamic programming:
Do you actually need all the rows at any time when you do the state transition from one row to the next?
Usually you don't, and so you don't need quadratic space ;-)
This comment is hidden because it contains spoiler information about the solution
I have an algorithm, array (20000 x 20000) is required to be created for buffering calculations.
No.
Also, that's not an issue. If you don't get the required algorithm, try harder and don't post an issue about something on your side.
Hello! I'm new here, maybe don't know something, but there is no possibility to create 20000 x 20000 big.Int array in Go. Could you please reduce it to 10000 x 10000?