11
Inspired by this question about packing into this format.
Occasionally I see a completed crossword and being as I am, I can't be bothered to find out what the solutions to the clues actually were.
Input:
- A 2D string (any format, newline separated, 2d list etc.)
- Blank squares will be represented with a
(space character)
- Every other square will be in the lower case alphabet.
- You may assume that the input will be padded with spaces to form a rectangle
Output:
- Each word found
- You must search for words along and down
- Words will be at least two letters long
- If there are duplicate words, you have to output them for each time they appear
- You don't have to do any validation
- Words may be outputted in any order
- No strict formatting rules
Test cases:
word
e e
step
t d
word, step, west, reed
---
pies
not
no
wasp
pies, not, no, wasp, in, eons, stop
---
igloo
n
word
igloo, word, on
@Maltysen Wonderful. – Leaky Nun – 2016-04-03T17:20:52.230
1Pyth wins. As always. – Leaky Nun – 2016-04-03T17:41:55.190
1You can save one byte by removing the
d
, which makesj
join on newlines, which are still chopped byc ... )
– isaacg – 2016-04-04T00:19:00.907@isaacg that's really cool, thanks – Maltysen – 2016-04-04T00:27:15.113