Sha256: b91f351aab8f829244f3ed99a7cd8105095e1723e39c95f5071f6965de9fc362
Contents?: true
Size: 509 Bytes
Versions: 67
Compression:
Stored size: 509 Bytes
Contents
Create a program to count the rectangles in an ASCII diagram like the one below. ``` +--+ | | +--+--+ | | | +--+--+ ``` The above diagram contains 5 rectangles: ``` +-----+ | | +-----+ ``` ``` +--+ | | | | | | +--+ ``` ``` +--+ | | +--+ ``` ``` +--+ | | +--+ ``` ``` +--+ | | +--+ ``` You may assume that the input is always a proper rectangle (i.e. the length of every line equals the length of the first line).
Version data entries
67 entries across 67 versions & 1 rubygems