首页 > 编程语言 > 详细

Java for LeetCode 037 Sudoku Solver

时间:2015-05-08 21:54:37      阅读:214      评论:0      收藏:0      [点我收藏+]

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!