See More

public class Solution { // Used String datastructure to store the rows private String [] rows = new String [] {"QWERTYUIOP","ASDFGHJKL","ZXCVBNM"}; public String[] findWords(String[] words) { ArrayList findWord = new ArrayList<>(); int rowNumber = -1; for(String word : words) { char [] charWord = word.toCharArray(); rowNumber = findRowNumber(charWord[0]); for(int idx = 1; idx