exercism-rust/rectangles
2023-08-21 13:50:14 -04:00
..
.exercism init commit 2023-08-21 13:50:14 -04:00
src init commit 2023-08-21 13:50:14 -04:00
tests init commit 2023-08-21 13:50:14 -04:00
.gitignore init commit 2023-08-21 13:50:14 -04:00
Cargo.toml init commit 2023-08-21 13:50:14 -04:00
HELP.md init commit 2023-08-21 13:50:14 -04:00
README.md init commit 2023-08-21 13:50:14 -04:00

Rectangles

Welcome to Rectangles on Exercism's Rust Track. If you need help running the tests or submitting your code, check out HELP.md.

Instructions

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).

Source

Created by

  • @EduardoBautista

Contributed to by

  • @AndrewKvalheim
  • @ashleygwilliams
  • @coriolinus
  • @cwhakes
  • @EduardoBautista
  • @efx
  • @ErikSchierboom
  • @IanWhitney
  • @kytrinyx
  • @lutostag
  • @mkantor
  • @navossoc
  • @nfiles
  • @petertseng
  • @rofrol
  • @stringparser
  • @xakon
  • @ZapAnton