Find list of words in a grid
Anonymous User
175

grid = [
['b', 'a', 'b'],
['y', 't', 'a'],
['x', 'x', 't'],
]

words = ["by","bat"]

find the path of each word of list in grid. Letters cannot be reused.

ans for above testcase : [[(0, 0), (1, 0)],
[(0, 2), (1, 2), (2, 2)]]

anyone has any idea about this problem

Comments (1)