Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A C program that generates a random character matrix (J, A, V) and implements a directional search algorithm. It identifies all occurrences of the word 'JAVA' across 8 directions (horizontal, vertical, diagonal) and masks unused characters.

License

Notifications You must be signed in to change notification settings

ShotsMan2/Java-Word-Search-Matrix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

4 Commits

Repository files navigation

JAVA Word Search in Matrix

This project implements a Word Search Puzzle solver in C. It searches for the pattern "JAVA" within a randomly generated grid of characters.

⚙️ Logic

  1. Generation: Fills an $N \times N$ matrix randomly with J, A, and V.
  2. Search Algorithm:
    • Iterates through every cell.
    • If a J is found, it checks all 8 Compass Directions (North, South, East, West, and Diagonals).
    • Target Sequence: Mat[i] == 'J' $\to$ Mat[i+1] == 'A' $\to$ Mat[i+2] == 'V' $\to$ Mat[i+3] == 'A'.
  3. Filtering: Preserves the found words and replaces unrelated characters with _.

🚀 Example Output

Random Matrix:

J A V A V
A A J J A
V J V A V
A A A V A
J A V A J

About

A C program that generates a random character matrix (J, A, V) and implements a directional search algorithm. It identifies all occurrences of the word 'JAVA' across 8 directions (horizontal, vertical, diagonal) and masks unused characters.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

AltStyle によって変換されたページ (->オリジナル) /