Question: Please help me with this question. (g) Consider the string match method of Java: text.matches (pattern) We should think of text and pattern as representing
Please help me with this question. 
(g) Consider the string match method of Java: text.matches (pattern) We should think of text and pattern as representing sets of strings, de- noted S(text) and P (pattern), respectively. Indeed, S(text) is just the set of all substrings of text. Eg., if S("ab")-"", "a", "ab", "b". Then the match method returns true if and only if S(text) and P (pattern) has a string in common. Question: if text has length n, what is the size of S(text)? Suffices to give a big-Oh
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
