A Sudoku puzzle is minimal (also called irreducible) if it has a unique solution, but removing any digit would yield a puzzle with multiple solutions. In other words, every
Here are the main optimizations I implemented with (highly approximate) percentage increases in speed:
I have an idea on the 2nd option
your had suggested will be better for that provided you add 3 extra checks for the 1st 17 numbers
add each item at random location provided
these new number added dont fail the 3 basic criteria of sudoku
if condition 1 fails move to the next column or row and check for the 3 basic criteria again.