<p>There is nice algorithm from Donald Knuth: <a href="http://en.wikipedia.org/wiki/Knuth%27s_Algorithm_X" rel="nofollow">Algorithm X</a>, <a href="http://en.wikipedia.org/wiki/Dancing_Links" rel="nofollow">Dancing Links</a></p>

<p>As I know it is one of the fastest algorithms to solve Sudoku.</p>

<p>And here is quite readable and through paper with nice pictures: <a href="http://arxiv.org/abs/cs/0011047" rel="nofollow">http://arxiv.org/abs/cs/0011047</a></p>
Timus Online Judge Sudoku problem
<p>I was looking at the problem <a href="http://acm.timus.ru/problem.aspx?space=51&amp;num=8" rel="nofollow">Magic Square</a>
I am sure with some loop and if condition this problem can be solve, but I am interested to know if there is any know algorithm / datastructure to solve this problem. I am not interested in exact solution, but any hint toward algorithm/datastructure would help.</p>