You can find the solution implemented using depth first search here - https://parucodes.blogspot.com/2025/02/word-search-in-maze-using-depth-first.html?m=1