Answered step by step
Verified Expert Solution
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
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 strips is 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 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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started