Driver Code
public static void main ( String args [ ] ) { String [ ] arr = { " apple " , " appe " , " apl " , " aapl " , " appax " } ; String S = " app " ; int N = 5 ; System . out . println ( lexicographicallyString ( arr , N , S ) ) ; } }