Dictionary[] = {"START", "NOTE","SAND","STONED"}
char[][] board =
{
{'M','S','E','F'},
{'R','A','T','D'},
{'L','O','N','E'},
{'K','A','F','B'}
};
Result = ["NOTE","SAND","STONED"]
Hint: optimally this solution can be solved using load dictionary into trie data structure and process matrix tile only if characters exists at root of the trie.
Brute Force: Create all possible word for each position and check if word exists in the dictionary
followup quesiton: how can you extend this to N* N matrix?
Any one who can help in python would be very helpful to solve these kind of problems.. thank you!