python-wordmatching
        Posted  
        
            by challarao
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by challarao
        
        
        
        Published on 2010-06-17T08:25:57Z
        Indexed on 
            2010/06/17
            8:33 UTC
        
        
        Read the original article
        Hit count: 199
        
Write two functions, called countSubStringMatch and countSubStringMatchRecursive that take two arguments, a key string and a target string. These functions iteratively and recursively count the number of instances of the key in the target string. You should complete definitions for
        def countSubStringMatch(target,key):
        and
        def countSubStringMatchRecursive (target, key):
For the remaining problems, we are going to explore other substring matching ideas. These problems can be solved with either an iterative function or a recursive one. You are welcome to use either approach, though you may find iterative approaches more intuitive in these cases of matching linear structures.
© Stack Overflow or respective owner