[algogeeks] Amazon Q: Implement an algorithm to do wild card string matching

2012-05-26 Thread Ashish Goel
Implement an algorithm to do wild card string matching Best Regards Ashish Goel Think positive and find fuel in failure +919985813081 +919966006652 -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to

Re: [algogeeks] Amazon Q: Implement an algorithm to do wild card string matching

2012-05-26 Thread atul anand
match(*input , *pattern) if(*pat == 0) return true; if('?' == *pat) return match(input+1,pat+1) || match(input,pat+1) if('*' == *pat) return match(input+1,pat) || match(input,pat+1) if(*text == *pat) return

Re: [algogeeks] Amazon Q: Implement an algorithm to do wild card string matching

2012-05-26 Thread atul anand
typo error above resolved :- match(*input , *pattern) if(*pat == 0) return true; if('?' == *pat) return match(input+1,pat+1) || match(input,pat+1) if('*' == *pat) return match(input+1,pat) || match(input,pat+1) if(*input == *pat)