Let the given dictionary be following
static final String dictionary [ ] = { " GEEKS " , " FOR " , " QUIZ " , " GUQ " , " EE " } ; static final int n = dictionary . length ; static final int M = 3 , N = 3 ;