Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I have a list of strips, the program must be able to handle any size but for examples sake, let's take strips of size 3

I have a list of strips, the program must be able to handle any size but for examples sake, let's take strips of size 3.
we have:
aac, cab, ccc, bca, aca, bbb, aca, acb, cbb, caa, bcc, acb, bbc, aca, aca, bca, acc, cca, abc, ccc
it assumed that all strips are the same length. I need a program that takes in this list and size n and produces the maximum possible matches based on those selected number of strips.
a match is determined if two strips have the same letter in the same position. the maximum possible matches between 2 strips is 3 eg.
aaa
aaa
The strips can also be reversed so the strips abb, bba will give maximum matches since bba will be reversed to be abb which is the same.
The program should print out the list of strips used for that particular size inputted and the amount of matches that it has found. For the provided example, it should find about 25 matches. The output should print all strips in their non reversed state.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Repairing And Querying Databases Under Aggregate Constraints

Authors: Sergio Flesca ,Filippo Furfaro ,Francesco Parisi

2011th Edition

146141640X, 978-1461416401

More Books

Students also viewed these Databases questions