We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
This one took me a little while, but I appreciated the challenge! For those stuck: try breaking the output down into the upper, middle, and lower sections.
From there: what is the mathematical relationship between the total characters per line, dash ('-') characters, and design ('.|.') characters? I kept the middle section as one line of static output, and took this into account when looping through the output for the upper and lower sections.
The lower section is the inverse of the upper section. Make sure to set your range limits properly, and increment/decrement accordingly!
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Designer Door Mat
You are viewing a single comment's thread. Return to all comments →
This one took me a little while, but I appreciated the challenge! For those stuck: try breaking the output down into the upper, middle, and lower sections.
From there: what is the mathematical relationship between the total characters per line, dash ('-') characters, and design ('.|.') characters? I kept the middle section as one line of static output, and took this into account when looping through the output for the upper and lower sections. The lower section is the inverse of the upper section. Make sure to set your range limits properly, and increment/decrement accordingly!