Skip to content

Latest commit

 

History

History

065-word-search

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Word Search

Challenge Description:

Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from letters of sequentially adjacent cell, where adjacent cells are those horizontally or vertically neighboring. The same letter cell may not be used more than once.

Input sample:

The board to be used may be hard coded as:

[
[ABCE],
[SFCS],
[ADEE]
]

Your program should accept as its first argument a path to a filename. Each line in this file contains a word. E.g.

ASADB
ABCCED
ABCF

Output sample:

Print out True if the word exists in the board, False otherwise. E.g.

False
True
False