j********2 发帖数: 82 | 1 wildcard:
'?' Matches any single character.
'*' Matches any sequence of characters (including the empty sequence).
regex:
‘.’ Matches any single character.
‘*’ Matches zero or more of the preceding element.
假设用recursion, 怎样的examples会导致exponentional time?
Note that for pattern "******", we can use a loop to skip those. Thus, ("
aaaaaaaab", "*****ab") is not such an example. | h******8 发帖数: 55 | 2 好像找不出这样的例子。wiki 上的例子是{(a|aa)*b, aaaaaaab},但是这里我们不用
实现()和|。
【在 j********2 的大作中提到】 : wildcard: : '?' Matches any single character. : '*' Matches any sequence of characters (including the empty sequence). : regex: : ‘.’ Matches any single character. : ‘*’ Matches zero or more of the preceding element. : 假设用recursion, 怎样的examples会导致exponentional time? : Note that for pattern "******", we can use a loop to skip those. Thus, (" : aaaaaaaab", "*****ab") is not such an example.
| j********2 发帖数: 82 | 3 wildcard:
'?' Matches any single character.
'*' Matches any sequence of characters (including the empty sequence).
regex:
‘.’ Matches any single character.
‘*’ Matches zero or more of the preceding element.
假设用recursion, 怎样的examples会导致exponentional time?
Note that for pattern "******", we can use a loop to skip those. Thus, ("
aaaaaaaab", "*****ab") is not such an example. | h******8 发帖数: 55 | 4 好像找不出这样的例子。wiki 上的例子是{(a|aa)*b, aaaaaaab},但是这里我们不用
实现()和|。
【在 j********2 的大作中提到】 : wildcard: : '?' Matches any single character. : '*' Matches any sequence of characters (including the empty sequence). : regex: : ‘.’ Matches any single character. : ‘*’ Matches zero or more of the preceding element. : 假设用recursion, 怎样的examples会导致exponentional time? : Note that for pattern "******", we can use a loop to skip those. Thus, (" : aaaaaaaab", "*****ab") is not such an example.
| c********t 发帖数: 5706 | 5 "aaaaaaab" "*ab" recursion 就是exponentional time吧
【在 j********2 的大作中提到】 : wildcard: : '?' Matches any single character. : '*' Matches any sequence of characters (including the empty sequence). : regex: : ‘.’ Matches any single character. : ‘*’ Matches zero or more of the preceding element. : 假设用recursion, 怎样的examples会导致exponentional time? : Note that for pattern "******", we can use a loop to skip those. Thus, (" : aaaaaaaab", "*****ab") is not such an example.
|
|