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)"

Comments

Popular posts from this blog

Today Walkin 14th-Sept

Spring Elasticsearch Operations

Hibernate Search - Elasticsearch with JSON manipulation