Ask your own question, for FREE!
Computer Science 13 Online
rvc (rvc):

Please help in need :') C program A king sends out two scrolls to the common public with the encryted message in it. the hidden message is the no of days the king is going to declare a war in. u have to interpret the encryption technique from the example4s given below and find the no of days. write a program which inputs the two messages and gives the no of days as output. For example. Scroll 1 : AMAZAPPLE Scroll 2 : APPLIECATION Hidden message : 5 Scroll 1 : APPLEPIE Scroll 2 :LEPIECT Hidden message : 5 It is the no of words common in a stretch

rvc (rvc):

@wio please help pleaseeeeeeeeeeeeeeeeeeeeeeeeeeeeeee

OpenStudy (chantysquirrel1129**):

..............yeah I'm retard...I can't help ya here :/ Sorry

OpenStudy (mathmate):

Is "APPLIECATION" meant to be APPLEICATION

OpenStudy (mathmate):

No. of words common in a stretch means the longest common string. For example, "EXAMple" and " EXAMination" has a common string of length four. They don't have to start at the beginning. Or, "reSTRIct" and "STRIke" have again a common string of length four. These are easier to look for by inspection because of the short length. You need an algorithm to look for common strings of lengths in the hundreds, for example binary strings. @rvc Does that answer the question?

rvc (rvc):

No please help me with program

OpenStudy (mathmate):

Do you have an algorithm? If you have, please post the algorithm before working on the program.

rvc (rvc):

no

OpenStudy (mathmate):

Have you done trees?... and dynamic programming?

rvc (rvc):

yes please tell me the logic to compare the strings

OpenStudy (mathmate):

First thing first, do you understand the problem?

rvc (rvc):

yes

OpenStudy (mathmate):

Good, if you have done trees and dynamic programming, you can start by taking a look at the algorithm suggest in the following link: https://en.wikipedia.org/wiki/Longest_common_substring_problem

rvc (rvc):

okay thank you so much

OpenStudy (mathmate):

You're welcome! :)

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!