Driver code
public static void main ( String [ ] args ) { String s [ ] = { "223" , "232" , "112" } ; int m = s [ 0 ] . length ( ) ; int n = s . length ; System . out . println ( countStrings ( n , m , s ) ) ; } }