title: A cool algorithm to check a Sudoku field?
body: <p>Does anyone know a simple algorithm to check if a Sudoku-Configuration is valid? The simplest algorithm I came up with is (for a board of size n) in Pseudocode</p>
  
  <pre><code>for each row
    for each number k in 1..n
      if k is not in the row (using another for-loop)
        return not-a-solution
  
  ..do the same for each column
  </code></pre>
  
  <p>But I'm quite sure there must be a better (in the sense of more elegant) solution. Efficiency is quite unimportant.</p>