Hi Kacarott, I have corrected myself in the 2nd reply; sorry about the confusion.
As mentioned in the 2nd comment in the question, "the minimum requirement for unique solution is 17 givens" is a bit misleading.
17 is not a condition to have multiple solutions.
The following input generates a false error message "invalid should raise error":
I have (possibly) replicated how to the two solutions are found on different paths, but they are the same.
Below is my results without early exit; with givens == 27, the question cannot have multiple solutions.
The recursive backtracking structure is clear, what did you to reach sub 3s performance?
Hi Kacarott, I have corrected myself in the 2nd reply; sorry about the confusion.
As mentioned in the 2nd comment in the question, "the minimum requirement for unique solution is 17 givens" is a bit misleading.
17 is not a condition to have multiple solutions.
I took another look, the solver is correct; the assumption that givens >= 17 would guarantee a unique solution is falsy.
Potential an error in the checker script:
The following input generates a false error message "invalid should raise error":
I have (possibly) replicated how to the two solutions are found on different paths, but they are the same.
Below is my results without early exit; with givens == 27, the question cannot have multiple solutions.