Function to Sort the array of string according to lengths . This function implements Insertion Sort .
static void sort ( String [ ] s , int n ) { for ( int i = 1 ; i < n ; i ++ ) { String temp = s [ i ] ;