标题: Google面试题,你都能答上吗? [打印本页] 作者: mtlca 时间: 2005-3-5 05:18 标题: Google面试题,你都能答上吗? 1. Solve this cryptic equation, realizing of . V4 {3 @, m% D5 [; S/ L$ Z3 o ; ~6 o% I i; t- J( d Gcourse that values for M and E could be$ s" [! l& r3 i/ J9 K4 E$ U
+ V! K6 D( R" R2 kinterchanged. No leading zeros are allowed.: Q+ }9 j0 l6 K2 z7 a* ?
# X& A/ N. Y& w2 J
1 R: b* \& w* }& I- Z! {3 H
4 m1 }2 J9 K& BWWWDOT - GOOGLE = DOTCOM ! t- M+ ~5 u7 y* @) z) S0 }# r0 c* P2 C M6 |' y5 [
5 P6 g* C7 ~: C) Z- g
3 B9 T: H1 @/ l4 m' C! O0 [
2. Write a haiku describing possible methods / y1 H/ {" N, X( {4 Y( Q' x2 W5 M' a' c
for predicting search traffic seasonality. 2 D) [7 V8 i1 K4 ?( {" g4 v a3 m2 F5 Z2 B
4 t. B- q& q9 F5 f1 ^* a
) p) {, A# n9 I) w* v- s6 K
3. 8 N$ v' H# U2 m# w: R. E5 g: \3 i; h" x X! x3 U! v& M
14 j% i) N! E" p8 V8 w
( C L! ]. a+ N. _; R
1 1 0 H& S6 k; ]. ]3 x) | ; M: x. s5 x1 P4 w, q7 D2 1 4 N! w- p) Y/ A" h; h& _+ r' K4 }5 p4 d0 C2 t
1 2 1 1 2 A7 J, i( ~: o' X4 |8 u: S5 P8 C9 D" o# V3 @
1 1 1 2 2 1: v) e8 b( ^: ^7 m
8 |# }: z% S; {! }( L" f4 k( C; s \/ y! p* @- @
m( z+ @2 }) T& BWhat is the next line? b' R8 _; _6 z! I% e! ?
/ _; `2 L% P8 P, v* q1 x # M3 v* l/ F" t2 r o( C! J* I6 D9 b7 I" s- T0 x
4. You are in a maze of twisty little passages,0 ~1 v- r5 I; Y2 [% j: Z
1 |8 C+ v* o- Y/ |4 Z' i) V
all alike. There is a dusty laptop here with a. w* m8 z5 Z& E2 W( E3 K s! y
1 v. E! J6 W+ t' Q( Nlifeless gnomes strolling about. What dost- h# p. s; B( ?" p! ^8 c
5 L$ i1 L% @, uthou do?0 U! ^5 l' |8 X: v+ @0 c
+ }3 Z( z9 c+ i% M- C+ n* O$ V% [2 l# W$ ?
8 a$ j. r9 R# `' ^+ c
A) Wander aimlessly, bumping into+ j5 B! L+ o0 p, q. ?, W
/ Q3 n |. ~' S+ p6 ~4 [
obstacles until you are eaten by a grue.. E% X+ m! V$ y# c; m
5 `9 M! [! p5 k. H
B) Use the laptop as a digging device to $ T4 R( Z. t D/ t2 v: Q8 E$ c " ~( x* F2 A# I C. H7 m1 Wtunnel to the next level.) X) Q$ |' B {) ]* o
4 a3 x. f: R( B* k7 p* o, S
C) Play MPoRPG until the battery dies . ~( s9 [, z' t9 c J6 m! S 3 s* J, v" J- b# W' E( Salong with your hopes.! I, S4 i6 _0 D( w7 @
4 J( F: K7 M! a4 s% y, X5 E0 B: [: DD) Use the computer to map the nodes ) R9 K6 f( P# ]2 X8 L - }/ W% q/ O% X3 P/ fof the maze and discover an exit path.4 G/ u! ~/ }+ |. ~
. u9 e! ] \2 J
E) Email your resume to Google, tell the1 c: i' W! c& _- V/ G
: y7 d& j0 u; ~( m9 `$ i. Flead gnome you quit and find yourself 3 K6 u3 p: V& K, A$ N- H$ ] * L# ]& i1 E& d5 lin whole different world. ) n9 h; Q0 z4 \+ h- h" m6 x6 f# p2 v* ^4 l; C
/ j( i( d4 T, S/ G, j
9 w. [& \% y5 t3 e
5. What's broken with Unix?% D$ x, H& I! L2 ?- N F
: Q6 R2 N3 W6 q1 ?: {How would you fix it?7 g- C7 L* z4 K E0 w
4 u8 d( k9 ]4 b0 m2 ~$ a; L) _* f: P! D: e
8 v N! K- }9 l6 B& L$ j
6. On your first day at Google, you discover5 V7 z# x _9 w* v- V
) F1 B8 |9 l3 v- t" O$ ~% \+ ~that your cubicle mate wrote the textbook+ c0 N l) {& |, t: s7 U
0 r- y! v' u8 o; S5 D
you used as a primary resource in your first 2 m, q% ~5 [! r 3 K; L' _# l. Xyear of graduate school. Do you: 8 s7 c0 ^' Y8 a$ w: B: E9 ]7 ^2 d/ `' b! J$ ~3 M4 ]/ e
, f0 E: ^9 D( g! r! g4 L1 ?9 `5 L0 j( Q) B
A) Fawn obsequiously and ask if you 0 R1 _; \* N0 B# a7 v# R1 A + |) c; |1 h Q" Kcan have an autograph.. H j6 }+ Z* ]* t5 W
8 b7 P) l2 p& a' F; z/ f; \B) Sit perfectly still and use only soft , J/ |6 I4 P% _. z+ P' g0 n3 ]" z- N& |3 t) m# L3 y% ~
keystrokes to avoid disturbing her / ]* M) S" n9 E+ P$ l7 I8 c $ k/ j* t2 D0 J# Bconcentration. 4 z: [+ q! H$ }& B ~; c6 n9 P- V0 | / m' M5 X, D+ M) } S2 w4 wC) Leave her daily offerings of granola' ^3 M9 p& D# O% L+ H+ {# i, @) \/ e
$ ~) v6 u6 v0 b& f7 U. m8 c
and English toffee from the food bins.: R/ D! Z) I- y: T% ]
0 a& H2 T# [ ~. e% a/ v( ~. J6 x8 n' h" Q4 Y7 y1 Y) M
7 ^5 c$ o# G- I) `# tD) Quote your favorite formula from the - }' B* n. v7 z7 ~2 N% I5 t/ n3 J+ K* X0 e/ D- ^1 ?
textbook and explain how it's now1 J. @- U+ }9 z8 _$ K* I
1 d+ A! Z# X4 r( w
your mantra. 5 O B" N( s. H& M) k* j1 G! U/ w- f- \2 E7 n. I2 j# d
E) Show her how example 17b could , x8 p' V; N0 N: Z- L& f/ F' a; O3 _" g4 o" s
have been solved with 34 fewer lines. R: ^ `/ z- |& f
, H, R" y H2 P% x- dof code. 9 Z* a% u' R1 p8 o7 o* N( `8 T. D8 Q8 H2 B7 T; D" w' M7 o1 {
7. Which of the following expresses Google 7 }4 m" M' `' T; x / }4 D$ r: D% E9 s1 jover-arching philosophy? : D F; D2 L5 L0 B8 o. K4 S) c/ c/ n, c1 P0 z! E
' B# a, L/ q$ {- r+ o; v& c
4 L% x9 M" a0 t
A) "I'm feeling lucky"" L1 \( l9 K' T" V, a/ r J8 ~9 y
! O* ]) J# T, b9 q* L
B) "Don't be evil"# y- G! r5 s: l& h- _ A: l
* e# a( S* B( S, e1 G1 O
C) "Oh, I already fixed that" : ? `4 X9 _. ?" d V W$ _: v; F qD) "You should never be more than8 G$ J& k+ w8 Y* c5 [" S
9 k: l' O3 T+ _* s! w- w* T
50 feet from food"# I( R& a. s* y4 V5 S- o
0 |$ @( ?% i$ t, y% o2 P9 gE) All of the above / i# I( R4 {. o$ b+ e! m 0 N( i G7 m# E* ]1 h" \! K1 {) E5 i* t3 a4 c& G# ]) s7 w% m- W( O
g8 ?4 Q3 l1 R1 \/ l! ]' u6 G8. How many different ways can you color an . U. _% N" `' p2 z 4 I( V& t2 k, H/ v, k; r% gicosahedron with one of three colors on , A; M0 f# r1 _9 x& O! z8 U9 Z. C: e! O# [; Z
each face? + ]( t# O. G* o/ g% M7 Z* d4 `! K N 0 ~' r/ M8 {5 T* I* c8 H2 |* I, x W) o8 I) O: ~; j
- e1 j4 D7 H0 c7 _What colors would you choose? ! Y2 u- j& j9 e9 a, U% F# Q3 D7 G6 ?8 v5 \8 q- _% g
, S- l/ e; a! ~! ?7 E% H3 u- Z+ h7 c# q$ l. u( Y
9. This space left intentionally blank. Please fill it' z1 N& S# K. k" g$ A
5 B: |$ A5 v1 r' N& Q: O
with something that improves upon emptiness.7 F2 |% |: z) q& @; n4 Y
1 C& u- M; J1 j! C) d ) W; R+ ]$ U( G* U. x8 g% Q5 H f& I) B* ~9 }
10.On an infinite, two-dimensional, rectangular ; ~6 Q# L6 M3 K3 f; g5 t6 ^9 m% \; q8 |2 D2 ~6 M! [
lattice of 1-ohm resistors, what is the3 h) A+ b! P' L* G$ ^
! y e5 W8 b: g" }9 kresistance between two nodes that are a ; e% N4 x9 J+ Q5 H( {/ y( h5 _8 s! z+ B2 p3 d( D- D( W- \) n
knight's move away?9 }0 v3 ^+ B& v- O* S
5 [1 Y% W& u) H9 {3 \6 ]
! h! v6 N# ^, @5 \" O2 I5 s: z% m% ^
; V5 _7 K% }( Y3 k3 u' z8 y11.It's 2 PM on a sunny Sunday afternoon in the : F4 r. w0 e4 [ 3 P! W* ?7 R* ^5 T1 t0 \Bay Area. You're minutes from the Pacific) _2 j: \( `% R8 ^# L( E9 h
2 r! w$ I1 W; T* N0 L* OOcean, redwood forest hiking trails and world l- R7 ]. h- p3 p4 i# M
0 G+ f4 _- p- c/ @/ W8 y
class cultural attractions. What do you do?7 ^; K" r& X, x3 z6 E/ O7 i
5 D: E- E( q1 ?( _/ @
3 d4 Y2 a. C8 m- U: z2 _0 Q, z4 M. g+ q' s# v
12.In your opinion, what is the most beautiful$ _3 m( Z& [0 D/ a% L/ n6 Y/ o
- b7 o7 o( Z% ?! A. D# ?" M" z , B( t/ t3 M& q h; _6 e3 I7 A13. Which of the following is NOT an actual8 K5 E7 D8 t# j
8 W0 @, n/ x$ w% E* C0 hinterest group formed by Google employees? ) W" u& f- G! B& d2 O: Z# M$ c4 q! V( p( l. }/ X; x
; K, |6 x" v! y8 E- p( w
" F3 E* c1 T8 U0 f6 s
A. Women's basketball * ?0 }) c r m2 B h& X6 u; B6 Q0 h# u
B. Buffy fans 1 j! f; O8 O% i6 K' |0 T. b' \1 R% v! `
C. Cricketeers 1 x6 }# O( D* z6 I* y8 f& m 4 C+ E( W; }% G1 t) vD. Nobel winners ' ^8 {% F* q0 B( v$ d( s# V# h" C8 n, [, D3 i5 x3 i9 x/ ?* l
E. Wine club 5 n# A3 e9 {" [7 x9 F( S; E I) c6 s3 K/ R# ]/ E, H% O
; F5 T7 A- Y0 m# v
' x8 c; V1 b4 S2 X
14.What will be the next great improvement in. W& V* g8 |% X* _1 u+ G
1 P' H/ ^. i, A" \+ jsearch technology?' w. ~0 V8 j+ F) n
- P4 t3 I2 q1 N15.What is the optimal size of a project team,/ I. n% [- O' H& S
- q: ~9 f! V8 q. W- {above which additional members do not5 K0 W6 |, s/ D, K
6 s. D ~ _# S- Y' p% Ncontribute productivity equivalent to the 9 [) ~" \$ h* x; q' N* H; d2 u; d 0 @1 L, E; T, T7 |percentage increase in the staff size? ! a- m9 }/ T6 i$ T1 y2 t( o3 o! H6 y* o, X
A) 1) n$ T. D) w+ u/ k; Z& C; f" r8 w
, N2 a4 ? \. `5 W
B) 3+ E$ k+ o; `) P2 b. Y
0 e8 R0 V+ J8 u9 }5 V
C) 5 $ R$ T4 l2 W: w+ G( @: d) \/ e' L% d4 R4 W" i6 ^; R; k/ `. f
D) 11 # l& V' y* [5 N. S/ t% ~: y) z; W& C* d
E) 24 9 h! J; H, x1 w- j; X - f% g a8 B$ t5 T) ?5 N5 ]: y) s5 H: k " U! P, j: o) J# z; z8 v: F' J0 w7 X+ p) O
16.Given a triangle ABC, how would you use only 6 N. m% I0 Z, B* p6 e5 E J7 E% |3 w& x/ g; s/ p; r- L
a compass and straight edge to find a point P$ s; `% }0 _; {' C8 N" d
3 I- [+ V! R' v! Y1 g
such that triangles ABP, ACP and BCP have ( e. L1 }: K& W8 }- t 2 P: t, K/ A3 t7 requal perimeters? (Assume that ABC is * j1 g" U7 Z0 I- L5 k' T, Z9 B6 Z3 d( v# ]. j) `2 h! g
constructed so that a solution does exist.)/ L- |4 `% P. C. H2 u; v
I6 M2 p# A" A' F+ o# Q5 ^% o! m: j$ O
# z; G; a: o# I" \& Z* X17.Consider a function which, for a given whole: {6 ?" s5 G2 f ?; Z3 I
- \8 r7 f7 s; T* q6 b' E. Fnumber n, returns the number of ones required4 c& U& O# V5 ?
8 U5 A1 }. W2 C& E8 D
when writing out all numbers between 0 and n.' U; I8 N: x- u5 h4 e1 b: ?6 W2 C( S# _
+ | z- E2 \- g
For example, f(13)=6. Notice that f(1)=1. What+ q% c8 O! F# l, l7 j$ S
" f6 X. H/ n4 @
is the next largest n such that f(n)=n? # R- H5 e. e5 P7 x% j9 v; `* H, e* J3 D5 x5 J+ X
" Z! ~4 e& ~3 u5 E, [3 |) P5 B
0 B- a; f% \; R. d" u5 G+ d. X( v+ }18.What's the coolest hack you've ever written?$ j& d3 x. L2 t4 W% P" {! q
& }# Q0 _5 f0 r, j7 w+ M( b
' b4 ?4 s9 @" ~/ x" A
) z2 t$ H6 u# O$ d2 m
19.'Tis known in refined company, that choosing $ }4 t6 V1 A$ R 8 C3 a, [3 M3 d% u& K# ~5 V/ _K things out of N can be done in ways as4 I6 f! ~& s8 d. }2 ?
' w; N* L* Q/ }/ E8 P5 M# `' n
many as choosing N minus K from N: I pick K, D2 x/ h% D) p/ |3 O P; V) x
3 V( V \: y+ O$ syou the remaining.+ O+ ~+ w* @: ]% p2 V4 W$ ^9 g: y
+ J4 Z X6 j# H" M+ |: l - P& n% i7 u* q2 F% D" ~ P" \, X( ]+ {2 E: h
Find though a cooler bijection, where you show( V m6 Y9 j e6 x; B2 g
! g) r! ^' t% ~ ^2 B' _- w
a knack uncanny, of making your choices contain 4 k% v% i! L- w' f( G% _4 W8 A8 v
all K of mine. Oh, for pedantry: let K be no more ; k+ s! {4 `. I' O, h& l# r4 r8 w x. \9 k
than half N. : Q U" W* I" D$ L) l $ q& a7 c% v5 ]5 j5 ^/ s % O- O3 @+ T$ ^6 x. z( N: _! V5 D
20.What number comes next in the sequence: ( H8 `" t& c) `6 b/ P/ ]. g2 Q _' s2 W! `5 M3 j: d3 v2 P
10, 9, 60, 90, 70, 66,? 3 u( b$ c3 H; D9 O% z$ P8 Q9 z$ W & H5 w! h3 D ]# o+ F9 @1 X, a' x; i M5 n3 i
3 L: U+ @# }4 f4 Q" ?6 u1 B2 N/ g! \A)96 + d/ i3 F, k. Q# \" g; V6 ^+ i+ c A. I' O1 S4 Z
B) 1000000000000000000000000000000000 : `, E! ]1 R; b: Z1 S 9 c# t$ Y4 |% i; |+ h0000000000000000000000000000000000 1 b; U5 x. B8 [- t3 o! r7 l" [' F 3 x0 t" l. ~0 d2 t9 N0 _; X000000000000000000000000000000000 0 C8 X+ F, I. @7 T 2 N4 I) g( S! P9 X! {C) Either of the above $ g$ M T! q. P, v4 i, T4 n! ` b& o1 s- H
D) None of the above 3 S3 z6 q7 E* z$ X8 G) `% r }, c/ x6 ~+ L, G3 b/ `" V( s4 ?. y8 }8 a2 d4 B, y
9 H0 r+ g& E" h- Q, ]21.In 29 words or fewer, describe what you 2 [, _9 r0 G1 z7 ]* B! i + g6 ]3 B# Q% C) i) bwould strive to accomplish if you worked5 v: n6 p* K/ z6 S) o5 N; v