I had recently participated in coding competion sponsored by an company and there was this one question which I did not understood, as to what was it asking.
Here i
As I understand:
You have
ABCHIDGFE
You convert it to square (if possible)
A B C H I D G F E
And then make string going clockwise
A B C D E F G H I
And return this string
I'm not sure what to do if it's impossible to make square of it.