Function to Sort the array of string according to lengths . This function implements Insertion Sort .
def sort ( s , n ) : NEW_LINE INDENT for i in range ( 1 , n ) : NEW_LINE INDENT temp = s [ i ] NEW_LINE DEDENT DEDENT