Skip to content

Latest commit

 

History

History
32 lines (20 loc) · 1013 Bytes

README.md

File metadata and controls

32 lines (20 loc) · 1013 Bytes

sequence-finder

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.