Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 12 Online
OpenStudy (anonymous):

Problem 3 of Problem set 3 says "Write a function, called constrainedMatchPair which takes three arguments: a tuple representing starting points for the first substring, a tuple representing starting points for the second substring, and the length of the first substring. " I don't understand why you need a tuple to identify the starting point, I thought the starting point will be only one point rather than multiple points?

OpenStudy (anonymous):

The point is that you need to start with the first match, but through iteration you must step through all the possible matches. So, the "tuple representing starting points for the first substring" is really a list of all the "starting points" (matches) of the first substring in the target.

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!