由买买提看人间百态

topics

全部话题 - 话题: wildcard
1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)
i**********e
发帖数: 1145
1
Are you going to interview candidates soon?
StrStr implementation is much easier to solve compared to wildcard matching.
Although the wildcard matching is a very tricky question, Facebook had asked
this question before:
http://www.mitbbs.com/article_t/JobHunting/31575425.html
If you have taken part in Google Codejam before, you will know how fast
those crazy smart people solve problems within minutes. To solve this
problem using nothing but paper and pencil + without bugs in 20 minutes is
very v... 阅读全帖
i**********e
发帖数: 1145
2
问题背景:
最近觉得这题挺有意思,就是wildcard string matching,也算比较简单的regular
expression match吧。
所谓的wildcard就是指‘*’,‘*’的意思是可以match 0个或以上的任意字符。
给个例子,例如
a*b 可以match : ab, aab, aaaaaaaaaaab
写个函数:
bool match(const char *string, const char *pattern)
这题我觉得当为面试题相对来说偏难吧,应该不会常被问到,但网上搜一搜还是有
人很倒霉被问到这题。facebook有问过这题:请参考
http://www.mitbbs.com/article_t/JobHunting/31575425.html
这题其实利用brute force就可以了,算法不难想到,但是要处理很多special case,
非常的棘手。我觉得正常人一般都回遗漏掉很多case,第一次就能写对简直就难如登天
。再加上面试的压力,我觉得没做过这题面试当场第一次就能写对的是神人。
Brute force的算法就是O... 阅读全帖
i**********e
发帖数: 1145
3
问题背景:
最近觉得这题挺有意思,就是wildcard string matching,也算比较简单的regular
expression match吧。
所谓的wildcard就是指‘*’,‘*’的意思是可以match 0个或以上的任意字符。
给个例子,例如
a*b 可以match : ab, aab, aaaaaaaaaaab
写个函数:
bool match(const char *string, const char *pattern)
这题我觉得当为面试题相对来说偏难吧,应该不会常被问到,但网上搜一搜还是有
人很倒霉被问到这题。facebook有问过这题:请参考
http://www.mitbbs.com/article_t/JobHunting/31575425.html
这题其实利用brute force就可以了,算法不难想到,但是要处理很多special case,
非常的棘手。我觉得正常人一般都回遗漏掉很多case,第一次就能写对简直就难如登天
。再加上面试的压力,我觉得没做过这题面试当场第一次就能写对的是神人。
Brute force的算法就是O... 阅读全帖
d*****r
发帖数: 39446
4
【此篇文章是由自动发信系统所张贴】
⊙ 博彩开启于:Tue Sep 27 22:51:59 2011 类别:单选
⊙ 主题:NL wildcard winner
⊙ 博彩题目描述:
Who will win the NL Wildcard -- Braves or Cardinals?
【选项如下】
(1) Cardinals
(2) Braves
d*****r
发帖数: 39446
5
【此篇文章是由自动发信系统所张贴】
⊙ 博彩开启于:Thu Sep 29 10:48:41 2011 类别:多选
⊙ 主题:NL wildcard winner
⊙ 博彩题目描述:
Who will win the NL Wildcard -- Braves or Cardinals?
【打对勾者正确选项】
√(1) Cardinals
(2) Braves
m********5
发帖数: 17667
6
【 以下文字转载自 Programming 讨论区 】
发信人: mitbbs2715 (好吃不懒做), 信区: Programming
标 题: gmail越发难用为毛wildcard之类的search至今不能用?
发信站: BBS 未名空间站 (Sun May 18 18:59:21 2014, 美东)
愚蠢至极,比如nested label, 如果nest到某个parent label下面,居然没有自动加上
parent label的功能。OK这个忍了,只要parent label可以用来search也行。
但parent label就是无法用来search,非常蠢。label:不接受wildcard或者regex. from
这么脑残的设计一致到现在也没改,都几年了啊?
k***t
发帖数: 276
7
来自主题: JobHunting版 - 实现regex(.*+)和wildcard(?*)匹配的题
参照网上的思路,写了一个wildcard match。
做面试用还算简洁。谁给Review一下?
#include
using namespace std;
bool match(char* in, int iidx, char* ptn, int pidx)
{
if (!in || !ptn) return false;
// base case
if (!in[iidx] && !ptn[pidx]) return true;
if (!ptn[pidx]) return false;
if (!in[iidx]) {
while(ptn[pidx]) if (ptn[pidx++]!='*') return false;
return true;
}
if (ptn[pidx]=='?' || ptn[pidx]==in[iidx])
return match(in, iidx+1, ptn, pidx+1);
if (ptn[pidx]==... 阅读全帖
i**********e
发帖数: 1145
8
来自主题: JobHunting版 - 实现regex(.*+)和wildcard(?*)匹配的题
请问你的代码是实现 wildcard 还是 regex?
板上之前讨论过。
http://www.mitbbs.com/article_t/JobHunting/31930815.html
k***t
发帖数: 276
9
来自主题: JobHunting版 - 实现regex(.*+)和wildcard(?*)匹配的题
我的是.*的wildcard match. 谢谢你的Link.
j********2
发帖数: 82
10
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
11
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.
s*****1
发帖数: 134
12
来自主题: JobHunting版 - Leetcode WildCard Matching
hi,
做Leetcode WildCard Matching 时间上怎么也通不过大测试,已经用了DP了
版上有哪位大牛能否给个java(只要java) 写的能通过的版本,让小弟我瞻仰一下,
谢谢啦!!!
非常感谢!
i**********e
发帖数: 1145
13
来自主题: JobHunting版 - Wildcard Matching题求助
这里有贴dp AC 的代码。
你的转去 C++ 代码或许也 AC 了。
http://discuss.leetcode.com/questions/222/wildcard-matching

true
y***n
发帖数: 1594
14
这两个题看这和像。
Wildcard Matching
'*' Matches any sequence of characters (including the empty sequence).
Regular Expression
'*' Matches zero or more of the preceding element.
高手指点一下。
d*****r
发帖数: 39446
15
【此篇文章是由自动发信系统所张贴】
⊙ 博彩开启于:Tue Sep 27 22:52:53 2011 类别:单选
⊙ 主题:AL Wildcard Winner
⊙ 博彩题目描述:
【选项如下】
(1) RedSox
(2) Rays
d*****r
发帖数: 39446
16
【此篇文章是由自动发信系统所张贴】
⊙ 博彩开启于:Thu Sep 29 10:49:13 2011 类别:多选
⊙ 主题:AL Wildcard Winner
⊙ 博彩题目描述:
【打对勾者正确选项】
(1) RedSox
√(2) Rays
d*****r
发帖数: 39446
17
【此篇文章是由自动发信系统所张贴】
⊙ 博彩开启于:Mon Jan 3 00:19:30 2011 类别:单选
⊙ 主题:Wildcard: Jets@Colts
⊙ 博彩题目描述:
本博彩没有描述
【选项如下】
(1) Jets
(2) Colts
d*****r
发帖数: 39446
18
【此篇文章是由自动发信系统所张贴】
⊙ 博彩开启于:Mon Jan 3 00:21:38 2011 类别:单选
⊙ 主题:Wildcard:Saints@Seahawk
⊙ 博彩题目描述:
本博彩没有描述
【选项如下】
(1) Saints
(2) Seahawks
d*****r
发帖数: 39446
19
【此篇文章是由自动发信系统所张贴】
⊙ 博彩开启于:Mon Jan 3 00:22:12 2011 类别:单选
⊙ 主题:Wildcard:Ravens@Chiefs
⊙ 博彩题目描述:
本博彩没有描述
【选项如下】
(1) Ravens
(2) Chiefs
d*****r
发帖数: 39446
20
【此篇文章是由自动发信系统所张贴】
⊙ 博彩开启于:Mon Jan 3 00:22:41 2011 类别:单选
⊙ 主题:Wildcard:Packers@Eagles
⊙ 博彩题目描述:
本博彩没有描述
【选项如下】
(1) Packers
(2) Eagles
d*****r
发帖数: 39446
21
【此篇文章是由自动发信系统所张贴】
⊙ 博彩开启于:Sat Jan 8 20:03:49 2011 类别:多选
⊙ 主题:Wildcard:Saints@Seahawk
⊙ 博彩题目描述:
本博彩没有描述
【打对勾者正确选项】
(1) Saints
√(2) Seahawks
d*****r
发帖数: 39446
22
【此篇文章是由自动发信系统所张贴】
⊙ 博彩开启于:Sat Jan 8 23:05:53 2011 类别:多选
⊙ 主题:Wildcard: Jets@Colts
⊙ 博彩题目描述:
本博彩没有描述
【打对勾者正确选项】
√(1) Jets
(2) Colts
d*****r
发帖数: 39446
23
【此篇文章是由自动发信系统所张贴】
⊙ 博彩开启于:Sun Jan 9 19:44:39 2011 类别:单选
⊙ 主题:Wildcard:Packers@Eagles
⊙ 博彩题目描述:
本博彩没有描述
【打对勾者为正确选项】
√(1) Packers
(2) Eagles
d*****r
发帖数: 39446
24
【此篇文章是由自动发信系统所张贴】
⊙ 博彩开启于:Sun Jan 9 19:45:09 2011 类别:单选
⊙ 主题:Wildcard:Ravens@Chiefs
⊙ 博彩题目描述:
本博彩没有描述
【打对勾者为正确选项】
√(1) Ravens
(2) Chiefs
d***a
发帖数: 316
25
来自主题: Database版 - 初级问题,关于wildcard

SELECT * FROM customers
WHERE CompanyName LIKE '%s_s%'
找到的结果里有一个是 Paris spécialités
但是换成
SELECT * FROM customers
WHERE CompanyName LIKE '%s%s%'
之后,这个 Paris spécialités 没有了。
我原来认为 % 得到的结果应该包括所有 _ 得到的结果,这两个wildcard有什么别的
问题吗?
多谢
m********5
发帖数: 17667
26
愚蠢至极,比如nested label, 如果nest到某个parent label下面,居然没有自动加上
parent label的功能。OK这个忍了,只要parent label可以用来search也行。
但parent label就是无法用来search,非常蠢。label:不接受wildcard或者regex. from
这么脑残的设计一致到现在也没改,都几年了啊?
g*********e
发帖数: 14401
27
普通人谁知道wildcard

from
g*****g
发帖数: 34805
28
搜索要支持wildcard不容易吧。索引要大很多。

from
R*3
发帖数: 11814
29
Everyone,
Now that the Lions have proven they are still the lions losing a
heartbreaker 16-18 to the Ravens, I can now give the full NFC Playoff
Picture including clinches and elimination scenarios for week 16.
To start here is the current Playoff Picture:
#1 Seattle_x (NFCW), 12-2 (Div 3-1, Conf 9-1)
#2 New Orleans (NFCS), 10-4 (Div 4-0, Conf 8-2)
#3 Philly (NFCE), 8-6 (Div 3-2, Conf 7-3)
#4 Chicago (NFCN), 8-6 (Div 2-3, Conf 4-6)
#5 Carolina (NFCS), 10-4 (Div 3-1, Conf 7-3) [Head to Head vs Sa... 阅读全帖
l******t
发帖数: 55733
30
来自主题: Military版 - 贷款买的房还能再贷款

卧槽了个球你们丫生活在美国?
Is the Money in Your Bank Accounts Exempt?
To find out if the money in your checking or savings account is protected (
meaning the trustee cannot take it), you’ll have to take a look at your
state’s bankruptcy exemptions, or the federal exemptions if they are
available to you.
Here’s what to look for:
Cash on hand. Some states exempt a small amount of cash on hand. This would
include money in bank accounts. Many states don’t exempt any amounts for
cash on hand.
Child support and ... 阅读全帖
m*********y
发帖数: 389
31
Here are some questions I copied from online.. Obviously LouZhu is a lazy
ass... these questions are everywhere... :-)
SQL Interview questions
Below is a list of questions in this blog post so you can test your
knowledge without saying answers. If you would like to see questions and
answers please scrool down.
Question: What type of joins have you used?
Question: How can you combine two tables/views together? For instance one
table contains 100 rows and the other one contains 200 rows, have exac... 阅读全帖
m******g
发帖数: 17798
32
来自主题: NBA版 - 有大鹅去赌NFL的吗?
哪款?
1 Wildcard: Jets@Colts [购买] 单选 bison 42 可购
[查看] [查看]
2 Wildcard:Saints@Seahawk [购买] 单选 bison 35 可购
[查看] [查看]
3 Wildcard:Ravens@Chiefs [购买] 单选 bison 10 可购
[查看] [查看]
4 Wildcard:Packers@Eagles [购买] 单选 bison 36 可购
[查看] [查看]
t******e
发帖数: 1293
33
来自主题: JobHunting版 - 问一些coding题
2.Wildcard string matching
非suffix tree,而用递归的代码,希望有帮助
这个题目有几个变种:
第一个变种:类似DOS文件名的Wildcard string matching,代码在
http://xoomer.virgilio.it/acantato/dev/wildcard/wildmatch.html
他们能做到的是满足以下条件的match
# Character matching is case insensitive.
# The metacharacter '*' matches any sequence of zero or more characters.
For instance "*.ZIP" matches ".zip", "A*.bbb" matches "A.bbb" or "Axyz.BBB".
# The metacharacter '?' matches exactly one character unless that character
is a period ('.').
# File name matching
t****a
发帖数: 1212
34
来自主题: JobHunting版 - 一道字符串题目
Implement wildcard pattern matching with support for '?' and '*'.
'?' Matches any single character.
'*' Matches any sequence of characters (including the empty sequence).
The matching should cover the entire input string (not partial).
Some examples:
isMatch("aa","a") → false
isMatch("aa","aa") → true
isMatch("aaa","aa") → false
isMatch("aa", "*") → true
isMatch("aa", "a*") → true
isMatch("ab", "?*") → true
isMatch("aab", "c*a*b") → false
Given two sets of strings A and B,
Problem 1:
to find out... 阅读全帖
c********1
发帖数: 421
35
【 以下文字转载自 Programming 讨论区 】
发信人: coupondea1 (coupon and deal), 信区: Programming
标 题: 这么多SSL证书,到底有什么区别?
发信站: BBS 未名空间站 (Wed Jul 30 15:08:52 2014, 美东)
这么多SSL证书,到底有什么区别?
https://www.namecheap.com/security/ssl-certificates/single-domain.aspx
怎么选择?请懂行的来说说。多谢
PositiveSSL
PositiveSSL Wildcard
PositiveSSL Multi-Domain
EssentialSSL
EssentialSSL Wildcard
RapidSSL
RapidSSL Wildcard
QuickSSL Premium
Thawte SSL 123
S*A
发帖数: 7142
36
来自主题: Programming版 - 请教一个makefile 小问题
问题关键是你根本没有指定 TARGET 到源文件的
依赖关系。没有依赖关系,只要 TARGET 存在就是
最新的了。
你要在后面加类似这么一个就好了:
$(TARGET): $(wildcard *.c *.h)
我注意到你有子目录,我的 wildcard 没有包括子目录。
你直接手动把子目录的源程序手动展取代了 wildcard 就好了。
最根本的问题是你完全没有制定文件的依赖关系。
这样就把 makefile 当成 bash 来用了。
c********1
发帖数: 421
37
来自主题: Programming版 - 这么多SSL证书,到底有什么区别?
这么多SSL证书,到底有什么区别?
https://www.namecheap.com/security/ssl-certificates/single-domain.aspx
怎么选择?请懂行的来说说。多谢
PositiveSSL
PositiveSSL Wildcard
PositiveSSL Multi-Domain
EssentialSSL
EssentialSSL Wildcard
RapidSSL
RapidSSL Wildcard
QuickSSL Premium
Thawte SSL 123
j*****g
发帖数: 223
38
来自主题: JobHunting版 - regex matching algorithm
好像没什么不同呀
regex limited to . and * 不就是wildcard matching? wildcard match一个loop就可
以吗?再想想看。。。
i**********e
发帖数: 1145
39
来自主题: JobHunting版 - 说说你面过最难的算法coding题目
我没被问过这道题,但是版上有人遇到过:
wildcard matching
regex matching 也很难,不过 wildcard 更难些(更多的边界条件),尤其写非递归那个。
i**********e
发帖数: 1145
40
来自主题: JobHunting版 - leetcode上wild match
在网站上那个是 regex match,不是 wildcard match。
wildcard match 递归的 complexity 是 exponential 的。
你必须写个非递归的 O(m*n),才能通过 large input.
c****g
发帖数: 85
41
来自主题: JobHunting版 - leetcode上wild match
突然发现好像大家默认s字符串里没有?和*.
好像原题没这么说吧。如果s字符串里没有?和*,问题会比“s字符串里没有?和*”简单
很多。
贴出原题:
Wildcard Matching
Implement wildcard pattern matching with support for '?' and '*'.
'?' Matches any single character.
'*' Matches any sequence of characters (including the empty sequence).
The matching should cover the entire input string (not partial).
The function prototype should be:
bool isMatch(const char *s, const char *p)
Some examples:
isMatch("aa","a") → false
isMatch("aa","aa") → true
isMatch("aaa","aa") → false
... 阅读全帖
j********2
发帖数: 82
42
来自主题: JobHunting版 - regex 用DP做对不对啊?
没错。DP只能用来解wildcard,不能解 regex.即使是wildcard,也比递归要难写(反正
我肯定当场白板写不出来)。
s*****n
发帖数: 994
43
来自主题: JobHunting版 - leetcode regular expression match的问题
多谢各位,刚才把regular expression match理解为wildcard matching了,
那就顺便把wildcard matching的code给贴上来吧
class Solution {
public:
bool isMatch(const char *s, const char *p) {
// Start typing your C/C++ solution below
// DO NOT write int main() function
int m=strlen(s);
int n=strlen(p);
bool dp[1000][1000] = {false};//dp[i][j] means last i chars in s
matches last j chars in p
dp[0][0] = true;
for (int i=1; i<=n; ++i){
dp[0][i] = dp[0][i-1]... 阅读全帖
b******g
发帖数: 3616
44
来自主题: JobHunting版 - leetcode这两题不是完全一样吗?
不一样的。
两道题的*号用法不一样。
1.regular expression中,*必须代表前一个字符的若干copy,而不能代表其他字
符。举个例子:
ab* 可以match (1)a,此时b*代表0个b的copy。(2)ab,此时b*代表1个b的copy,(3)abb,
b*代表2个b的copy,(3) abbbb,b*代表4个b的copy。
但ab*不能match abc,因为*只能代表b的copy而不能代表c。
2.wildcard中*没有限制,可以代替任意一个或一串字符组合。
比如ab*可以match abcd, 因为*可以代表cd.
但在wildcard中 ab*不能match a,因为b*只能代表b,或者b+任意字符串。
b*****n
发帖数: 618
45
前段时间骑驴找马终于告一段落,感觉本版的技术贴和面经贴帮助非常之大,也非常感
谢共享资源的各路大牛。希望提供一些信息和个人感受给还在找工的童鞋,有帮助最好
,但是毕竟本人资历尚浅,如果有不对的地方也请轻喷。
背景:
ms毕业不到两年
主要申请公司:
offer:facebook,google,uber,palantir,sumo logic,walmartlab,yahoo,
amazon,apple
reject:dropbox
主要几个包裹:
U: 145k base + 25k股 RSU
F: 150k base + 40k signon + 10%bonus + 260k美元 RSU
W: 165k base + 50k signon + 20%bonus + 35k美元 RSU每年(
这个略复杂,相当于每年35k美元RSU的refresh,但是每次refresh分四年给)
再上各个公司的面经和感受:
Yahoo:
最早面的公司,面的是Flurry Team,Yah... 阅读全帖
f*******r
发帖数: 976
46
恭喜,都是好包袱!

关键字: 面经
发信站: BBS 未名空间站 (Sat Jun 13 17:27:31 2015, 美东)
前段时间骑驴找马终于告一段落,感觉本版的技术贴和面经贴帮助非常之大,也非常感
谢共享资源的各路大牛。希望提供一些信息和个人感受给还在找工的童鞋,有帮助最好
,但是毕竟本人资历尚浅,如果有不对的地方也请轻喷。
背景:
ms毕业不到两年
主要申请公司:
offer:facebook,google,uber,palantir,sumo logic,walmartlab,yahoo,
amazon,apple
reject:dropbox
主要几个包裹:
U: 145k base + 25k股 RSU
F: 150k base + 40k signon + 10%bonus + 260k美元 RSU
W: 165k base + 50k signon + 20%bonus + 35k美元 RSU每年(
这个略复杂,相当于每年35k美元RSU的refres... 阅读全帖
c*****m
发帖数: 271
47
来自主题: JobHunting版 - 求教一个string match 的 dp 解法
感觉是wildcard matching的扩展,a+b+c-转换成*aa*bb*cccc,然后dp的过程中记录次
数,写的python代码如下,测试用例过了:
def match(s, p):
#invalid input
if len(p) % 2 != 0:
return -1
#reconstruct p
temp = ''
i = 0
while i < len(p):
#add '*' first
temp += '*'

#add char pattern
if p[i+1] == '+':
temp += p[i] * 2
else:
#p[i+1] == '-'
temp += p[i] * 4
#iterate to next char
i += 2
p = temp
print p
#... 阅读全帖
w******s
发帖数: 16209
48
Piper Jaffray: Worth It to Own Apple With iPad Wildcard
By Miriam Gottfried
It’s worth it to own Apple (AAPL) shares, despite the fact that sales
numbers for the iPhone, Mac and iPod will likely be in line with consensus,
because numbers for the iPad are a wildcard, according to analysts at Piper
Jaffray.
There is unusually high visibility into numbers for most Apple devices, the
firm argues, but for the iPad 2, the persistence of a dramatic supply
constraint means the demand for the device far ... 阅读全帖
s*******n
发帖数: 12995
49
来自主题: Seattle版 - 海鹰扑小鸟
When a team on the road is less than a field-goal underdog in the NFL, the
suggestion is that, according to the power ratings, the visitor is a better
team than the host — the road squad, in most cases, would be the favorite
on a neutral field.
When the Seahawks closed out the Redskins (24-14) on Sunday, the LVH
SuperBook opened the Falcons as just a 2-point favorite for next Sunday’s
NFC divisional playoff matchup. The implication is that Seattle, a wildcard
team, is better than the top-seeded ... 阅读全帖
1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)