Ah, good. Sorry for doubting you, and I am very pleased you got it figured out.
You've got to figure out how to break it into pieces.
Honestly, it often helps to use a piece of paper and a pencil (and even some scissors) to play with it — though you could play around in a text editor too.
Consider, you draw the honeycomb in
lines — the output is done line-by-line, so your drawing has to work line-by-line as well.
Hint: solve the triangle problem first. If you can create output that does something like this:
*
***
*****
*******
********* |
...then you are well on your way to figuring out the honeycomb. Hint #2:
****
******
********
********
******
**** |
Don't worry so much about recursion or iteration while figuring out how to print it; figure out how to do it in repeating pieces. The triangle and honeycomb are very much like the straight line, except now you are dealing with
two dimensions of things repeating. This means that each part of the shape will involve two levels of recursion.
• one part for the vertical stuff (things that repeat across lines)
• one part for the horizontal stuff (things that repeat on a single line)
Also, just like the triangle, it is ok if there is an offset each line.
This stuff is not particularly easy, especially when you are first learning it. But you
can do it. It just takes struggling with it a bit.
Try things. See what parts worked, what parts didn’t. Keep going.