This was an assigned coding project for a summer opportunity. The assignment is in two parts:
Part 1 is as follows:
Your program will receive 2 sequences of digits (0-9) in the file input.txt. The program has to find the longest contiguous subpart consisting of identical digits that is present in both sequences and write it to a file called output.txt. For example, if input.txt contains:
1123222345 35666532234222
output.txt should contain
222
Note that the input sequences could be extremely long, requiring you to write an efficient program.
Part 2 is as follows:
Your program will receive 2 sequences of digits (0-9) in the file input.txt. The program has to find the longest contiguous subpart that is present in both sequences and write it to a file called output.txt. For example, if input.txt contains:
1123222345 35666532234222
output.txt should contain
2234
Note that the input sequences could be extremely long, requiring you to write an efficient program.