码迷,mamicode.com
首页 > 其他好文 > 详细

Leetcode: word search

时间:2015-08-02 14:55:34      阅读:103      评论:0      收藏:0      [点我收藏+]

标签:

July 6, 2015

Problem statement:

Word Search

Given a 2D board and a word, find if the word exists in the grid.

The word can be constructed from letters of sequentially adjacent cell, where "adjacent" cells are those horizontally or vertically neighboring. The same letter cell may not be used more than once.

For example,

Given board =

[
  ["ABCE"],
  ["SFCS"],
  ["ADEE"]
]

The problem can be solved using backtracking, recursive solution. 

Share C# implementation:

Leetcode: word search

标签:

原文地址:http://www.cnblogs.com/juliachenOnSoftware/p/4695691.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!