Refactoring - replaced boolean visited array with integer array to
resolve path in WordFinder.