24
2
The Borromean rings are a curious set of three circles, linked such that the removal of any one of them will unlink the other two:
You can make a set for yourself with a couple rubber bands and a binder ring. With more rubber bands, it's easy to make any Brunnian link.
Write a program or function that outputs (prints or returns) this ascii-art representation of Borromean rings:
+-----+
| |
+-----+ |
| | | |
| +-|---+ |
| | | | | |
| | +-|---+
| | | |
+-|---+ |
| |
+-----+
The lines may have trailing spaces and there may be a trailing newline.
The shortest code in bytes wins.
2I have to say that this is a pretty hard challenge because of how simple the expected output is – Beta Decay – 2015-07-20T05:20:03.887
3I'm a little disappointed. Thought the challenge would be to take an integer size and output rings of that size. – Blacklight Shining – 2015-07-20T13:42:52.400
yeah, I thought so too (program takes int as an input and then draws Brunnian Link with that many components, but that is not unique, maybe a number of crossings?). That kind of program would have to actually do search (or at least trial and error - do these rings interlock and if I remove one, do the go free?) instead of just drawing a fixed picture... – alexey – 2015-07-20T23:36:07.540