CROSSWORD - Recursion

Getting wrong answer on one out of 3 testcases.

Hello @nachiketn please share your code by saving it on ide.codingblocks.com so that i can check it.

I am check for each word, whether it exists in the puzzle. If it exists, then I am adding it to the set.

Can you tell me which testcase I am failing?

Hello @nachiketn we can form in all the 8 adjacent directions:
think for this test case;
2
a abcd
2
ac
db
output should be:
a abcd
we can make “abcd” also by moving in this way (0,0) -> (1,1) -> (0,1) -> (1,0)

It’s working now, https://ide.codingblocks.com/s/438878

@nachiketn if you feel that your doubt is cleared you can mark this as resolved.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.