i have heard that backtracking can be used to find whether a given word exits in a 2-D matrix of alphabets but am not sure how to implement it. E.g if we have a matrix like :
G O P
N N A
A B E
and the rules are that one can move horizontally,vertically and diagonally from any position then we need to tell whether the above matrix contains the word "GONE" . Here we can first store the positoin of all G's (if >1 G is present) and start checking from each of that postion but how to check using backtracking? Thanks.