Ad
  • Default User Avatar

    I made a slight improvement: since sudoku isn't about numbers, but it's about subsets, it's not necessary to convert the chars to integers (they are still numbers tho!). In addition, parsing the whole scheme in a 2D array is an extra passage, and in backtracking requires two indexes instead of one. Converting the 'i' index of the string to column and rows, and backwards, is done with easy calculations.

  • Default User Avatar

    I spent the entire afternoon drawing DFA diagrams, and finally made it, but my regex is slightly longer than this. Is this also derived from a DFA or there is some other way to resolve this problem? It's the first time I see this kind of problem, ad I'd like to learn more about this subject :)

  • Default User Avatar

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

  • Default User Avatar

    I didn't think about the ease of insertion. It is indeed more simple using a string

  • Custom User Avatar

    i decided to use a string because there is an existing code golf contest that includes a list of about 58000 sudoku puzzles formatted that way. And it's easier for a user to input a string than a 2d vector.