【每日一题】3.18 word-search


亲爱的牛客们~


又到了【每日一题】的时候啦,昨天的题目有牛客们反映没什么技术难度,今天就给大家挑个长的(啊喂...不是题目越长题就越难好么?!)
大家不妨练习一下,欢迎来讨论区和大家一起讨论哟~


今天的题目是这样滴:

【每日一题】0318

[编程题] 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"]
]
word    ="ABCCED", -> returnstrue,  
word    ="SEE", -> returnstrue,  
word    ="ABCB", -> returnsfalse.



大家可以在下面链接直接在线编程训练哦:

戳这里在线练习哦


欢迎大家认真思考,积极讨论~ 

也欢迎高手们把题目翻译成中文,翻译的“信达雅”有奖哟~



全部评论

相关推荐

1 收藏 评论
分享
牛客网
牛客企业服务