Sha256: f6adab4c40c62bf2c9739aa77e75cdbc937c6fd5ae18eafd179a4aff5c5de7e9
Contents?: true
Size: 558 Bytes
Versions: 107
Compression:
Stored size: 558 Bytes
Contents
Create a program to count the rectangles in an ASCII diagram like the one below. ``` +--+ ++ | +-++--+ | | | +--+--+ ``` The above diagram contains 6 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
107 entries across 107 versions & 1 rubygems