My code giving wrong ans

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