Need some hints for Problem Set 3 Problem 4. I'm not quite sure where to start. How do I decide on which character of key will be omitted from the search? If I have to check all possible omissions, how's that done? The functions from problem 2 and 3 depended on inputting the beginning and end of a string missing a particular character; they didn't dynamically take a key and break it down.
Hi mtoyama, you would use the functions subStringMatchExact, and subStringMatchOneSub to construct your solution to problem 4. Within subStringMatchOneSub, there is code to dynamically break the key down. (e.g. key1=key[:miss] and key2=key[miss+1:]). The instruction said to use functions from problem 2 and 3, not just the ones that you wrote. In this case they were referring to the function subStringMatchOneSub that they provided. Problem 4 can be rephrase to find all the indexes generated by subStringMatchOneSub that's not in indexes generated by subStringMatchExact
Whoops. Maybe I should've downloaded the supporting files. Thought I could get away without it - I'll grab them before I go to tackle P4. Thanks!
Join our real-time social learning platform and learn together with your friends!