# Is this a Boggle pad?

Given a list of case-insensitive ASCII letter strings ("words"), output whether the entire list can be found on some four-by-four configuration ("board") of letter squares, in which no square can be used more than once in a word, and in which words are formed by moving from any square to any adjacent square including diagonally.

You do not need to worry that the combination of squares that would allow for the list actually appears in a Boggle game. The words need not be actual words in any language. You should assume that if Q appears on the board, it's on a square of its own (unlike in actual Boggle).

Standard loopholes are banned, standard I/O rules apply, and you're golfing.

In the examples below, a slash signifies a newline.

## Truthy examples

• auuuuooiiaaoiee, euiaaiueeuua, ooouuueee, eueueuoaoa — All are on the board auii/euoa/ueoa/euio
• swiop, byteba, ceropl, qoiz, aeis, lqoep — All are on the board abcb/rety/poiw/lqzs

## Falsy examples

• swiop, byteba, ceropl, qoiz, aeis, lqoep, wybez — There are fifteen distinct letters (abceilopqrstwyz) and a single word has two bs, so that's the sixteenth square. Thus there's only one e. But the e has nine distinct letters (abcioprtz) adjacent to it, which is impossible.
• hskcbnzvgfa, lajdnzvfhgs, kajfbmxvshd, ldgckvbsanx — There are sixteen distinct letters (abcdfghjklmnsvxz). Of those, s is adjacent to all of abghkv, v is adjacent to all of bfgksxz, b is adjacent to all of cfmnsv, a is adjacent to all of fjklns, and f is adjacent to all of abghjv. But on an actual board only four squares are adjacent to more than five squares apiece.
• I can understand the challenge clearly and unambiguously. If anyone disagree (and VTC as unclear), consider leaving a comment. – user202729 Apr 29 '18 at 2:02
• I wonder if it would be better suited for fastest-code or fastest-algorithm. As code-golf, it may lead to brute-force solutions that run forever and never actually return anything. – Arnauld Apr 29 '18 at 10:30
• You'd need to define what brute-force exactly means. But even so, I'm not sure it's a good idea. A very clever answer may still use brute-force in some way. – Arnauld Apr 29 '18 at 11:39
• Besides that, I too think that the challenge is clearly defined. So, people that have VTC really should share their thoughts. – Arnauld Apr 29 '18 at 11:42
• As far as I can see, in general this is a subgraph problem, which is NP complete, so all non-magical answers will need some degree of brute force. – Phil H May 1 '18 at 11:32