标签:
Write a program to solve a Sudoku puzzle by filling the empty cells.
Empty cells are indicated by the character ‘.‘
.
You may assume that there will be only one unique solution.
解题思路:
经典的NP问题,暴力枚举即可,采用Dancing Links
可以优化算法,参考链接:https://www.ocf.berkeley.edu/~jchu/publicportal/sudoku/sudoku.paper.html
JAVA实现如下:
Java for LeetCode 037 Sudoku Solver
标签:
原文地址:http://www.cnblogs.com/tonyluis/p/4488727.html