Back
Close
  • 48

Learning Opportunities

This puzzle can be solved using the following concepts. Practice using these concepts and improve your skills.

Statement

 Goal

You manufacture custom picture-frames for couples, such that:
~ the wife's name goes across the top and down the right side
~ the husband's name goes down the left side and across the bottom

Given the names of the wife and husband (or Partner#1 and Partner#2 if you prefer), draw the smallest frame possible.

Note: Don't split a name, such that part is vertical and part is horizontal.
Input
Line 1: A string wife, denoting wife's name
Line 2: A string husband, denoting husband's name
Output
Multiple Lines: That picture frame
Constraints
Example
Input
Margaret
Clarence
Output
Margaret
C      M
l      a
a      r
r      g
e      a
n      r
c      e
e      t
Clarence

A higher resolution is required to access the IDE