Ad
  • Custom User Avatar

    I've managed to optimize it after profiling for few hours, but it still takes almost 10 seconds for those 100 tests. Insanely hard.

  • Custom User Avatar

    Your diagnostics seem to be terribly wrong, because it seems to me that you are printing times of each recursive sub-call and not of a solution as a whole. After measuring total times of your solution, I got following logs:

    Solved 1th sudoku in 0.67274213
    Solved 2th sudoku in 0.13053465
    Solved 3th sudoku in 0.50209308
    Solved 4th sudoku in 0.49838281
    Solved 5th sudoku in 0.09900117
    Solved 6th sudoku in 0.04873729
    Solved 7th sudoku in 0.04066420
    Solved 8th sudoku in 0.22643065
    Solved 9th sudoku in 0.03949404
    Solved 10th sudoku in 0.04394507
    Solved 11th sudoku in 0.20175838
    Solved 12th sudoku in 0.28576541
    Solved 13th sudoku in 0.10822368
    Solved 14th sudoku in 0.03941178
    Solved 16th sudoku in 0.08698726
    Solved 17th sudoku in 0.15653372
    Solved 18th sudoku in 0.04665780
    Solved 19th sudoku in 0.12197948
    Solved 20th sudoku in 0.16618562
    Solved 21th sudoku in 0.16748643
    Solved 22th sudoku in 0.10031271
    Solved 25th sudoku in 0.08102345
    Solved 26th sudoku in 0.16066670
    Solved 27th sudoku in 0.09649348
    Solved 28th sudoku in 0.10229945
    Solved 29th sudoku in 0.16057420
    Solved 30th sudoku in 0.38737392
    Solved 31th sudoku in 0.15400934
    Solved 33th sudoku in 0.05073357
    Solved 34th sudoku in 0.10549068
    Solved 35th sudoku in 0.50075221
    Solved 36th sudoku in 0.15533233
    Solved 37th sudoku in 0.10187721
    Solved 38th sudoku in 0.04199123
    Solved 39th sudoku in 1.79772639
    Solved 40th sudoku in 0.34626746
    Solved 41th sudoku in 0.04284692
    Solved 42th sudoku in 0.10607004
    Solved 43th sudoku in 0.51317811
    Solved 44th sudoku in 0.14717102
    Solved 45th sudoku in 0.06041265
    Solved 46th sudoku in 0.22008801
    Solved 47th sudoku in 0.14626503
    Solved 48th sudoku in 0.14514446
    Solved 49th sudoku in 1.39359808
    Solved 50th sudoku in 0.22236490
    Solved 51th sudoku in 0.34508967
    

    It seems that your solution handles some cases poorly, because times go up to 1.5s+

  • Custom User Avatar

    I can send you my implementation of the solve and measurements later if you want.

  • Custom User Avatar
  • Custom User Avatar

    In what language?

  • Custom User Avatar

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

  • Custom User Avatar

    A year is a little extreme, but glad to see you did it!

  • Custom User Avatar

    It was very difficult for me. I even gave up CodeWars for a year because I couldn't solve this problem in 2023. I don't like my solution because it's clumsy. But it worked! I'm glad I was able to solve this!

  • Custom User Avatar

    good for you man, im still timing out from using the backtracking approach :(

    EDIT: I'm sorry, i used some code on github for the solution. Before anyone says anything, I probably shouldn't have done that, however I have spent some time reading the code, and I can fully understand it now. I think the point of codewars is to learn, but sometimes give up if it is too difficult. And for the reason why I did that, well, it's late now, so I got frustrated and just copy pasted some code off the internet.

  • Custom User Avatar

    This was a very challenging and fun kata! It required a lot of thought about which data structure and which algorithm to use to minimize the number of computations. In the end it was worth it and I managed to pass it marginally.

  • Custom User Avatar

    well, this one is insane

  • Custom User Avatar

    A correctly composed Sudoku must have a unique solution !

  • Custom User Avatar

    timing out from backtrack :(

  • Custom User Avatar
  • Custom User Avatar

    Its 5 per test.

  • Loading more items...