UVa 490 - Rotating Sentences

Easy problem. Store the strings in a 2-D array. Store the maxlen of the strings. Print the elements of the array from bottom to top and from left to right. In case the string of array is short, print a space. Loop until maxlen.

maxlen is the maximum lenght of strings.

Example: Input -- tst tstab tst -- Here maxlen=5 (tstab)

So Output would be

ttt sss ttt a  b