Write the code that will take a string, calculate the minimum square that
will contain it and return the converted string:
String convert(String text);
convert(“paypalisthefastersaferwaytosendmoney”) should return
“paypalferwaiamonyssdyettrnesohetsafe”
The string “paypal is the faster, safer way to send money” is written in a
clockwise spiral pattern inside a square starting from the upper left
corner:
(you may want to display this pattern in a fixed font for better legibility).
P A Y P A L
F E R W A I
A M O N Y S
S D Y E T T
R N E S O H
E T S A F E
Then read line after line:
PAYPALFERWAIAMONYSSDYETTRNESOHETSAFE