Genome Sequencing puzzle discussion

If you want, you may send me your code in private message and I’ll try to figure out a custom case or two.

I’ll share the two cases here which may be helpful to other coders for debugging the code if they fail to pass Validator 5 (Multi-solutions) or Validator 13 (Sequences included and disjointed):

Input

5
AGGGCTC
ACTAG
GTGAT
ATACG
ATCTGCAT

Output

24

(e.g.

               1         2
      123456789012345678901234
      ACTAG
         AGGGCTC
                GTGAT
                   ATCTGCAT
                         ATACG)

Input

5
ATTGTT
ATGTGCAGT
TGGGAC
CATTCGA
TAATTTT

Output

31

(e.g.

               1         2         3
      1234567890123456789012345678901
      ATTGTT
           TGGGAC
                CATTCGA
                      ATGTGCAGT
                              TAATTTT)
1 Like

Nope the right one is AACTT (length =5)

As was said above, this puzzle can be solved by a simple brute force, and in this case it is not clear why this puzzle is in the “Hard” category, and if it should be there, then why is the number n so small?