Ad
  • Custom User Avatar

    It will not work when B is also negative. But for current dataset it's a correct solution

  • Custom User Avatar

    Nice job, later you check the 7x7 exercise https://www.codewars.com/kata/5917a2205ffc30ec3a0000a8/

    There is so much more to optimize! :)

  • Custom User Avatar

    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 :)

  • Custom User Avatar

    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 ;-)

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    I have an algorithm, array (20000 x 20000) is required to be created for buffering calculations.

  • Custom User Avatar

    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.

  • Custom User Avatar

    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?