![]() Try it online! Note that link is to verbose code for explanatory purposes, with the -sl option that shows the equivalent native Charcoal code. This is code-golf, ascii-art and set-theory.Ĭharcoal renders boxes like this naturally, but the whole set theory part.You may even print a picture of Abe Lincoln, don't care.You are garuanteed that a.join(b).length() > 0, if both are empty, you may do whatever.Corners of the Venn Diagram (where | meets -) must be represented by a +.The ordering of the elements within sub-sections of the Venn-Diagram are arbitrary.Elements of the Venn Diagram are left-aligned and padded to the max length entry plus 1.Output (Notice how the two empty parts still have the right-pad space): +-+-+-+ You may also choose to just handle everything as strings, and only accept string input. The program may either consider '1' = 1 or '1' != 1, up to your implementation. ![]() Output (Order is 100% arbitrary, as long as the Venn Diagram is correct): +-+-+-+ ![]() The Venn Diagram will use a squarified version of the traditional circles for simplicity. Given two lists that contain no duplicate elements a and b, find the crossover between the two lists and output an ASCII-Art Venn Diagram.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |