番茄收过一茬,不结果了, 该拔掉吗# gardening - 拈花惹草
r*m
1 楼
一面
You are given two words A and B of the same length from a dictionary D. You
can only access this dictionary through a function boolean isInDictionary(
string word). We are going to make a word ladder. We start at A, we end with
B, and change one letter at every step.
All words are over the alphabet [a-z]. |A| <= 10 characters. |D| <= 10 000
000 words.
We are looking for a shortest word ladder, if any exists. If many exist,
return any one of them.
A=dog, B=let
D={dog, let, log, leg, puzzle, bicycle}
dog
log
leg
let
二面
1. given a cactus graph, determine the number of different spanning trees of
this graph.
2. Given a very large string T, |T| = 10 000 000 chars
a stream of small strings Si
check if Si is a subsequence of T ? return true/false
number of Si ~ 100 000 000 (strings)
|Si| ~ 100 chars
'a' to 'z'
T = abcdefg
S1 = abc yes
S2 = ag yes
S3 = ga no
S4 = aa no
You are given two words A and B of the same length from a dictionary D. You
can only access this dictionary through a function boolean isInDictionary(
string word). We are going to make a word ladder. We start at A, we end with
B, and change one letter at every step.
All words are over the alphabet [a-z]. |A| <= 10 characters. |D| <= 10 000
000 words.
We are looking for a shortest word ladder, if any exists. If many exist,
return any one of them.
A=dog, B=let
D={dog, let, log, leg, puzzle, bicycle}
dog
log
leg
let
二面
1. given a cactus graph, determine the number of different spanning trees of
this graph.
2. Given a very large string T, |T| = 10 000 000 chars
a stream of small strings Si
check if Si is a subsequence of T ? return true/false
number of Si ~ 100 000 000 (strings)
|Si| ~ 100 chars
'a' to 'z'
T = abcdefg
S1 = abc yes
S2 = ag yes
S3 = ga no
S4 = aa no