Question: i need this code in java please declare an 2D array of characters and search for a char sequence(creating a word ) in rows only
i need this code in java please declare an 2D array of characters and search for a char sequence(creating a word ) in rows only (horizontaly ) Example 2D array , the word Input:CAT
A B C D E
A C A T N
G H I C T
L M C A T
output:Found Word "CAT" Row 1 col 1 and row 3 col 2
i solve it like that but nothing is outputed i need to know what is wrong and how to solve it
for(int i=0;i } if(temp.equals(word)) { System.out.print("Found at row"+i+"col"+j); } }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
