标题: Google面试题,你都能答上吗? [打印本页] 作者: mtlca 时间: 2005-3-5 05:18 标题: Google面试题,你都能答上吗? 1. Solve this cryptic equation, realizing of & q+ s' ^3 Z |+ A- n3 X$ J o8 G ; L' l# I( I1 qcourse that values for M and E could be, {- S7 |$ A9 I- w5 C
. e, X1 U3 r* `3 A: ]0 Y
interchanged. No leading zeros are allowed.: d& S9 q7 L. L' W& {' `
/ ^. v# H% I! f+ x6 V, s2 J) Z E) H" g2 C0 F
8 `2 t# N! M1 f3 }9 p+ }WWWDOT - GOOGLE = DOTCOM' @! ] f1 H! y5 A
+ f) O& k, r$ p! d! ^5 D
' M) p' H; B2 ?9 _9 u* u: ^9 ?: j! A2 X
2. Write a haiku describing possible methods8 Z/ f& d ?6 Y3 N3 L
/ J2 O J- l7 M 1 e9 S4 ?$ Z2 [8 x) x5 p% w, T! Q' W
What is the next line? 5 W* o5 S8 @! e( y- W" M$ r F: l' c* F7 a
' _8 r8 K8 G; D* K7 |) h3 e/ u
9 ^ E/ q- S1 Q' o, M% N
4. You are in a maze of twisty little passages, / v: A6 q% N1 L$ } 6 [" O' U* |1 Y: Z0 @0 x8 o# wall alike. There is a dusty laptop here with a $ t/ X g, t; Z& v4 c0 \& h9 p9 @ H% @" B# i/ ~8 `8 Q
weak wireless connection. There are dull, : e. S/ C, q1 b. l+ w7 s! L! H# r1 J3 b8 M" J2 M5 Y, i: g5 G0 \
lifeless gnomes strolling about. What dost5 x" w& u7 W V) @/ E$ f
b" [* ^7 a4 f( ?: ?% Q: Rthou do? 0 G3 G- i6 p; i8 x+ H j; R4 @ 4 q; t- P* i, l - D- S5 m( ~5 z4 I# x1 g/ S* k( M) z/ q+ S. u* [& Z
A) Wander aimlessly, bumping into . t5 ^ r$ H' b, b4 [) l + C( C+ P8 h$ U9 v1 f& i: y& t) h! l$ Jobstacles until you are eaten by a grue. " C5 O$ W( D( c4 e! M- ^ : k" n2 h6 v, d) ]B) Use the laptop as a digging device to4 B; v9 w, B! s2 }/ Y8 `
. a. d4 g$ w+ ?* @7 s- b5 ?
tunnel to the next level.: |. Q/ S( v, G/ I, a& `
4 F, }2 i& M. W+ t; o& f/ U7 V: GC) Play MPoRPG until the battery dies" o; n0 |: V: K% Y$ c
* E, i! @( f9 d3 p4 g7 Ralong with your hopes. 9 l z+ X6 c5 ` E( K/ ^ 7 K' z5 D0 V/ P4 h! ~* }1 }+ ^D) Use the computer to map the nodes $ ]9 t3 S. T) A$ i, `" L 4 m( j3 A7 M& z- a' j4 U8 Q xof the maze and discover an exit path. , p2 d0 C6 r: y1 _ J 5 p# S# k# x' d- rE) Email your resume to Google, tell the5 \1 L; A4 }) |) y! O: l2 D
, e; |+ ~5 V0 q! P% f" m+ L, m
lead gnome you quit and find yourself8 ?3 v' M" v! b
# t4 M) ^; J& l$ L$ u
in whole different world. l6 a* X: i# U! d8 D
$ @" {' i' ~) U# [" X/ U$ Q1 v! {, R8 N8 i H5 `; q# p
. \8 Q% G) g6 S' q* I {" F
5. What's broken with Unix?% @. Y6 d, _ K0 d. u2 O
4 `, l* K* t' h! O' Q9 pHow would you fix it? ; C* V2 x+ m. q h1 p, i, a1 o$ X/ @& a) _, v5 E
* g+ `6 f$ [9 X
1 ?2 x; j7 w0 X# Y6. On your first day at Google, you discover& i, M$ K8 E7 |/ h0 k
* L- x; ~2 m/ l+ e8 k, g. ?0 r
that your cubicle mate wrote the textbook 2 ]+ E( t$ ~: m" I1 Y& Y) t9 D, b/ e# ]9 T" I
you used as a primary resource in your first . v2 I, F+ N7 z# F- | / h1 C- k B- Syear of graduate school. Do you: 9 i" X. |* A! q E8 S) h% H+ i! x3 _ : B- K; W; j# ? . G) s% l, Y( h; B. m" d( j5 o) t0 R6 I- w! i7 `( D
A) Fawn obsequiously and ask if you ; ^3 q0 {& n' @0 N B$ K 1 p' |; |5 s: @4 lcan have an autograph.6 z% a4 b% f! f+ b9 B
# t) N( ~: S1 @& w6 t* b2 RB) Sit perfectly still and use only soft 7 g8 _+ _1 T; d1 F ' p4 n$ h( n& s5 Skeystrokes to avoid disturbing her . {/ ]9 L' u! V" B/ W1 H* G $ L7 z& c$ K8 g) W( ]9 Gconcentration. 9 F# I# ~ M! V S, g7 a% t9 X! {2 s/ Y& G- dC) Leave her daily offerings of granola% R% ^) J8 `- z% _- j+ W
1 W* j7 Y. C- I
and English toffee from the food bins.4 h+ ~+ m h! Y% L
) X; d9 @6 Z' V1 J: q ! f+ }& D) m3 N- v1 N; j, Z# o% G1 x 1 i( ^! \& _* U: k: {0 p9 o% j2 L. jD) Quote your favorite formula from the 5 E$ t; s2 }" [3 Y; @( }+ B7 ^. E7 }% @1 N5 \ y7 n! }: `# d- u8 \
textbook and explain how it's now2 a9 x6 t& d$ @" L1 o8 W/ Q. U" \
' F0 a9 E. K( ~1 h3 `/ O
your mantra. - J' M4 l* R5 C; k/ E& |9 K- ~ ; g3 v" X4 X5 \$ B( p8 jE) Show her how example 17b could. A2 U" b6 A% H) p
5 P! R+ `- Q) D8 v& V7 a
have been solved with 34 fewer lines , p. e8 p1 m/ F/ y1 V! H, s3 H5 o! T9 [
of code. _' A1 u }3 N7 {0 n
9 p# Y7 B- ~* ~, l; Q5 }7. Which of the following expresses Google! I' G# R, c H. {1 j- n
1 U- @/ a. c" S( s9 U$ cover-arching philosophy? 7 Y4 Y- M! o+ i* I: S; l 9 E; l0 w+ ^' s3 M: Z& Z4 R% I/ t7 }# {( B
. t6 ~* ~2 _1 i
A) "I'm feeling lucky"6 Z5 U4 Y+ v) o3 ]
( n: Z' J' W" P- S. L" B3 [( E# R: ~0 RB) "Don't be evil"6 l: Z, m1 m3 o
* v7 G4 K% z, E. I% T
C) "Oh, I already fixed that" $ N( K& f: {- S* p5 M. K* q5 \0 u% A: v; i6 p! p2 p* k$ D+ V% d
D) "You should never be more than( t* q/ W0 G9 d4 t
& O) h9 a* m& u8 d ?9 G
50 feet from food"3 N: y& F l7 \ I5 a5 z; `
6 }1 K- _5 w: L+ S0 v2 c/ w3 K# _
E) All of the above v* P* k2 ?9 d/ J8 ~( s
7 O6 ?1 h2 R5 G1 t/ w u* v1 x$ G* k1 ~! w
A( g0 L7 C7 {+ ~9 p/ f8. How many different ways can you color an % P, B2 b: m& ]; X6 i8 h1 h % Q5 g4 E$ o% P }0 uicosahedron with one of three colors on M8 d- Z9 O ~ - B6 B: j, v1 C$ f' V- H7 s' }each face? ! z% t. `- @) o* Z' N& z+ J# y" w9 ^+ U( m: E
. g% G; n( D! ?/ S: T . E' e; Q" z* W7 V' c3 n, l/ hWhat colors would you choose?# a$ l j) ~' j7 ]1 h$ d8 A
, W0 E. d4 c; ~' @
0 q# u" w! m" R& S2 W
9 B4 M5 L& t/ o9 [4 K3 R
9. This space left intentionally blank. Please fill it 8 A/ V2 k+ _- ]2 @ U3 }) y! u9 _/ j. X- d( R
with something that improves upon emptiness. ! A: u' n5 T% d& h4 C# _/ M* `/ D2 C4 Z
4 `' q) l8 @& B' k! l1 H8 N7 o- I- w! a. n# _- K8 R0 f) J
10.On an infinite, two-dimensional, rectangular4 x `$ J5 ~" G' U9 {# Y( [
( L, O8 l0 ~( }8 |; plattice of 1-ohm resistors, what is the0 ~ }+ Y- @; X9 S3 C' g3 b
/ E% B; a7 Q: ^% wresistance between two nodes that are a & h3 v! U5 ~' ]3 A& h 3 [; p; t9 P! W, R ^) ?2 {1 J( wknight's move away? , M' d# k' s' x1 s! L# j i8 z' W Q8 j1 f" C* ?) D# a2 ~4 c1 o7 y/ v
- Q( o3 U$ \: i6 V% C) A. i0 T11.It's 2 PM on a sunny Sunday afternoon in the& N6 n2 k; E0 U, E# G
7 c$ @6 ?; k9 y3 eBay Area. You're minutes from the Pacific 4 y# Y$ x! ?% ]: {/ G 4 V7 {& n! x9 W7 D; fOcean, redwood forest hiking trails and world$ v% A Q5 n, Y8 I
; I: |7 n, ]2 x8 q" n; Zclass cultural attractions. What do you do? $ z9 ^. I% l" B- U1 G$ L 2 X( g6 d# |7 u/ } C# X$ `" O$ q: ^
. d& I5 g- N7 }& S2 }$ q
12.In your opinion, what is the most beautiful1 k& Z) X; g% w5 r
, [6 S. R4 U- f. y' [8 Z
math equation ever derived?. |, ] m2 V. e5 O8 x% ?
0 \9 v# Z8 Z5 [8 k
2 E/ B: z* z* ~# d# P
3 R7 t5 Q' @% P
13. Which of the following is NOT an actual% B1 `/ }- j: l
8 c+ d/ h; ^: winterest group formed by Google employees? j8 I# R. \- v" P$ q
) _( X: K5 D e6 T
- k3 b" K' G' }9 ^( B
7 B0 ^. R' y% Z
A. Women's basketball! g2 J! m) ?; D" q2 f, D0 ]
X R! j; x5 ^
B. Buffy fans 2 K+ {+ }- L R4 _ ) U% x# g$ T7 y& Q4 CC. Cricketeers . c8 H5 y' v7 n# e+ j6 s% G0 o% c6 q2 G9 ~2 \5 E
D. Nobel winners 7 z: i6 j9 j/ O- m5 _8 y9 v" s& s , C* m- N9 W% n; S6 m0 j9 lE. Wine club) O% L7 o e4 v' F. v. }
+ n8 u6 H- w% f2 n9 T; m7 {
' L3 Y8 ^& J5 y 7 \ ~! _% Z( A0 C; u14.What will be the next great improvement in 0 U" ]9 R2 t. \1 [: D( e1 F2 O5 f% `" Z
search technology? - A# U( `) n. ~2 p0 { a( U/ H( Y/ J ^' S _" u/ B d1 t# U3 j; [% ?7 i , q1 Z& J, j7 [$ c$ J; G- v5 m& @1 T; m; B) H6 N
15.What is the optimal size of a project team,6 Z5 `- [. h5 N+ c
# H6 O" K8 H# A6 U# A' x( l/ Gabove which additional members do not % c# k, n; }" U. Z* \, ]7 X# c. L: D, E
contribute productivity equivalent to the 3 a& B5 ^. E8 X* s5 u / ^" b9 D5 R6 v' npercentage increase in the staff size? 8 Q. `! T$ {3 v6 o" v( ]9 w; Z! P# U- v + i# k# l4 X2 Z. Q" WA) 1 / k% q" u3 [8 ?& r# N0 j$ q8 l0 |* A* |+ Q# D* @; a; _
B) 3 * k" W3 ]9 G9 S/ z # q% K0 k, v+ _6 F8 d2 \' zC) 5& n0 N1 J1 ^6 S' y. |; `0 v& z
7 Q0 o5 A8 o4 C; L1 h/ F% i5 ^/ s
D) 110 n* R# o# T& C$ ^6 ~9 M
0 k: s" n: p. y9 I' W4 S/ w1 q+ ?$ U5 A& `0 u- N
16.Given a triangle ABC, how would you use only Y v2 O7 h* u |0 b( T3 A/ O
a compass and straight edge to find a point P ) S1 S. t4 M# x/ q1 V e, d) [ m d, V+ _
such that triangles ABP, ACP and BCP have . K8 o! V2 W# n$ b$ g7 L( ]% Z$ M' s; w& e7 F; k0 M2 H
equal perimeters? (Assume that ABC is ; J8 D/ h+ l+ Y! b" C+ F# |" e! Y! E, `# M% [
constructed so that a solution does exist.) 5 g+ J. I- {# u8 `3 V6 Q: O 9 C( [* D1 N" M% C6 A& ~# {/ f. _4 F* W9 L3 _
; |7 W8 g3 C/ a5 n17.Consider a function which, for a given whole 7 u7 y& q" u6 }! r% F% k. N: c0 I) J 4 T. b) Q3 I6 v! E9 ynumber n, returns the number of ones required $ a* G; y4 x- Y, l 8 u( a9 ]% c7 i1 ~5 p _when writing out all numbers between 0 and n. [ L; `8 A+ l5 G" v6 o/ f
" V, G9 n& e; w# C# p" D
For example, f(13)=6. Notice that f(1)=1. What * E# s2 c: _/ c7 Y' j1 s$ q 6 [4 |' R1 p! l% G' D/ Pis the next largest n such that f(n)=n?, F1 c" X2 Q! ?& `" C( R4 h! T4 i
; u6 g! ^0 g0 Z% x0 h5 P3 Y1 e1 x0 b O! \
7 p; R( V2 E4 S18.What's the coolest hack you've ever written?/ w5 N5 y$ Z; _7 k7 \0 x% c! _ O
. Y" v; r: c- s) A/ X
" Y' [! N" E# I c5 x
/ R# h" ]/ ^0 a) s0 K- `( I6 x
19.'Tis known in refined company, that choosing. q1 i0 j& ~. S0 V6 @& f
) y$ W( K s0 K% WK things out of N can be done in ways as# [ j( }0 D7 n& a; i
1 ^$ d* N u. f9 r: mmany as choosing N minus K from N: I pick K,4 L& F F( g6 @! v8 |
- r; N" s( r6 M) |+ k* W1 Uyou the remaining. , f, i9 N# J; ]) h+ Q# N3 d ~1 v8 K' y) \7 k
6 E) Y+ a+ ^& b+ w# ] : v/ Y$ Q3 ]8 D. x4 ?+ kFind though a cooler bijection, where you show ( m9 Z3 A4 b, F+ d! ?: T % K: U/ h' d( }' K( e0 Ka knack uncanny, of making your choices contain; M: W* _4 o, V3 _
0 s+ s0 W3 ?9 y# m1 ~1 l4 i# u8 |! b
all K of mine. Oh, for pedantry: let K be no more 2 G4 o! s; ~' f2 f " p p; ^& \2 r5 athan half N.$ R6 O+ g( w' u8 o
# u: k2 E; S/ I _" C: Y/ U5 b
" g" M! d) Z" C! R4 w: D
/ c4 W. w% n8 q
20.What number comes next in the sequence: % L( {1 A4 _7 Q; ?" m6 S( \ " ]5 O2 V' D; T& C10, 9, 60, 90, 70, 66,?2 B$ Y! j8 W4 y, n& F$ k
5 U3 C9 n/ X, p% X: `) v2 g( @. g& F0 V3 M* z
' F+ J- L k a* o, b2 h7 zA)96 5 v5 ^$ S9 X+ G) m6 {! X0 z! p/ d2 W) H; c4 v
B) 1000000000000000000000000000000000$ I3 _" J* g! p- k; }( p# ]
) n; d _: K* P( t' @0000000000000000000000000000000000 6 O9 ?5 M* v$ Q/ B) i6 p9 {/ f3 W a; G! ^- t3 {
000000000000000000000000000000000 . t3 o) Q$ s" h; I( r % Q$ S" ^$ ]7 N! E( N( ~C) Either of the above: k; l1 r0 q; C2 t
$ c7 W; S" f/ I% t' S
D) None of the above 9 a, h! U6 J. X6 @# l* E! I; W7 ?