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. 我知道有人问过了。没答案。 我觉得time 复杂度是m*n*4^(k-1). 也就是m*n*4^k. m X n is board size, k is word size. space 复杂度 是: 4^k (recursive)+ m*n (to mark visited board cell) 是这样吗?
e*r
3 楼
RD 06/2015 上个月EB3 current了 刚办的降级 这周才link 今天网上显示on March 2nd, case approved.
【在 h**o 的大作中提到】 : 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. : 我知道有人问过了。没答案。 : 我觉得time 复杂度是m*n*4^(k-1). 也就是m*n*4^k. : m X n is board size, k is word size. : space 复杂度 是: 4^k (recursive)+ m*n (to mark visited board cell) : 是这样吗?
p*o
6 楼
gxgx!
【在 e******r 的大作中提到】 : RD 06/2015 : 上个月EB3 current了 刚办的降级 这周才link : 今天网上显示on March 2nd, case approved.
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. 我知道有人问过了。没答案。 我觉得time 复杂度是m*n*4^(k-1). 也就是m*n*4^k. m X n is board size, k is word size. space 复杂度 是: 4^k (recursive)+ m*n (to mark visited board cell) 是这样吗?
【在 h**o 的大作中提到】 : 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. : 我知道有人问过了。没答案。 : 我觉得time 复杂度是m*n*4^(k-1). 也就是m*n*4^k. : m X n is board size, k is word size. : space 复杂度 是: 4^k (recursive)+ m*n (to mark visited board cell) : 是这样吗?