Search a word in a grid
Given a 2D arrays of alphabet, search a word in that grid
Example:
[[A, A, A, R,T],
[M, A, O, R,W],
[C, T, L, R, L],
[Q, A, L, X, C],
[A, P, T, X, L]]
Search "CAT", shortest path
Found in "(0,2)", "(1,1)", "(1,2)"
Example:
[[A, A, A, R,T],
[M, A, O, R,W],
[C, T, L, R, L],
[Q, A, L, X, C],
[A, P, T, X, L]]
Search "CAT", shortest path
Found in "(0,2)", "(1,1)", "(1,2)"
Comments
Post a Comment