Square String
[email protected] // 1.0 // type-checkable
Given a string like ABC
, let's say its square is the result of writing it left-to-right
along the top of a square and top-to-bottom along the left of the square, then filling in the
rest of the square with backwards L shapes that connect the top instance of each character with
its corresponding instance on the left. For example, ABC
's square is:
ABC
BBC
CCC
Write a function called print_square
that takes a (single-line) string and prints its square.