摘要: #the define of Sudoku is on this link : http://sudoku.com.au/TheRules.aspxWrite a program to solve a Sudoku puzzle by filling the empty cells.Empty ce... 阅读全文
posted @ 2015-12-19 23:37 hao.ma 阅读(228) 评论(0) 推荐(0)
摘要: #数独(すうどく,Sūdoku)是一种运用纸、笔进行演算的逻辑游戏。玩家需要根据9×9盘面上的已知数字,推理出所有剩余空格的数字,并满足每一行、每一列、每一个粗线宫内的数字均含1-9,不重复。#数独盘面是个九宫,每一宫又分为九个小格。在这八十一格中给出一定的已知数字和解题条件,利用逻辑和推理,在其他... 阅读全文
posted @ 2015-12-19 17:57 hao.ma 阅读(437) 评论(0) 推荐(0)
摘要: #Given a sorted array and a target value, return the index if the target is found. If #not, return the index where it would be if it were inserted in ... 阅读全文
posted @ 2015-12-19 17:15 hao.ma 阅读(180) 评论(0) 推荐(0)
摘要: #Suppose a sorted array is rotated at some pivot unknown to you beforehand.#(i.e.,0 1 2 4 5 6 7might become4 5 6 7 0 1 2).#You are given a target valu... 阅读全文
posted @ 2015-12-19 16:06 hao.ma 阅读(155) 评论(0) 推荐(0)
摘要: #question : Given an array of integers, every element appearstwiceexcept for one. Find that single one.#note : Your algorithm should have a linear run... 阅读全文
posted @ 2015-12-19 12:09 hao.ma 阅读(143) 评论(0) 推荐(0)