My code giving wrong ans here

simply , i took every word , and check if it is present in the board array or not.